# -*- 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.yangtypes import YANGBinary
from pyangbind.lib.yangtypes import YANGBitsType
from pyangbind.lib.base import PybindBase
from collections import OrderedDict
from decimal import Decimal

import builtins as __builtin__

long = int

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

  YANG Description: Global NAT configuration parameters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__translation_timeout','__max_translations','__log_level',)

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

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__translation_timeout = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="translation-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)
    self.__max_translations = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint64', is_config=True)
    self.__log_level = YANGDynClass(base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'NONE': {}, 'ERROR': {}, 'INFO': {}, 'DEBUG': {}},), is_leaf=True, yang_name="log-level", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='log-level', is_config=True)

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

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

  def _get_translation_timeout(self):
    """
    Getter method for translation_timeout, mapped from YANG variable /nat/config/translation_timeout (uint32)

    YANG Description: Default time a NAT translation entry remains active
without traffic for all NAT instances. Applies to all
traffic unless specific protocol timeouts are
configured.
    """
    return self.__translation_timeout
      
  def _set_translation_timeout(self, v, load=False):
    """
    Setter method for translation_timeout, mapped from YANG variable /nat/config/translation_timeout (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_translation_timeout is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_translation_timeout() directly.

    YANG Description: Default time a NAT translation entry remains active
without traffic for all NAT instances. Applies to all
traffic unless specific protocol timeouts are
configured.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="translation-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """translation_timeout must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="translation-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_translation_timeout(self):
    self.__translation_timeout = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="translation-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)


  def _get_max_translations(self):
    """
    Getter method for max_translations, mapped from YANG variable /nat/config/max_translations (uint64)

    YANG Description: Maximum number of concurrent translations globally across
all NAT instances. When this threshold is reached, new
translation requests are dropped until the total number
of active translations falls below this limit.
    """
    return self.__max_translations
      
  def _set_max_translations(self, v, load=False):
    """
    Setter method for max_translations, mapped from YANG variable /nat/config/max_translations (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_translations is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_translations() directly.

    YANG Description: Maximum number of concurrent translations globally across
all NAT instances. When this threshold is reached, new
translation requests are dropped until the total number
of active translations falls below this limit.
    """
    if hasattr(v, "_utype"):
      v = v._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-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_translations must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint64', is_config=True)""",
        })

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

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


  def _get_log_level(self):
    """
    Getter method for log_level, mapped from YANG variable /nat/config/log_level (log-level)

    YANG Description: Global NAT logging level.
    """
    return self.__log_level
      
  def _set_log_level(self, v, load=False):
    """
    Setter method for log_level, mapped from YANG variable /nat/config/log_level (log-level)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_log_level is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_log_level() directly.

    YANG Description: Global NAT logging level.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'NONE': {}, 'ERROR': {}, 'INFO': {}, 'DEBUG': {}},), is_leaf=True, yang_name="log-level", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='log-level', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """log_level must be of a type compatible with log-level""",
          'defined-type': "openconfig-nat:log-level",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'NONE': {}, 'ERROR': {}, 'INFO': {}, 'DEBUG': {}},), is_leaf=True, yang_name="log-level", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='log-level', is_config=True)""",
        })

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

  def _unset_log_level(self):
    self.__log_level = YANGDynClass(base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'NONE': {}, 'ERROR': {}, 'INFO': {}, 'DEBUG': {}},), is_leaf=True, yang_name="log-level", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='log-level', is_config=True)

  translation_timeout = __builtin__.property(_get_translation_timeout, _set_translation_timeout)
  max_translations = __builtin__.property(_get_max_translations, _set_max_translations)
  log_level = __builtin__.property(_get_log_level, _set_log_level)


  _pyangbind_elements = OrderedDict([('translation_timeout', translation_timeout), ('max_translations', max_translations), ('log_level', log_level), ])


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

  YANG Description: Counters for global NAT operations.
  """
  __slots__ = ('_path_helper', '_extmethods', '__total_instances','__active_instances','__total_active_translations','__total_translation_failures',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/nat'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__total_instances = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="total-instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter32', is_config=False)
    self.__active_instances = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="active-instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter32', is_config=False)
    self.__total_active_translations = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="total-active-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    self.__total_translation_failures = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="total-translation-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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 ['nat', 'state', 'counters']

  def _get_total_instances(self):
    """
    Getter method for total_instances, mapped from YANG variable /nat/state/counters/total_instances (yang:counter32)

    YANG Description: Total number of configured NAT instances.
    """
    return self.__total_instances
      
  def _set_total_instances(self, v, load=False):
    """
    Setter method for total_instances, mapped from YANG variable /nat/state/counters/total_instances (yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_total_instances is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_total_instances() directly.

    YANG Description: Total number of configured NAT instances.
    """
    if hasattr(v, "_utype"):
      v = v._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-instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """total_instances must be of a type compatible with yang:counter32""",
          'defined-type': "yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="total-instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter32', is_config=False)""",
        })

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

  def _unset_total_instances(self):
    self.__total_instances = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="total-instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter32', is_config=False)


  def _get_active_instances(self):
    """
    Getter method for active_instances, mapped from YANG variable /nat/state/counters/active_instances (yang:counter32)

    YANG Description: Number of currently active NAT instances.
    """
    return self.__active_instances
      
  def _set_active_instances(self, v, load=False):
    """
    Setter method for active_instances, mapped from YANG variable /nat/state/counters/active_instances (yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active_instances is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active_instances() directly.

    YANG Description: Number of currently active NAT instances.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="active-instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active_instances must be of a type compatible with yang:counter32""",
          'defined-type': "yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="active-instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter32', is_config=False)""",
        })

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

  def _unset_active_instances(self):
    self.__active_instances = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="active-instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter32', is_config=False)


  def _get_total_active_translations(self):
    """
    Getter method for total_active_translations, mapped from YANG variable /nat/state/counters/total_active_translations (yang:counter64)

    YANG Description: Total number of active translations across all
instances.
    """
    return self.__total_active_translations
      
  def _set_total_active_translations(self, v, load=False):
    """
    Setter method for total_active_translations, mapped from YANG variable /nat/state/counters/total_active_translations (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_total_active_translations is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_total_active_translations() directly.

    YANG Description: Total number of active translations across all
instances.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="total-active-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """total_active_translations 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="total-active-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_total_active_translations(self):
    self.__total_active_translations = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="total-active-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)


  def _get_total_translation_failures(self):
    """
    Getter method for total_translation_failures, mapped from YANG variable /nat/state/counters/total_translation_failures (yang:counter64)

    YANG Description: Total number of translation failures across all
instances.
    """
    return self.__total_translation_failures
      
  def _set_total_translation_failures(self, v, load=False):
    """
    Setter method for total_translation_failures, mapped from YANG variable /nat/state/counters/total_translation_failures (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_total_translation_failures is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_total_translation_failures() directly.

    YANG Description: Total number of translation failures across all
instances.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="total-translation-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """total_translation_failures 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="total-translation-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_total_translation_failures(self):
    self.__total_translation_failures = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="total-translation-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)

  total_instances = __builtin__.property(_get_total_instances)
  active_instances = __builtin__.property(_get_active_instances)
  total_active_translations = __builtin__.property(_get_total_active_translations)
  total_translation_failures = __builtin__.property(_get_total_translation_failures)


  _pyangbind_elements = OrderedDict([('total_instances', total_instances), ('active_instances', active_instances), ('total_active_translations', total_active_translations), ('total_translation_failures', total_translation_failures), ])


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

  YANG Description: Global NAT operational state data.
  """
  __slots__ = ('_path_helper', '_extmethods', '__translation_timeout','__max_translations','__log_level','__memory_usage','__counters',)

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

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__translation_timeout = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="translation-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)
    self.__max_translations = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint64', is_config=False)
    self.__log_level = YANGDynClass(base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'NONE': {}, 'ERROR': {}, 'INFO': {}, 'DEBUG': {}},), is_leaf=True, yang_name="log-level", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='log-level', is_config=False)
    self.__memory_usage = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="memory-usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_nat__nat_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['nat', 'state']

  def _get_translation_timeout(self):
    """
    Getter method for translation_timeout, mapped from YANG variable /nat/state/translation_timeout (uint32)

    YANG Description: Default time a NAT translation entry remains active
without traffic for all NAT instances. Applies to all
traffic unless specific protocol timeouts are
configured.
    """
    return self.__translation_timeout
      
  def _set_translation_timeout(self, v, load=False):
    """
    Setter method for translation_timeout, mapped from YANG variable /nat/state/translation_timeout (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_translation_timeout is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_translation_timeout() directly.

    YANG Description: Default time a NAT translation entry remains active
without traffic for all NAT instances. Applies to all
traffic unless specific protocol timeouts are
configured.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="translation-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """translation_timeout must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="translation-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)""",
        })

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

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


  def _get_max_translations(self):
    """
    Getter method for max_translations, mapped from YANG variable /nat/state/max_translations (uint64)

    YANG Description: Maximum number of concurrent translations globally across
all NAT instances. When this threshold is reached, new
translation requests are dropped until the total number
of active translations falls below this limit.
    """
    return self.__max_translations
      
  def _set_max_translations(self, v, load=False):
    """
    Setter method for max_translations, mapped from YANG variable /nat/state/max_translations (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_translations is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_translations() directly.

    YANG Description: Maximum number of concurrent translations globally across
all NAT instances. When this threshold is reached, new
translation requests are dropped until the total number
of active translations falls below this limit.
    """
    if hasattr(v, "_utype"):
      v = v._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-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_translations must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint64', is_config=False)""",
        })

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

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


  def _get_log_level(self):
    """
    Getter method for log_level, mapped from YANG variable /nat/state/log_level (log-level)

    YANG Description: Global NAT logging level.
    """
    return self.__log_level
      
  def _set_log_level(self, v, load=False):
    """
    Setter method for log_level, mapped from YANG variable /nat/state/log_level (log-level)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_log_level is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_log_level() directly.

    YANG Description: Global NAT logging level.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'NONE': {}, 'ERROR': {}, 'INFO': {}, 'DEBUG': {}},), is_leaf=True, yang_name="log-level", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='log-level', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """log_level must be of a type compatible with log-level""",
          'defined-type': "openconfig-nat:log-level",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'NONE': {}, 'ERROR': {}, 'INFO': {}, 'DEBUG': {}},), is_leaf=True, yang_name="log-level", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='log-level', is_config=False)""",
        })

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

  def _unset_log_level(self):
    self.__log_level = YANGDynClass(base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'NONE': {}, 'ERROR': {}, 'INFO': {}, 'DEBUG': {}},), is_leaf=True, yang_name="log-level", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='log-level', is_config=False)


  def _get_memory_usage(self):
    """
    Getter method for memory_usage, mapped from YANG variable /nat/state/memory_usage (uint32)

    YANG Description: Memory used by the NAT subsystem.
    """
    return self.__memory_usage
      
  def _set_memory_usage(self, v, load=False):
    """
    Setter method for memory_usage, mapped from YANG variable /nat/state/memory_usage (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_memory_usage is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_memory_usage() directly.

    YANG Description: Memory used by the NAT subsystem.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="memory-usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """memory_usage must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="memory-usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)""",
        })

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

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


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /nat/state/counters (container)

    YANG Description: Counters for global NAT operations.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /nat/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: Counters for global NAT operations.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_nat__nat_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/nat', defining_module='openconfig-nat', 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_nat__nat_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/nat', defining_module='openconfig-nat', 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_nat__nat_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)

  translation_timeout = __builtin__.property(_get_translation_timeout)
  max_translations = __builtin__.property(_get_max_translations)
  log_level = __builtin__.property(_get_log_level)
  memory_usage = __builtin__.property(_get_memory_usage)
  counters = __builtin__.property(_get_counters)


  _pyangbind_elements = OrderedDict([('translation_timeout', translation_timeout), ('max_translations', max_translations), ('log_level', log_level), ('memory_usage', memory_usage), ('counters', counters), ])


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

  YANG Description: Configuration parameters for the NAT instance.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type','__address_family','__description',)

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

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=str, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=str, restriction_type="dict_key", restriction_arg={'SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='identityref', is_config=True)
    self.__address_family = YANGDynClass(base=RestrictedClassType(base_type=str, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'openconfig-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}},), 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/nat', defining_module='openconfig-nat', yang_type='identityref', is_config=True)
    self.__description = YANGDynClass(base=str, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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 ['nat', 'instances', 'instance', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /nat/instances/instance/config/name (string)

    YANG Description: Unique name for the NAT instance.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /nat/instances/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: Unique name for the NAT instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=str, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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=str, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=True)""",
        })

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

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


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /nat/instances/instance/config/type (identityref)

    YANG Description: Type of NAT translation to be performed.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /nat/instances/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: Type of NAT translation to be performed.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=str, restriction_type="dict_key", restriction_arg={'SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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-nat:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=str, restriction_type="dict_key", restriction_arg={'SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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=str, restriction_type="dict_key", restriction_arg={'SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='identityref', is_config=True)


  def _get_address_family(self):
    """
    Getter method for address_family, mapped from YANG variable /nat/instances/instance/config/address_family (identityref)

    YANG Description: Address family for NAT translations - IPv4 for NAT44,
IPv6 for NAT66.
    """
    return self.__address_family
      
  def _set_address_family(self, v, load=False):
    """
    Setter method for address_family, mapped from YANG variable /nat/instances/instance/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: Address family for NAT translations - IPv4 for NAT44,
IPv6 for NAT66.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=str, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'openconfig-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}},), 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/nat', defining_module='openconfig-nat', 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-nat:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=str, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'openconfig-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}},), 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/nat', defining_module='openconfig-nat', 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=str, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'openconfig-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}},), 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/nat', defining_module='openconfig-nat', yang_type='identityref', is_config=True)


  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /nat/instances/instance/config/description (string)

    YANG Description: Textual description of the NAT instance.
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /nat/instances/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: Textual description of the NAT instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=str, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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=str, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=True)""",
        })

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

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

  name = __builtin__.property(_get_name, _set_name)
  type = __builtin__.property(_get_type, _set_type)
  address_family = __builtin__.property(_get_address_family, _set_address_family)
  description = __builtin__.property(_get_description, _set_description)


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


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

  YANG Description: Counters for NAT instance operations.
  """
  __slots__ = ('_path_helper', '_extmethods', '__active_mappings','__total_mappings','__mapping_failures',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/nat'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__active_mappings = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-mappings", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    self.__total_mappings = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="total-mappings", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    self.__mapping_failures = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="mapping-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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 ['nat', 'instances', 'instance', 'state', 'counters']

  def _get_active_mappings(self):
    """
    Getter method for active_mappings, mapped from YANG variable /nat/instances/instance/state/counters/active_mappings (yang:counter64)

    YANG Description: Number of currently active NAT mappings.
    """
    return self.__active_mappings
      
  def _set_active_mappings(self, v, load=False):
    """
    Setter method for active_mappings, mapped from YANG variable /nat/instances/instance/state/counters/active_mappings (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active_mappings is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active_mappings() directly.

    YANG Description: Number of currently active NAT mappings.
    """
    if hasattr(v, "_utype"):
      v = v._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-mappings", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active_mappings 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="active-mappings", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)""",
        })

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

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


  def _get_total_mappings(self):
    """
    Getter method for total_mappings, mapped from YANG variable /nat/instances/instance/state/counters/total_mappings (yang:counter64)

    YANG Description: Total number of NAT mappings created since instance
startup.
    """
    return self.__total_mappings
      
  def _set_total_mappings(self, v, load=False):
    """
    Setter method for total_mappings, mapped from YANG variable /nat/instances/instance/state/counters/total_mappings (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_total_mappings is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_total_mappings() directly.

    YANG Description: Total number of NAT mappings created since instance
startup.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="total-mappings", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """total_mappings 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="total-mappings", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)""",
        })

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

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


  def _get_mapping_failures(self):
    """
    Getter method for mapping_failures, mapped from YANG variable /nat/instances/instance/state/counters/mapping_failures (yang:counter64)

    YANG Description: Number of mapping creation failures.
    """
    return self.__mapping_failures
      
  def _set_mapping_failures(self, v, load=False):
    """
    Setter method for mapping_failures, mapped from YANG variable /nat/instances/instance/state/counters/mapping_failures (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mapping_failures is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mapping_failures() directly.

    YANG Description: Number of mapping creation failures.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="mapping-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mapping_failures 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="mapping-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)""",
        })

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

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

  active_mappings = __builtin__.property(_get_active_mappings)
  total_mappings = __builtin__.property(_get_total_mappings)
  mapping_failures = __builtin__.property(_get_mapping_failures)


  _pyangbind_elements = OrderedDict([('active_mappings', active_mappings), ('total_mappings', total_mappings), ('mapping_failures', mapping_failures), ])


class yc_state_openconfig_nat__nat_instances_instance_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-nat - based on the path /nat/instances/instance/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 NAT instance.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type','__address_family','__description','__counters',)

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

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=str, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=str, restriction_type="dict_key", restriction_arg={'SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='identityref', is_config=False)
    self.__address_family = YANGDynClass(base=RestrictedClassType(base_type=str, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'openconfig-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}},), 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/nat', defining_module='openconfig-nat', yang_type='identityref', is_config=False)
    self.__description = YANGDynClass(base=str, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_nat__nat_instances_instance_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)

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

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

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /nat/instances/instance/state/name (string)

    YANG Description: Unique name for the NAT instance.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /nat/instances/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: Unique name for the NAT instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=str, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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=str, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=False)""",
        })

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

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


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /nat/instances/instance/state/type (identityref)

    YANG Description: Type of NAT translation to be performed.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /nat/instances/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: Type of NAT translation to be performed.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=str, restriction_type="dict_key", restriction_arg={'SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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-nat:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=str, restriction_type="dict_key", restriction_arg={'SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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=str, restriction_type="dict_key", restriction_arg={'SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='identityref', is_config=False)


  def _get_address_family(self):
    """
    Getter method for address_family, mapped from YANG variable /nat/instances/instance/state/address_family (identityref)

    YANG Description: Address family for NAT translations - IPv4 for NAT44,
IPv6 for NAT66.
    """
    return self.__address_family
      
  def _set_address_family(self, v, load=False):
    """
    Setter method for address_family, mapped from YANG variable /nat/instances/instance/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: Address family for NAT translations - IPv4 for NAT44,
IPv6 for NAT66.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=str, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'openconfig-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}},), 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/nat', defining_module='openconfig-nat', 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-nat:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=str, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'openconfig-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}},), 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/nat', defining_module='openconfig-nat', 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=str, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'openconfig-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, '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'}},), 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/nat', defining_module='openconfig-nat', yang_type='identityref', is_config=False)


  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /nat/instances/instance/state/description (string)

    YANG Description: Textual description of the NAT instance.
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /nat/instances/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: Textual description of the NAT instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=str, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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=str, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=False)""",
        })

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

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


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /nat/instances/instance/state/counters (container)

    YANG Description: Counters for NAT instance operations.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /nat/instances/instance/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: Counters for NAT instance operations.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_nat__nat_instances_instance_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/nat', defining_module='openconfig-nat', 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_nat__nat_instances_instance_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/nat', defining_module='openconfig-nat', 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_nat__nat_instances_instance_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)

  name = __builtin__.property(_get_name)
  type = __builtin__.property(_get_type)
  address_family = __builtin__.property(_get_address_family)
  description = __builtin__.property(_get_description)
  counters = __builtin__.property(_get_counters)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ('address_family', address_family), ('description', description), ('counters', counters), ])


class yc_config_openconfig_nat__nat_instances_instance_interfaces_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-nat - based on the path /nat/instances/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 for the NAT interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface','__type',)

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

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__interface = YANGDynClass(base=str, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='oc-if:base-interface-ref', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'INSIDE': {}, 'OUTSIDE': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='interface-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 ['nat', 'instances', 'instance', 'interfaces', 'interface', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /nat/instances/instance/interfaces/interface/config/interface (oc-if:base-interface-ref)

    YANG Description: Reference to the interface.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /nat/instances/instance/interfaces/interface/config/interface (oc-if: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 the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=str, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='oc-if:base-interface-ref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface must be of a type compatible with oc-if:base-interface-ref""",
          'defined-type': "oc-if:base-interface-ref",
          'generated-type': """YANGDynClass(base=str, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='oc-if:base-interface-ref', is_config=True)""",
        })

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

  def _unset_interface(self):
    self.__interface = YANGDynClass(base=str, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='oc-if:base-interface-ref', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /nat/instances/instance/interfaces/interface/config/type (interface-type)

    YANG Description: Type of NAT interface - inside or outside.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /nat/instances/instance/interfaces/interface/config/type (interface-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: Type of NAT interface - inside or outside.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'INSIDE': {}, 'OUTSIDE': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='interface-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with interface-type""",
          'defined-type': "openconfig-nat:interface-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'INSIDE': {}, 'OUTSIDE': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='interface-type', is_config=True)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'INSIDE': {}, 'OUTSIDE': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='interface-type', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)
  type = __builtin__.property(_get_type, _set_type)


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


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

  YANG Description: Counters for NAT interface operations.
  """
  __slots__ = ('_path_helper', '_extmethods', '__packets_translated','__bytes_translated','__translation_errors',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/nat'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__packets_translated = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets-translated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    self.__bytes_translated = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bytes-translated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    self.__translation_errors = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="translation-errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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 ['nat', 'instances', 'instance', 'interfaces', 'interface', 'state', 'counters']

  def _get_packets_translated(self):
    """
    Getter method for packets_translated, mapped from YANG variable /nat/instances/instance/interfaces/interface/state/counters/packets_translated (yang:counter64)

    YANG Description: Number of packets that have been translated.
    """
    return self.__packets_translated
      
  def _set_packets_translated(self, v, load=False):
    """
    Setter method for packets_translated, mapped from YANG variable /nat/instances/instance/interfaces/interface/state/counters/packets_translated (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_packets_translated is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_packets_translated() directly.

    YANG Description: Number of packets that have been translated.
    """
    if hasattr(v, "_utype"):
      v = v._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-translated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """packets_translated 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-translated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)""",
        })

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

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


  def _get_bytes_translated(self):
    """
    Getter method for bytes_translated, mapped from YANG variable /nat/instances/instance/interfaces/interface/state/counters/bytes_translated (yang:counter64)

    YANG Description: Number of bytes that have been translated.
    """
    return self.__bytes_translated
      
  def _set_bytes_translated(self, v, load=False):
    """
    Setter method for bytes_translated, mapped from YANG variable /nat/instances/instance/interfaces/interface/state/counters/bytes_translated (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bytes_translated is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bytes_translated() directly.

    YANG Description: Number of bytes that have been translated.
    """
    if hasattr(v, "_utype"):
      v = v._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-translated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bytes_translated 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-translated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)""",
        })

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

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


  def _get_translation_errors(self):
    """
    Getter method for translation_errors, mapped from YANG variable /nat/instances/instance/interfaces/interface/state/counters/translation_errors (yang:counter64)

    YANG Description: Number of translation errors encountered.
    """
    return self.__translation_errors
      
  def _set_translation_errors(self, v, load=False):
    """
    Setter method for translation_errors, mapped from YANG variable /nat/instances/instance/interfaces/interface/state/counters/translation_errors (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_translation_errors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_translation_errors() directly.

    YANG Description: Number of translation errors encountered.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="translation-errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """translation_errors 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="translation-errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)""",
        })

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

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

  packets_translated = __builtin__.property(_get_packets_translated)
  bytes_translated = __builtin__.property(_get_bytes_translated)
  translation_errors = __builtin__.property(_get_translation_errors)


  _pyangbind_elements = OrderedDict([('packets_translated', packets_translated), ('bytes_translated', bytes_translated), ('translation_errors', translation_errors), ])


class yc_state_openconfig_nat__nat_instances_instance_interfaces_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-nat - based on the path /nat/instances/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 data for the NAT interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface','__type','__counters',)

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

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__interface = YANGDynClass(base=str, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='oc-if:base-interface-ref', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'INSIDE': {}, 'OUTSIDE': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='interface-type', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_nat__nat_instances_instance_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['nat', 'instances', 'instance', 'interfaces', 'interface', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /nat/instances/instance/interfaces/interface/state/interface (oc-if:base-interface-ref)

    YANG Description: Reference to the interface.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /nat/instances/instance/interfaces/interface/state/interface (oc-if: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 the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=str, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='oc-if:base-interface-ref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface must be of a type compatible with oc-if:base-interface-ref""",
          'defined-type': "oc-if:base-interface-ref",
          'generated-type': """YANGDynClass(base=str, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='oc-if:base-interface-ref', is_config=False)""",
        })

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

  def _unset_interface(self):
    self.__interface = YANGDynClass(base=str, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='oc-if:base-interface-ref', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /nat/instances/instance/interfaces/interface/state/type (interface-type)

    YANG Description: Type of NAT interface - inside or outside.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /nat/instances/instance/interfaces/interface/state/type (interface-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: Type of NAT interface - inside or outside.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'INSIDE': {}, 'OUTSIDE': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='interface-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with interface-type""",
          'defined-type': "openconfig-nat:interface-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'INSIDE': {}, 'OUTSIDE': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='interface-type', is_config=False)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'INSIDE': {}, 'OUTSIDE': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='interface-type', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /nat/instances/instance/interfaces/interface/state/counters (container)

    YANG Description: Counters for NAT interface operations.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /nat/instances/instance/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: Counters for NAT interface operations.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_nat__nat_instances_instance_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/nat', defining_module='openconfig-nat', 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_nat__nat_instances_instance_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/nat', defining_module='openconfig-nat', 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_nat__nat_instances_instance_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)

  interface = __builtin__.property(_get_interface)
  type = __builtin__.property(_get_type)
  counters = __builtin__.property(_get_counters)


  _pyangbind_elements = OrderedDict([('interface', interface), ('type', type), ('counters', counters), ])


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

  YANG Description: List of interfaces participating in NAT.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface','__config','__state',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/nat'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__interface = YANGDynClass(base=str, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_nat__nat_instances_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_nat__nat_instances_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['nat', 'instances', 'instance', 'interfaces', 'interface']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /nat/instances/instance/interfaces/interface/interface (leafref)

    YANG Description: Reference to interface list key.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /nat/instances/instance/interfaces/interface/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 interface 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=str, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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=str, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=True)""",
        })

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

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


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

    YANG Description: Configuration parameters for the NAT interface.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /nat/instances/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 for the NAT interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_nat__nat_instances_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_nat__nat_instances_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_nat__nat_instances_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)


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

    YANG Description: Operational state data for the NAT interface.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /nat/instances/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 data for the NAT interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_nat__nat_instances_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_nat__nat_instances_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_nat__nat_instances_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)

  interface = __builtin__.property(_get_interface, _set_interface)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state)


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


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

  YANG Description: Interface configuration and state for NAT.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'interfaces'
  _yang_namespace = 'http://openconfig.net/yang/nat'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__interface = YANGDynClass(base=YANGListType("interface",yc_interface_openconfig_nat__nat_instances_instance_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface', 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/nat', defining_module='openconfig-nat', 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 ['nat', 'instances', 'instance', 'interfaces']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /nat/instances/instance/interfaces/interface (list)

    YANG Description: List of interfaces participating in NAT.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /nat/instances/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: List of interfaces participating in NAT.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("interface",yc_interface_openconfig_nat__nat_instances_instance_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface', 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/nat', defining_module='openconfig-nat', 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",yc_interface_openconfig_nat__nat_instances_instance_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface', 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/nat', defining_module='openconfig-nat', 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",yc_interface_openconfig_nat__nat_instances_instance_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface', 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/nat', defining_module='openconfig-nat', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


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


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

  YANG Description: Configuration parameters for the dynamic NAT pool.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__start_address','__end_address','__prefix_length','__port_range_start','__port_range_end','__port_block_size','__acl_set','__max_translations','__address_only','__timeout','__tcp_timeout','__udp_timeout','__icmp_timeout','__overload','__log_translations','__max_translations_per_address',)

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

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=str, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=True)
    self.__start_address = YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="start-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=True)
    self.__end_address = YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="end-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=True)
    self.__prefix_length = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..128']}), 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/nat', defining_module='openconfig-nat', yang_type='uint8', is_config=True)
    self.__port_range_start = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="port-range-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=True)
    self.__port_range_end = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="port-range-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=True)
    self.__port_block_size = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="port-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint16', is_config=True)
    self.__acl_set = YANGDynClass(base=str, is_leaf=True, yang_name="acl-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=True)
    self.__max_translations = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint64', is_config=True)
    self.__address_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="address-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=True)
    self.__timeout = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)
    self.__tcp_timeout = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="tcp-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)
    self.__udp_timeout = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="udp-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)
    self.__icmp_timeout = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="icmp-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)
    self.__overload = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="overload", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=True)
    self.__log_translations = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="log-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=True)
    self.__max_translations_per_address = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-translations-per-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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 ['nat', 'instances', 'instance', 'dynamic', 'pool', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/name (string)

    YANG Description: Unique name for the dynamic NAT pool.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Unique name for the dynamic NAT pool.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=str, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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=str, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=True)""",
        })

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

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


  def _get_start_address(self):
    """
    Getter method for start_address, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/start_address (inet:ip-address)

    YANG Description: Starting IP address of the address range. Must match the
address family configured for the NAT instance.
    """
    return self.__start_address
      
  def _set_start_address(self, v, load=False):
    """
    Setter method for start_address, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/start_address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_start_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_start_address() directly.

    YANG Description: Starting IP address of the address range. Must match the
address family configured for the NAT instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="start-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """start_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="start-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=True)""",
        })

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

  def _unset_start_address(self):
    self.__start_address = YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="start-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=True)


  def _get_end_address(self):
    """
    Getter method for end_address, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/end_address (inet:ip-address)

    YANG Description: Ending IP address of the address range. Must match the
address family configured for the NAT instance.
    """
    return self.__end_address
      
  def _set_end_address(self, v, load=False):
    """
    Setter method for end_address, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/end_address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_end_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_end_address() directly.

    YANG Description: Ending IP address of the address range. Must match the
address family configured for the NAT instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="end-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """end_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="end-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=True)""",
        })

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

  def _unset_end_address(self):
    self.__end_address = YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="end-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=True)


  def _get_prefix_length(self):
    """
    Getter method for prefix_length, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/prefix_length (uint8)

    YANG Description: Prefix length for the address range. For IPv4, valid range
is 1-32. For IPv6, valid range is 1-128.
    """
    return self.__prefix_length
      
  def _set_prefix_length(self, v, load=False):
    """
    Setter method for prefix_length, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/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: Prefix length for the address range. For IPv4, valid range
is 1-32. For IPv6, valid range is 1-128.
    """
    if hasattr(v, "_utype"):
      v = v._utype(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..128']}), 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/nat', defining_module='openconfig-nat', yang_type='uint8', is_config=True)
    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': ['1..128']}), 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/nat', defining_module='openconfig-nat', yang_type='uint8', is_config=True)""",
        })

    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': ['1..128']}), 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/nat', defining_module='openconfig-nat', yang_type='uint8', is_config=True)


  def _get_port_range_start(self):
    """
    Getter method for port_range_start, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/port_range_start (inet:port-number)

    YANG Description: Starting port number for NAPT translations.
    """
    return self.__port_range_start
      
  def _set_port_range_start(self, v, load=False):
    """
    Setter method for port_range_start, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/port_range_start (inet:port-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_port_range_start is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_port_range_start() directly.

    YANG Description: Starting port number for NAPT translations.
    """
    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..65535']}), is_leaf=True, yang_name="port-range-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """port_range_start must be of a type compatible with inet:port-number""",
          'defined-type': "inet:port-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="port-range-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=True)""",
        })

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

  def _unset_port_range_start(self):
    self.__port_range_start = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="port-range-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=True)


  def _get_port_range_end(self):
    """
    Getter method for port_range_end, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/port_range_end (inet:port-number)

    YANG Description: Ending port number for NAPT translations.
    """
    return self.__port_range_end
      
  def _set_port_range_end(self, v, load=False):
    """
    Setter method for port_range_end, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/port_range_end (inet:port-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_port_range_end is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_port_range_end() directly.

    YANG Description: Ending port number for NAPT translations.
    """
    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..65535']}), is_leaf=True, yang_name="port-range-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """port_range_end must be of a type compatible with inet:port-number""",
          'defined-type': "inet:port-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="port-range-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=True)""",
        })

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

  def _unset_port_range_end(self):
    self.__port_range_end = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="port-range-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=True)


  def _get_port_block_size(self):
    """
    Getter method for port_block_size, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/port_block_size (uint16)

    YANG Description: Number of ports allocated per mapping.
    """
    return self.__port_block_size
      
  def _set_port_block_size(self, v, load=False):
    """
    Setter method for port_block_size, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/port_block_size (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_port_block_size is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_port_block_size() directly.

    YANG Description: Number of ports allocated per mapping.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="port-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """port_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="port-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_port_block_size(self):
    self.__port_block_size = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="port-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint16', is_config=True)


  def _get_acl_set(self):
    """
    Getter method for acl_set, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/acl_set (leafref)

    YANG Description: Reference to ACL set that defines traffic
eligible for this dynamic NAT pool.
    """
    return self.__acl_set
      
  def _set_acl_set(self, v, load=False):
    """
    Setter method for acl_set, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/acl_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_acl_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_acl_set() directly.

    YANG Description: Reference to ACL set that defines traffic
eligible for this dynamic NAT pool.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=str, is_leaf=True, yang_name="acl-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """acl_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=str, is_leaf=True, yang_name="acl-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_acl_set(self):
    self.__acl_set = YANGDynClass(base=str, is_leaf=True, yang_name="acl-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=True)


  def _get_max_translations(self):
    """
    Getter method for max_translations, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/max_translations (uint64)

    YANG Description: Maximum number of concurrent translations for this dynamic
NAT pool. When this threshold is reached, new translation
requests are dropped until the number of active translations
falls below this limit.
    """
    return self.__max_translations
      
  def _set_max_translations(self, v, load=False):
    """
    Setter method for max_translations, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/max_translations (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_translations is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_translations() directly.

    YANG Description: Maximum number of concurrent translations for this dynamic
NAT pool. When this threshold is reached, new translation
requests are dropped until the number of active translations
falls below this limit.
    """
    if hasattr(v, "_utype"):
      v = v._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-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_translations must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint64', is_config=True)""",
        })

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

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


  def _get_address_only(self):
    """
    Getter method for address_only, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/address_only (boolean)

    YANG Description: Enable address-only translation without port translation.
    """
    return self.__address_only
      
  def _set_address_only(self, v, load=False):
    """
    Setter method for address_only, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/address_only (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_only is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_only() directly.

    YANG Description: Enable address-only translation without port translation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="address-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_only must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="address-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_address_only(self):
    self.__address_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="address-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=True)


  def _get_timeout(self):
    """
    Getter method for timeout, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/timeout (uint32)

    YANG Description: Default time a NAT translation entry remains active
without traffic. Applies to all traffic unless specific
protocol timeouts (TCP, UDP, ICMP) are configured.
    """
    return self.__timeout
      
  def _set_timeout(self, v, load=False):
    """
    Setter method for timeout, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/timeout (uint32)
    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: Default time a NAT translation entry remains active
without traffic. Applies to all traffic unless specific
protocol timeouts (TCP, UDP, ICMP) are configured.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """timeout must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', 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..4294967295']}, int_size=32), is_leaf=True, yang_name="timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)


  def _get_tcp_timeout(self):
    """
    Getter method for tcp_timeout, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/tcp_timeout (uint32)

    YANG Description: Time a TCP NAT translation entry remains active
without traffic.
    """
    return self.__tcp_timeout
      
  def _set_tcp_timeout(self, v, load=False):
    """
    Setter method for tcp_timeout, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/tcp_timeout (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tcp_timeout is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tcp_timeout() directly.

    YANG Description: Time a TCP NAT translation entry remains active
without 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="tcp-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tcp_timeout must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="tcp-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_tcp_timeout(self):
    self.__tcp_timeout = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="tcp-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)


  def _get_udp_timeout(self):
    """
    Getter method for udp_timeout, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/udp_timeout (uint32)

    YANG Description: Time a UDP NAT translation entry remains active
without traffic.
    """
    return self.__udp_timeout
      
  def _set_udp_timeout(self, v, load=False):
    """
    Setter method for udp_timeout, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/udp_timeout (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_udp_timeout is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_udp_timeout() directly.

    YANG Description: Time a UDP NAT translation entry remains active
without 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="udp-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """udp_timeout must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="udp-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_udp_timeout(self):
    self.__udp_timeout = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="udp-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)


  def _get_icmp_timeout(self):
    """
    Getter method for icmp_timeout, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/icmp_timeout (uint32)

    YANG Description: Time an ICMP NAT translation entry remains active
without traffic.
    """
    return self.__icmp_timeout
      
  def _set_icmp_timeout(self, v, load=False):
    """
    Setter method for icmp_timeout, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/icmp_timeout (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_icmp_timeout is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_icmp_timeout() directly.

    YANG Description: Time an ICMP NAT translation entry remains active
without 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="icmp-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """icmp_timeout must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="icmp-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_icmp_timeout(self):
    self.__icmp_timeout = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="icmp-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)


  def _get_overload(self):
    """
    Getter method for overload, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/overload (boolean)

    YANG Description: Enable port overloading (PAT) allowing multiple internal
addresses to share the same external address with
different ports.
    """
    return self.__overload
      
  def _set_overload(self, v, load=False):
    """
    Setter method for overload, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/overload (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_overload is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_overload() directly.

    YANG Description: Enable port overloading (PAT) allowing multiple internal
addresses to share the same external address with
different ports.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="overload", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """overload must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="overload", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_overload(self):
    self.__overload = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="overload", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=True)


  def _get_log_translations(self):
    """
    Getter method for log_translations, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/log_translations (boolean)

    YANG Description: Enable logging of NAT translations.
    """
    return self.__log_translations
      
  def _set_log_translations(self, v, load=False):
    """
    Setter method for log_translations, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/log_translations (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_log_translations is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_log_translations() directly.

    YANG Description: Enable logging of NAT translations.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="log-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """log_translations must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="log-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_log_translations(self):
    self.__log_translations = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="log-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=True)


  def _get_max_translations_per_address(self):
    """
    Getter method for max_translations_per_address, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/max_translations_per_address (uint32)

    YANG Description: Maximum number of concurrent translations per external
address.
    """
    return self.__max_translations_per_address
      
  def _set_max_translations_per_address(self, v, load=False):
    """
    Setter method for max_translations_per_address, mapped from YANG variable /nat/instances/instance/dynamic/pool/config/max_translations_per_address (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_translations_per_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_translations_per_address() directly.

    YANG Description: Maximum number of concurrent translations per external
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="max-translations-per-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_translations_per_address must be of a type compatible with uint32""",
          '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-translations-per-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_max_translations_per_address(self):
    self.__max_translations_per_address = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-translations-per-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  start_address = __builtin__.property(_get_start_address, _set_start_address)
  end_address = __builtin__.property(_get_end_address, _set_end_address)
  prefix_length = __builtin__.property(_get_prefix_length, _set_prefix_length)
  port_range_start = __builtin__.property(_get_port_range_start, _set_port_range_start)
  port_range_end = __builtin__.property(_get_port_range_end, _set_port_range_end)
  port_block_size = __builtin__.property(_get_port_block_size, _set_port_block_size)
  acl_set = __builtin__.property(_get_acl_set, _set_acl_set)
  max_translations = __builtin__.property(_get_max_translations, _set_max_translations)
  address_only = __builtin__.property(_get_address_only, _set_address_only)
  timeout = __builtin__.property(_get_timeout, _set_timeout)
  tcp_timeout = __builtin__.property(_get_tcp_timeout, _set_tcp_timeout)
  udp_timeout = __builtin__.property(_get_udp_timeout, _set_udp_timeout)
  icmp_timeout = __builtin__.property(_get_icmp_timeout, _set_icmp_timeout)
  overload = __builtin__.property(_get_overload, _set_overload)
  log_translations = __builtin__.property(_get_log_translations, _set_log_translations)
  max_translations_per_address = __builtin__.property(_get_max_translations_per_address, _set_max_translations_per_address)


  _pyangbind_elements = OrderedDict([('name', name), ('start_address', start_address), ('end_address', end_address), ('prefix_length', prefix_length), ('port_range_start', port_range_start), ('port_range_end', port_range_end), ('port_block_size', port_block_size), ('acl_set', acl_set), ('max_translations', max_translations), ('address_only', address_only), ('timeout', timeout), ('tcp_timeout', tcp_timeout), ('udp_timeout', udp_timeout), ('icmp_timeout', icmp_timeout), ('overload', overload), ('log_translations', log_translations), ('max_translations_per_address', max_translations_per_address), ])


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

  YANG Description: Counters for dynamic NAT pool operations.
  """
  __slots__ = ('_path_helper', '_extmethods', '__allocated_addresses','__available_addresses','__active_translations','__acl_hit_count',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/nat'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__allocated_addresses = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="allocated-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter32', is_config=False)
    self.__available_addresses = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="available-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter32', is_config=False)
    self.__active_translations = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    self.__acl_hit_count = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="acl-hit-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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 ['nat', 'instances', 'instance', 'dynamic', 'pool', 'state', 'counters']

  def _get_allocated_addresses(self):
    """
    Getter method for allocated_addresses, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/counters/allocated_addresses (yang:counter32)

    YANG Description: Number of addresses currently allocated from this
dynamic NAT pool.
    """
    return self.__allocated_addresses
      
  def _set_allocated_addresses(self, v, load=False):
    """
    Setter method for allocated_addresses, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/counters/allocated_addresses (yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_allocated_addresses is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_allocated_addresses() directly.

    YANG Description: Number of addresses currently allocated from this
dynamic NAT pool.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="allocated-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """allocated_addresses must be of a type compatible with yang:counter32""",
          'defined-type': "yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="allocated-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter32', is_config=False)""",
        })

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

  def _unset_allocated_addresses(self):
    self.__allocated_addresses = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="allocated-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter32', is_config=False)


  def _get_available_addresses(self):
    """
    Getter method for available_addresses, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/counters/available_addresses (yang:counter32)

    YANG Description: Number of addresses available in this dynamic NAT pool.
    """
    return self.__available_addresses
      
  def _set_available_addresses(self, v, load=False):
    """
    Setter method for available_addresses, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/counters/available_addresses (yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_available_addresses is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_available_addresses() directly.

    YANG Description: Number of addresses available in this dynamic NAT pool.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="available-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """available_addresses must be of a type compatible with yang:counter32""",
          'defined-type': "yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="available-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter32', is_config=False)""",
        })

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

  def _unset_available_addresses(self):
    self.__available_addresses = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="available-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter32', is_config=False)


  def _get_active_translations(self):
    """
    Getter method for active_translations, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/counters/active_translations (yang:counter64)

    YANG Description: Number of currently active translations using this
dynamic NAT pool.
    """
    return self.__active_translations
      
  def _set_active_translations(self, v, load=False):
    """
    Setter method for active_translations, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/counters/active_translations (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active_translations is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active_translations() directly.

    YANG Description: Number of currently active translations using this
dynamic NAT pool.
    """
    if hasattr(v, "_utype"):
      v = v._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-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active_translations 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="active-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)""",
        })

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

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


  def _get_acl_hit_count(self):
    """
    Getter method for acl_hit_count, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/counters/acl_hit_count (yang:counter64)

    YANG Description: Number of packets matching the ACL set.
    """
    return self.__acl_hit_count
      
  def _set_acl_hit_count(self, v, load=False):
    """
    Setter method for acl_hit_count, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/counters/acl_hit_count (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_acl_hit_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_acl_hit_count() directly.

    YANG Description: Number of packets matching the ACL 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="acl-hit-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """acl_hit_count 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="acl-hit-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_acl_hit_count(self):
    self.__acl_hit_count = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="acl-hit-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)

  allocated_addresses = __builtin__.property(_get_allocated_addresses)
  available_addresses = __builtin__.property(_get_available_addresses)
  active_translations = __builtin__.property(_get_active_translations)
  acl_hit_count = __builtin__.property(_get_acl_hit_count)


  _pyangbind_elements = OrderedDict([('allocated_addresses', allocated_addresses), ('available_addresses', available_addresses), ('active_translations', active_translations), ('acl_hit_count', acl_hit_count), ])


class yc_state_openconfig_nat__nat_instances_instance_dynamic_pool_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-nat - based on the path /nat/instances/instance/dynamic/pool/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 dynamic NAT pool.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__start_address','__end_address','__prefix_length','__port_range_start','__port_range_end','__port_block_size','__acl_set','__max_translations','__address_only','__timeout','__tcp_timeout','__udp_timeout','__icmp_timeout','__overload','__log_translations','__max_translations_per_address','__counters',)

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

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=str, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=False)
    self.__start_address = YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="start-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)
    self.__end_address = YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="end-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', 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': ['1..128']}), 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/nat', defining_module='openconfig-nat', yang_type='uint8', is_config=False)
    self.__port_range_start = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="port-range-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)
    self.__port_range_end = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="port-range-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)
    self.__port_block_size = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="port-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint16', is_config=False)
    self.__acl_set = YANGDynClass(base=str, is_leaf=True, yang_name="acl-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=False)
    self.__max_translations = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint64', is_config=False)
    self.__address_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="address-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=False)
    self.__timeout = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)
    self.__tcp_timeout = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="tcp-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)
    self.__udp_timeout = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="udp-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)
    self.__icmp_timeout = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="icmp-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)
    self.__overload = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="overload", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=False)
    self.__log_translations = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="log-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=False)
    self.__max_translations_per_address = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-translations-per-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_nat__nat_instances_instance_dynamic_pool_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['nat', 'instances', 'instance', 'dynamic', 'pool', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/name (string)

    YANG Description: Unique name for the dynamic NAT pool.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Unique name for the dynamic NAT pool.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=str, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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=str, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=False)""",
        })

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

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


  def _get_start_address(self):
    """
    Getter method for start_address, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/start_address (inet:ip-address)

    YANG Description: Starting IP address of the address range. Must match the
address family configured for the NAT instance.
    """
    return self.__start_address
      
  def _set_start_address(self, v, load=False):
    """
    Setter method for start_address, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/start_address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_start_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_start_address() directly.

    YANG Description: Starting IP address of the address range. Must match the
address family configured for the NAT instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="start-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """start_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="start-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)""",
        })

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

  def _unset_start_address(self):
    self.__start_address = YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="start-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)


  def _get_end_address(self):
    """
    Getter method for end_address, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/end_address (inet:ip-address)

    YANG Description: Ending IP address of the address range. Must match the
address family configured for the NAT instance.
    """
    return self.__end_address
      
  def _set_end_address(self, v, load=False):
    """
    Setter method for end_address, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/end_address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_end_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_end_address() directly.

    YANG Description: Ending IP address of the address range. Must match the
address family configured for the NAT instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="end-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """end_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="end-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)""",
        })

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

  def _unset_end_address(self):
    self.__end_address = YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="end-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)


  def _get_prefix_length(self):
    """
    Getter method for prefix_length, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/prefix_length (uint8)

    YANG Description: Prefix length for the address range. For IPv4, valid range
is 1-32. For IPv6, valid range is 1-128.
    """
    return self.__prefix_length
      
  def _set_prefix_length(self, v, load=False):
    """
    Setter method for prefix_length, mapped from YANG variable /nat/instances/instance/dynamic/pool/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: Prefix length for the address range. For IPv4, valid range
is 1-32. For IPv6, valid range is 1-128.
    """
    if hasattr(v, "_utype"):
      v = v._utype(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..128']}), 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/nat', defining_module='openconfig-nat', 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': ['1..128']}), 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/nat', defining_module='openconfig-nat', 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': ['1..128']}), 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/nat', defining_module='openconfig-nat', yang_type='uint8', is_config=False)


  def _get_port_range_start(self):
    """
    Getter method for port_range_start, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/port_range_start (inet:port-number)

    YANG Description: Starting port number for NAPT translations.
    """
    return self.__port_range_start
      
  def _set_port_range_start(self, v, load=False):
    """
    Setter method for port_range_start, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/port_range_start (inet:port-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_port_range_start is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_port_range_start() directly.

    YANG Description: Starting port number for NAPT translations.
    """
    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..65535']}), is_leaf=True, yang_name="port-range-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """port_range_start must be of a type compatible with inet:port-number""",
          'defined-type': "inet:port-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="port-range-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)""",
        })

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

  def _unset_port_range_start(self):
    self.__port_range_start = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="port-range-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)


  def _get_port_range_end(self):
    """
    Getter method for port_range_end, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/port_range_end (inet:port-number)

    YANG Description: Ending port number for NAPT translations.
    """
    return self.__port_range_end
      
  def _set_port_range_end(self, v, load=False):
    """
    Setter method for port_range_end, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/port_range_end (inet:port-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_port_range_end is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_port_range_end() directly.

    YANG Description: Ending port number for NAPT translations.
    """
    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..65535']}), is_leaf=True, yang_name="port-range-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """port_range_end must be of a type compatible with inet:port-number""",
          'defined-type': "inet:port-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="port-range-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)""",
        })

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

  def _unset_port_range_end(self):
    self.__port_range_end = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="port-range-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)


  def _get_port_block_size(self):
    """
    Getter method for port_block_size, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/port_block_size (uint16)

    YANG Description: Number of ports allocated per mapping.
    """
    return self.__port_block_size
      
  def _set_port_block_size(self, v, load=False):
    """
    Setter method for port_block_size, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/port_block_size (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_port_block_size is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_port_block_size() directly.

    YANG Description: Number of ports allocated per mapping.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="port-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """port_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="port-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_port_block_size(self):
    self.__port_block_size = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="port-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint16', is_config=False)


  def _get_acl_set(self):
    """
    Getter method for acl_set, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/acl_set (leafref)

    YANG Description: Reference to ACL set that defines traffic
eligible for this dynamic NAT pool.
    """
    return self.__acl_set
      
  def _set_acl_set(self, v, load=False):
    """
    Setter method for acl_set, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/acl_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_acl_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_acl_set() directly.

    YANG Description: Reference to ACL set that defines traffic
eligible for this dynamic NAT pool.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=str, is_leaf=True, yang_name="acl-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """acl_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=str, is_leaf=True, yang_name="acl-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_acl_set(self):
    self.__acl_set = YANGDynClass(base=str, is_leaf=True, yang_name="acl-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=False)


  def _get_max_translations(self):
    """
    Getter method for max_translations, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/max_translations (uint64)

    YANG Description: Maximum number of concurrent translations for this dynamic
NAT pool. When this threshold is reached, new translation
requests are dropped until the number of active translations
falls below this limit.
    """
    return self.__max_translations
      
  def _set_max_translations(self, v, load=False):
    """
    Setter method for max_translations, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/max_translations (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_translations is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_translations() directly.

    YANG Description: Maximum number of concurrent translations for this dynamic
NAT pool. When this threshold is reached, new translation
requests are dropped until the number of active translations
falls below this limit.
    """
    if hasattr(v, "_utype"):
      v = v._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-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_translations must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint64', is_config=False)""",
        })

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

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


  def _get_address_only(self):
    """
    Getter method for address_only, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/address_only (boolean)

    YANG Description: Enable address-only translation without port translation.
    """
    return self.__address_only
      
  def _set_address_only(self, v, load=False):
    """
    Setter method for address_only, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/address_only (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_only is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_only() directly.

    YANG Description: Enable address-only translation without port translation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="address-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_only must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="address-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_address_only(self):
    self.__address_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="address-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=False)


  def _get_timeout(self):
    """
    Getter method for timeout, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/timeout (uint32)

    YANG Description: Default time a NAT translation entry remains active
without traffic. Applies to all traffic unless specific
protocol timeouts (TCP, UDP, ICMP) are configured.
    """
    return self.__timeout
      
  def _set_timeout(self, v, load=False):
    """
    Setter method for timeout, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/timeout (uint32)
    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: Default time a NAT translation entry remains active
without traffic. Applies to all traffic unless specific
protocol timeouts (TCP, UDP, ICMP) are configured.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """timeout must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', 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..4294967295']}, int_size=32), is_leaf=True, yang_name="timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)


  def _get_tcp_timeout(self):
    """
    Getter method for tcp_timeout, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/tcp_timeout (uint32)

    YANG Description: Time a TCP NAT translation entry remains active
without traffic.
    """
    return self.__tcp_timeout
      
  def _set_tcp_timeout(self, v, load=False):
    """
    Setter method for tcp_timeout, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/tcp_timeout (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tcp_timeout is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tcp_timeout() directly.

    YANG Description: Time a TCP NAT translation entry remains active
without 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="tcp-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tcp_timeout must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="tcp-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)""",
        })

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

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


  def _get_udp_timeout(self):
    """
    Getter method for udp_timeout, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/udp_timeout (uint32)

    YANG Description: Time a UDP NAT translation entry remains active
without traffic.
    """
    return self.__udp_timeout
      
  def _set_udp_timeout(self, v, load=False):
    """
    Setter method for udp_timeout, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/udp_timeout (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_udp_timeout is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_udp_timeout() directly.

    YANG Description: Time a UDP NAT translation entry remains active
without 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="udp-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """udp_timeout must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="udp-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)""",
        })

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

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


  def _get_icmp_timeout(self):
    """
    Getter method for icmp_timeout, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/icmp_timeout (uint32)

    YANG Description: Time an ICMP NAT translation entry remains active
without traffic.
    """
    return self.__icmp_timeout
      
  def _set_icmp_timeout(self, v, load=False):
    """
    Setter method for icmp_timeout, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/icmp_timeout (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_icmp_timeout is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_icmp_timeout() directly.

    YANG Description: Time an ICMP NAT translation entry remains active
without 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="icmp-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """icmp_timeout must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="icmp-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)""",
        })

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

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


  def _get_overload(self):
    """
    Getter method for overload, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/overload (boolean)

    YANG Description: Enable port overloading (PAT) allowing multiple internal
addresses to share the same external address with
different ports.
    """
    return self.__overload
      
  def _set_overload(self, v, load=False):
    """
    Setter method for overload, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/overload (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_overload is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_overload() directly.

    YANG Description: Enable port overloading (PAT) allowing multiple internal
addresses to share the same external address with
different ports.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="overload", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """overload must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="overload", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_overload(self):
    self.__overload = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="overload", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=False)


  def _get_log_translations(self):
    """
    Getter method for log_translations, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/log_translations (boolean)

    YANG Description: Enable logging of NAT translations.
    """
    return self.__log_translations
      
  def _set_log_translations(self, v, load=False):
    """
    Setter method for log_translations, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/log_translations (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_log_translations is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_log_translations() directly.

    YANG Description: Enable logging of NAT translations.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="log-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """log_translations must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="log-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_log_translations(self):
    self.__log_translations = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="log-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='boolean', is_config=False)


  def _get_max_translations_per_address(self):
    """
    Getter method for max_translations_per_address, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/max_translations_per_address (uint32)

    YANG Description: Maximum number of concurrent translations per external
address.
    """
    return self.__max_translations_per_address
      
  def _set_max_translations_per_address(self, v, load=False):
    """
    Setter method for max_translations_per_address, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/max_translations_per_address (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_translations_per_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_translations_per_address() directly.

    YANG Description: Maximum number of concurrent translations per external
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="max-translations-per-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_translations_per_address must be of a type compatible with uint32""",
          '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-translations-per-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_max_translations_per_address(self):
    self.__max_translations_per_address = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-translations-per-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /nat/instances/instance/dynamic/pool/state/counters (container)

    YANG Description: Counters for dynamic NAT pool operations.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /nat/instances/instance/dynamic/pool/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: Counters for dynamic NAT pool operations.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_nat__nat_instances_instance_dynamic_pool_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/nat', defining_module='openconfig-nat', 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_nat__nat_instances_instance_dynamic_pool_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/nat', defining_module='openconfig-nat', 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_nat__nat_instances_instance_dynamic_pool_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)

  name = __builtin__.property(_get_name)
  start_address = __builtin__.property(_get_start_address)
  end_address = __builtin__.property(_get_end_address)
  prefix_length = __builtin__.property(_get_prefix_length)
  port_range_start = __builtin__.property(_get_port_range_start)
  port_range_end = __builtin__.property(_get_port_range_end)
  port_block_size = __builtin__.property(_get_port_block_size)
  acl_set = __builtin__.property(_get_acl_set)
  max_translations = __builtin__.property(_get_max_translations)
  address_only = __builtin__.property(_get_address_only)
  timeout = __builtin__.property(_get_timeout)
  tcp_timeout = __builtin__.property(_get_tcp_timeout)
  udp_timeout = __builtin__.property(_get_udp_timeout)
  icmp_timeout = __builtin__.property(_get_icmp_timeout)
  overload = __builtin__.property(_get_overload)
  log_translations = __builtin__.property(_get_log_translations)
  max_translations_per_address = __builtin__.property(_get_max_translations_per_address)
  counters = __builtin__.property(_get_counters)


  _pyangbind_elements = OrderedDict([('name', name), ('start_address', start_address), ('end_address', end_address), ('prefix_length', prefix_length), ('port_range_start', port_range_start), ('port_range_end', port_range_end), ('port_block_size', port_block_size), ('acl_set', acl_set), ('max_translations', max_translations), ('address_only', address_only), ('timeout', timeout), ('tcp_timeout', tcp_timeout), ('udp_timeout', udp_timeout), ('icmp_timeout', icmp_timeout), ('overload', overload), ('log_translations', log_translations), ('max_translations_per_address', max_translations_per_address), ('counters', counters), ])


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

  YANG Description: List of dynamic NAT pools.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'pool'
  _yang_namespace = 'http://openconfig.net/yang/nat'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=str, 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/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_nat__nat_instances_instance_dynamic_pool_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_nat__nat_instances_instance_dynamic_pool_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['nat', 'instances', 'instance', 'dynamic', 'pool']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /nat/instances/instance/dynamic/pool/name (leafref)

    YANG Description: Reference to dynamic NAT pool name.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /nat/instances/instance/dynamic/pool/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to dynamic NAT pool 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=str, 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/nat', defining_module='openconfig-nat', 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=str, 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/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=str, 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/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /nat/instances/instance/dynamic/pool/config (container)

    YANG Description: Configuration parameters for the dynamic NAT pool.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /nat/instances/instance/dynamic/pool/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is 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 dynamic NAT pool.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_nat__nat_instances_instance_dynamic_pool_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_nat__nat_instances_instance_dynamic_pool_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)""",
        })

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

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


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /nat/instances/instance/dynamic/pool/state (container)

    YANG Description: Operational state data for the dynamic NAT pool.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /nat/instances/instance/dynamic/pool/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is 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 dynamic NAT pool.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_nat__nat_instances_instance_dynamic_pool_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_nat__nat_instances_instance_dynamic_pool_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)""",
        })

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

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

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


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


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

  YANG Description: Dynamic NAT configuration and state.
  """
  __slots__ = ('_path_helper', '_extmethods', '__pool',)

  _yang_name = 'dynamic'
  _yang_namespace = 'http://openconfig.net/yang/nat'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__pool = YANGDynClass(base=YANGListType("name",yc_pool_openconfig_nat__nat_instances_instance_dynamic_pool, yang_name="pool", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="pool", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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 ['nat', 'instances', 'instance', 'dynamic']

  def _get_pool(self):
    """
    Getter method for pool, mapped from YANG variable /nat/instances/instance/dynamic/pool (list)

    YANG Description: List of dynamic NAT pools.
    """
    return self.__pool
      
  def _set_pool(self, v, load=False):
    """
    Setter method for pool, mapped from YANG variable /nat/instances/instance/dynamic/pool (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pool is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pool() directly.

    YANG Description: List of dynamic NAT pools.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_pool_openconfig_nat__nat_instances_instance_dynamic_pool, yang_name="pool", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="pool", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pool must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_pool_openconfig_nat__nat_instances_instance_dynamic_pool, yang_name="pool", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="pool", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='list', is_config=True)""",
        })

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

  def _unset_pool(self):
    self.__pool = YANGDynClass(base=YANGListType("name",yc_pool_openconfig_nat__nat_instances_instance_dynamic_pool, yang_name="pool", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="pool", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='list', is_config=True)

  pool = __builtin__.property(_get_pool, _set_pool)


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


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

  YANG Description: Configuration parameters for the static NAT mapping.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type','__internal_address','__external_address','__internal_port','__external_port','__protocol','__acl_set','__max_translations',)

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

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=str, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=str, restriction_type="dict_key", restriction_arg={'SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='identityref', is_config=True)
    self.__internal_address = YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="internal-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=True)
    self.__external_address = YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="external-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=True)
    self.__internal_port = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="internal-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=True)
    self.__external_port = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="external-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=True)
    self.__protocol = YANGDynClass(base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'TCP': {}, 'UDP': {}, 'ICMP': {}, 'ALL': {}},), is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='protocol-type', is_config=True)
    self.__acl_set = YANGDynClass(base=str, is_leaf=True, yang_name="acl-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=True)
    self.__max_translations = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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 ['nat', 'instances', 'instance', 'static', 'mapping', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /nat/instances/instance/static/mapping/config/name (string)

    YANG Description: Unique name for the static NAT mapping.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /nat/instances/instance/static/mapping/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Unique name for the static NAT mapping.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=str, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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=str, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=True)""",
        })

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

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


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /nat/instances/instance/static/mapping/config/type (identityref)

    YANG Description: Type of static NAT: source or destination.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /nat/instances/instance/static/mapping/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: Type of static NAT: source or destination.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=str, restriction_type="dict_key", restriction_arg={'SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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-nat:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=str, restriction_type="dict_key", restriction_arg={'SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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=str, restriction_type="dict_key", restriction_arg={'SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='identityref', is_config=True)


  def _get_internal_address(self):
    """
    Getter method for internal_address, mapped from YANG variable /nat/instances/instance/static/mapping/config/internal_address (inet:ip-address)

    YANG Description: Internal (source) IP address. Must match the address
family configured for the NAT instance.
    """
    return self.__internal_address
      
  def _set_internal_address(self, v, load=False):
    """
    Setter method for internal_address, mapped from YANG variable /nat/instances/instance/static/mapping/config/internal_address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_internal_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_internal_address() directly.

    YANG Description: Internal (source) IP address. Must match the address
family configured for the NAT instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="internal-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """internal_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="internal-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=True)""",
        })

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

  def _unset_internal_address(self):
    self.__internal_address = YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="internal-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=True)


  def _get_external_address(self):
    """
    Getter method for external_address, mapped from YANG variable /nat/instances/instance/static/mapping/config/external_address (inet:ip-address)

    YANG Description: External (destination) IP address. Must match the address
family configured for the NAT instance.
    """
    return self.__external_address
      
  def _set_external_address(self, v, load=False):
    """
    Setter method for external_address, mapped from YANG variable /nat/instances/instance/static/mapping/config/external_address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_external_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_external_address() directly.

    YANG Description: External (destination) IP address. Must match the address
family configured for the NAT instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="external-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """external_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="external-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=True)""",
        })

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

  def _unset_external_address(self):
    self.__external_address = YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="external-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=True)


  def _get_internal_port(self):
    """
    Getter method for internal_port, mapped from YANG variable /nat/instances/instance/static/mapping/config/internal_port (inet:port-number)

    YANG Description: Internal port number for static NAPT mappings. When
specified, this option enables port forwarding, where both
the IP address and the port are translated. If omitted,
only the IP address is translated.
    """
    return self.__internal_port
      
  def _set_internal_port(self, v, load=False):
    """
    Setter method for internal_port, mapped from YANG variable /nat/instances/instance/static/mapping/config/internal_port (inet:port-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_internal_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_internal_port() directly.

    YANG Description: Internal port number for static NAPT mappings. When
specified, this option enables port forwarding, where both
the IP address and the port are translated. If omitted,
only the IP address is translated.
    """
    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..65535']}), is_leaf=True, yang_name="internal-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """internal_port must be of a type compatible with inet:port-number""",
          'defined-type': "inet:port-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="internal-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=True)""",
        })

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

  def _unset_internal_port(self):
    self.__internal_port = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="internal-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=True)


  def _get_external_port(self):
    """
    Getter method for external_port, mapped from YANG variable /nat/instances/instance/static/mapping/config/external_port (inet:port-number)

    YANG Description: External port number for static NAPT mappings. When
specified, this option enables port forwarding, where both
the IP address and the port are translated. If omitted,
only the IP address is translated.
    """
    return self.__external_port
      
  def _set_external_port(self, v, load=False):
    """
    Setter method for external_port, mapped from YANG variable /nat/instances/instance/static/mapping/config/external_port (inet:port-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_external_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_external_port() directly.

    YANG Description: External port number for static NAPT mappings. When
specified, this option enables port forwarding, where both
the IP address and the port are translated. If omitted,
only the IP address is translated.
    """
    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..65535']}), is_leaf=True, yang_name="external-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """external_port must be of a type compatible with inet:port-number""",
          'defined-type': "inet:port-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="external-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=True)""",
        })

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

  def _unset_external_port(self):
    self.__external_port = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="external-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=True)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /nat/instances/instance/static/mapping/config/protocol (protocol-type)

    YANG Description: Protocol for the static NAT mapping.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /nat/instances/instance/static/mapping/config/protocol (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: Protocol for the static NAT mapping.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'TCP': {}, 'UDP': {}, 'ICMP': {}, 'ALL': {}},), is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='protocol-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with protocol-type""",
          'defined-type': "openconfig-nat:protocol-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'TCP': {}, 'UDP': {}, 'ICMP': {}, 'ALL': {}},), is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='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=str,                                     restriction_type="dict_key",                                     restriction_arg={'TCP': {}, 'UDP': {}, 'ICMP': {}, 'ALL': {}},), is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='protocol-type', is_config=True)


  def _get_acl_set(self):
    """
    Getter method for acl_set, mapped from YANG variable /nat/instances/instance/static/mapping/config/acl_set (leafref)

    YANG Description: Reference to ACL set for this static NAT mapping.
    """
    return self.__acl_set
      
  def _set_acl_set(self, v, load=False):
    """
    Setter method for acl_set, mapped from YANG variable /nat/instances/instance/static/mapping/config/acl_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_acl_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_acl_set() directly.

    YANG Description: Reference to ACL set for this static NAT mapping.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=str, is_leaf=True, yang_name="acl-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """acl_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=str, is_leaf=True, yang_name="acl-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_acl_set(self):
    self.__acl_set = YANGDynClass(base=str, is_leaf=True, yang_name="acl-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=True)


  def _get_max_translations(self):
    """
    Getter method for max_translations, mapped from YANG variable /nat/instances/instance/static/mapping/config/max_translations (uint64)

    YANG Description: Maximum number of concurrent translations for this static
NAT mapping. When this threshold is reached, new translation
requests using this mapping are dropped until the number of
active translations falls below this limit.
    """
    return self.__max_translations
      
  def _set_max_translations(self, v, load=False):
    """
    Setter method for max_translations, mapped from YANG variable /nat/instances/instance/static/mapping/config/max_translations (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_translations is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_translations() directly.

    YANG Description: Maximum number of concurrent translations for this static
NAT mapping. When this threshold is reached, new translation
requests using this mapping are dropped until the number of
active translations falls below this limit.
    """
    if hasattr(v, "_utype"):
      v = v._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-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_translations must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint64', is_config=True)""",
        })

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

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

  name = __builtin__.property(_get_name, _set_name)
  type = __builtin__.property(_get_type, _set_type)
  internal_address = __builtin__.property(_get_internal_address, _set_internal_address)
  external_address = __builtin__.property(_get_external_address, _set_external_address)
  internal_port = __builtin__.property(_get_internal_port, _set_internal_port)
  external_port = __builtin__.property(_get_external_port, _set_external_port)
  protocol = __builtin__.property(_get_protocol, _set_protocol)
  acl_set = __builtin__.property(_get_acl_set, _set_acl_set)
  max_translations = __builtin__.property(_get_max_translations, _set_max_translations)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ('internal_address', internal_address), ('external_address', external_address), ('internal_port', internal_port), ('external_port', external_port), ('protocol', protocol), ('acl_set', acl_set), ('max_translations', max_translations), ])


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

  YANG Description: Counters for static NAT mapping operations.
  """
  __slots__ = ('_path_helper', '_extmethods', '__active_translations','__packet_count','__byte_count','__acl_hit_count',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/nat'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__active_translations = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    self.__packet_count = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packet-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    self.__byte_count = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="byte-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    self.__acl_hit_count = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="acl-hit-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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 ['nat', 'instances', 'instance', 'static', 'mapping', 'state', 'counters']

  def _get_active_translations(self):
    """
    Getter method for active_translations, mapped from YANG variable /nat/instances/instance/static/mapping/state/counters/active_translations (yang:counter64)

    YANG Description: Number of currently active translations for this static
NAT mapping.
    """
    return self.__active_translations
      
  def _set_active_translations(self, v, load=False):
    """
    Setter method for active_translations, mapped from YANG variable /nat/instances/instance/static/mapping/state/counters/active_translations (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active_translations is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active_translations() directly.

    YANG Description: Number of currently active translations for this static
NAT mapping.
    """
    if hasattr(v, "_utype"):
      v = v._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-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active_translations 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="active-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)""",
        })

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

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


  def _get_packet_count(self):
    """
    Getter method for packet_count, mapped from YANG variable /nat/instances/instance/static/mapping/state/counters/packet_count (yang:counter64)

    YANG Description: Number of packets translated using this static NAT
mapping.
    """
    return self.__packet_count
      
  def _set_packet_count(self, v, load=False):
    """
    Setter method for packet_count, mapped from YANG variable /nat/instances/instance/static/mapping/state/counters/packet_count (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_packet_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_packet_count() directly.

    YANG Description: Number of packets translated using this static NAT
mapping.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packet-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """packet_count 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="packet-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)""",
        })

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

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


  def _get_byte_count(self):
    """
    Getter method for byte_count, mapped from YANG variable /nat/instances/instance/static/mapping/state/counters/byte_count (yang:counter64)

    YANG Description: Number of bytes translated using this static NAT mapping.
    """
    return self.__byte_count
      
  def _set_byte_count(self, v, load=False):
    """
    Setter method for byte_count, mapped from YANG variable /nat/instances/instance/static/mapping/state/counters/byte_count (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_byte_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_byte_count() directly.

    YANG Description: Number of bytes translated using this static NAT mapping.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="byte-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """byte_count 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="byte-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)""",
        })

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

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


  def _get_acl_hit_count(self):
    """
    Getter method for acl_hit_count, mapped from YANG variable /nat/instances/instance/static/mapping/state/counters/acl_hit_count (yang:counter64)

    YANG Description: Number of packets matching the ACL set.
    """
    return self.__acl_hit_count
      
  def _set_acl_hit_count(self, v, load=False):
    """
    Setter method for acl_hit_count, mapped from YANG variable /nat/instances/instance/static/mapping/state/counters/acl_hit_count (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_acl_hit_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_acl_hit_count() directly.

    YANG Description: Number of packets matching the ACL 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="acl-hit-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """acl_hit_count 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="acl-hit-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_acl_hit_count(self):
    self.__acl_hit_count = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="acl-hit-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)

  active_translations = __builtin__.property(_get_active_translations)
  packet_count = __builtin__.property(_get_packet_count)
  byte_count = __builtin__.property(_get_byte_count)
  acl_hit_count = __builtin__.property(_get_acl_hit_count)


  _pyangbind_elements = OrderedDict([('active_translations', active_translations), ('packet_count', packet_count), ('byte_count', byte_count), ('acl_hit_count', acl_hit_count), ])


class yc_state_openconfig_nat__nat_instances_instance_static_mapping_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-nat - based on the path /nat/instances/instance/static/mapping/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 NAT mapping.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type','__internal_address','__external_address','__internal_port','__external_port','__protocol','__acl_set','__max_translations','__creation_time','__last_used','__counters',)

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

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=str, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=str, restriction_type="dict_key", restriction_arg={'SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='identityref', is_config=False)
    self.__internal_address = YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="internal-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)
    self.__external_address = YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="external-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)
    self.__internal_port = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="internal-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)
    self.__external_port = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="external-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)
    self.__protocol = YANGDynClass(base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'TCP': {}, 'UDP': {}, 'ICMP': {}, 'ALL': {}},), is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='protocol-type', is_config=False)
    self.__acl_set = YANGDynClass(base=str, is_leaf=True, yang_name="acl-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=False)
    self.__max_translations = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint64', is_config=False)
    self.__creation_time = YANGDynClass(base=RestrictedClassType(base_type=str, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="creation-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:date-and-time', is_config=False)
    self.__last_used = YANGDynClass(base=RestrictedClassType(base_type=str, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="last-used", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:date-and-time', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_nat__nat_instances_instance_static_mapping_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['nat', 'instances', 'instance', 'static', 'mapping', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /nat/instances/instance/static/mapping/state/name (string)

    YANG Description: Unique name for the static NAT mapping.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /nat/instances/instance/static/mapping/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Unique name for the static NAT mapping.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=str, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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=str, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=False)""",
        })

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

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


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /nat/instances/instance/static/mapping/state/type (identityref)

    YANG Description: Type of static NAT: source or destination.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /nat/instances/instance/static/mapping/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 static NAT: source or destination.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=str, restriction_type="dict_key", restriction_arg={'SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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-nat:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=str, restriction_type="dict_key", restriction_arg={'SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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=str, restriction_type="dict_key", restriction_arg={'SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:SOURCE': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'openconfig-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}, 'oc-nat:DESTINATION': {'@module': 'openconfig-nat', '@namespace': 'http://openconfig.net/yang/nat'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='identityref', is_config=False)


  def _get_internal_address(self):
    """
    Getter method for internal_address, mapped from YANG variable /nat/instances/instance/static/mapping/state/internal_address (inet:ip-address)

    YANG Description: Internal (source) IP address. Must match the address
family configured for the NAT instance.
    """
    return self.__internal_address
      
  def _set_internal_address(self, v, load=False):
    """
    Setter method for internal_address, mapped from YANG variable /nat/instances/instance/static/mapping/state/internal_address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_internal_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_internal_address() directly.

    YANG Description: Internal (source) IP address. Must match the address
family configured for the NAT instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="internal-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """internal_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="internal-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)""",
        })

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

  def _unset_internal_address(self):
    self.__internal_address = YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="internal-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)


  def _get_external_address(self):
    """
    Getter method for external_address, mapped from YANG variable /nat/instances/instance/static/mapping/state/external_address (inet:ip-address)

    YANG Description: External (destination) IP address. Must match the address
family configured for the NAT instance.
    """
    return self.__external_address
      
  def _set_external_address(self, v, load=False):
    """
    Setter method for external_address, mapped from YANG variable /nat/instances/instance/static/mapping/state/external_address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_external_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_external_address() directly.

    YANG Description: External (destination) IP address. Must match the address
family configured for the NAT instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="external-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """external_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="external-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)""",
        })

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

  def _unset_external_address(self):
    self.__external_address = YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="external-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)


  def _get_internal_port(self):
    """
    Getter method for internal_port, mapped from YANG variable /nat/instances/instance/static/mapping/state/internal_port (inet:port-number)

    YANG Description: Internal port number for static NAPT mappings. When
specified, this option enables port forwarding, where both
the IP address and the port are translated. If omitted,
only the IP address is translated.
    """
    return self.__internal_port
      
  def _set_internal_port(self, v, load=False):
    """
    Setter method for internal_port, mapped from YANG variable /nat/instances/instance/static/mapping/state/internal_port (inet:port-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_internal_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_internal_port() directly.

    YANG Description: Internal port number for static NAPT mappings. When
specified, this option enables port forwarding, where both
the IP address and the port are translated. If omitted,
only the IP address is translated.
    """
    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..65535']}), is_leaf=True, yang_name="internal-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """internal_port must be of a type compatible with inet:port-number""",
          'defined-type': "inet:port-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="internal-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)""",
        })

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

  def _unset_internal_port(self):
    self.__internal_port = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="internal-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)


  def _get_external_port(self):
    """
    Getter method for external_port, mapped from YANG variable /nat/instances/instance/static/mapping/state/external_port (inet:port-number)

    YANG Description: External port number for static NAPT mappings. When
specified, this option enables port forwarding, where both
the IP address and the port are translated. If omitted,
only the IP address is translated.
    """
    return self.__external_port
      
  def _set_external_port(self, v, load=False):
    """
    Setter method for external_port, mapped from YANG variable /nat/instances/instance/static/mapping/state/external_port (inet:port-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_external_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_external_port() directly.

    YANG Description: External port number for static NAPT mappings. When
specified, this option enables port forwarding, where both
the IP address and the port are translated. If omitted,
only the IP address is translated.
    """
    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..65535']}), is_leaf=True, yang_name="external-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """external_port must be of a type compatible with inet:port-number""",
          'defined-type': "inet:port-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="external-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)""",
        })

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

  def _unset_external_port(self):
    self.__external_port = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="external-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /nat/instances/instance/static/mapping/state/protocol (protocol-type)

    YANG Description: Protocol for the static NAT mapping.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /nat/instances/instance/static/mapping/state/protocol (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: Protocol for the static NAT mapping.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'TCP': {}, 'UDP': {}, 'ICMP': {}, 'ALL': {}},), is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='protocol-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with protocol-type""",
          'defined-type': "openconfig-nat:protocol-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'TCP': {}, 'UDP': {}, 'ICMP': {}, 'ALL': {}},), is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='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=str,                                     restriction_type="dict_key",                                     restriction_arg={'TCP': {}, 'UDP': {}, 'ICMP': {}, 'ALL': {}},), is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='protocol-type', is_config=False)


  def _get_acl_set(self):
    """
    Getter method for acl_set, mapped from YANG variable /nat/instances/instance/static/mapping/state/acl_set (leafref)

    YANG Description: Reference to ACL set for this static NAT mapping.
    """
    return self.__acl_set
      
  def _set_acl_set(self, v, load=False):
    """
    Setter method for acl_set, mapped from YANG variable /nat/instances/instance/static/mapping/state/acl_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_acl_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_acl_set() directly.

    YANG Description: Reference to ACL set for this static NAT mapping.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=str, is_leaf=True, yang_name="acl-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """acl_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=str, is_leaf=True, yang_name="acl-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_acl_set(self):
    self.__acl_set = YANGDynClass(base=str, is_leaf=True, yang_name="acl-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=False)


  def _get_max_translations(self):
    """
    Getter method for max_translations, mapped from YANG variable /nat/instances/instance/static/mapping/state/max_translations (uint64)

    YANG Description: Maximum number of concurrent translations for this static
NAT mapping. When this threshold is reached, new translation
requests using this mapping are dropped until the number of
active translations falls below this limit.
    """
    return self.__max_translations
      
  def _set_max_translations(self, v, load=False):
    """
    Setter method for max_translations, mapped from YANG variable /nat/instances/instance/static/mapping/state/max_translations (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_translations is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_translations() directly.

    YANG Description: Maximum number of concurrent translations for this static
NAT mapping. When this threshold is reached, new translation
requests using this mapping are dropped until the number of
active translations falls below this limit.
    """
    if hasattr(v, "_utype"):
      v = v._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-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_translations must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint64', is_config=False)""",
        })

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

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


  def _get_creation_time(self):
    """
    Getter method for creation_time, mapped from YANG variable /nat/instances/instance/static/mapping/state/creation_time (yang:date-and-time)

    YANG Description: Timestamp when the static NAT mapping was created.
    """
    return self.__creation_time
      
  def _set_creation_time(self, v, load=False):
    """
    Setter method for creation_time, mapped from YANG variable /nat/instances/instance/static/mapping/state/creation_time (yang:date-and-time)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_creation_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_creation_time() directly.

    YANG Description: Timestamp when the static NAT mapping was created.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=str, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="creation-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:date-and-time', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """creation_time must be of a type compatible with yang:date-and-time""",
          'defined-type': "yang:date-and-time",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=str, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="creation-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:date-and-time', is_config=False)""",
        })

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

  def _unset_creation_time(self):
    self.__creation_time = YANGDynClass(base=RestrictedClassType(base_type=str, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="creation-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:date-and-time', is_config=False)


  def _get_last_used(self):
    """
    Getter method for last_used, mapped from YANG variable /nat/instances/instance/static/mapping/state/last_used (yang:date-and-time)

    YANG Description: Timestamp when the static NAT mapping was last used.
    """
    return self.__last_used
      
  def _set_last_used(self, v, load=False):
    """
    Setter method for last_used, mapped from YANG variable /nat/instances/instance/static/mapping/state/last_used (yang:date-and-time)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_used is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_used() directly.

    YANG Description: Timestamp when the static NAT mapping was last used.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=str, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="last-used", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:date-and-time', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_used must be of a type compatible with yang:date-and-time""",
          'defined-type': "yang:date-and-time",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=str, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="last-used", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:date-and-time', is_config=False)""",
        })

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

  def _unset_last_used(self):
    self.__last_used = YANGDynClass(base=RestrictedClassType(base_type=str, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="last-used", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:date-and-time', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /nat/instances/instance/static/mapping/state/counters (container)

    YANG Description: Counters for static NAT mapping operations.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /nat/instances/instance/static/mapping/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: Counters for static NAT mapping operations.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_nat__nat_instances_instance_static_mapping_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/nat', defining_module='openconfig-nat', 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_nat__nat_instances_instance_static_mapping_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/nat', defining_module='openconfig-nat', 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_nat__nat_instances_instance_static_mapping_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)

  name = __builtin__.property(_get_name)
  type = __builtin__.property(_get_type)
  internal_address = __builtin__.property(_get_internal_address)
  external_address = __builtin__.property(_get_external_address)
  internal_port = __builtin__.property(_get_internal_port)
  external_port = __builtin__.property(_get_external_port)
  protocol = __builtin__.property(_get_protocol)
  acl_set = __builtin__.property(_get_acl_set)
  max_translations = __builtin__.property(_get_max_translations)
  creation_time = __builtin__.property(_get_creation_time)
  last_used = __builtin__.property(_get_last_used)
  counters = __builtin__.property(_get_counters)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ('internal_address', internal_address), ('external_address', external_address), ('internal_port', internal_port), ('external_port', external_port), ('protocol', protocol), ('acl_set', acl_set), ('max_translations', max_translations), ('creation_time', creation_time), ('last_used', last_used), ('counters', counters), ])


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

  YANG Description: List of static NAT mappings.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'mapping'
  _yang_namespace = 'http://openconfig.net/yang/nat'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=str, 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/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_nat__nat_instances_instance_static_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_nat__nat_instances_instance_static_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['nat', 'instances', 'instance', 'static', 'mapping']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /nat/instances/instance/static/mapping/name (leafref)

    YANG Description: Reference to static NAT mapping name.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /nat/instances/instance/static/mapping/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to static NAT mapping 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=str, 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/nat', defining_module='openconfig-nat', 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=str, 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/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=str, 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/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /nat/instances/instance/static/mapping/config (container)

    YANG Description: Configuration parameters for the static NAT mapping.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /nat/instances/instance/static/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 parameters for the static NAT mapping.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_nat__nat_instances_instance_static_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_nat__nat_instances_instance_static_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_nat__nat_instances_instance_static_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /nat/instances/instance/static/mapping/state (container)

    YANG Description: Operational state data for the static NAT mapping.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /nat/instances/instance/static/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: Operational state data for the static NAT mapping.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_nat__nat_instances_instance_static_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_nat__nat_instances_instance_static_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_nat__nat_instances_instance_static_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)

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


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


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

  YANG Description: Static NAT configuration and state.
  """
  __slots__ = ('_path_helper', '_extmethods', '__mapping',)

  _yang_name = 'static'
  _yang_namespace = 'http://openconfig.net/yang/nat'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__mapping = YANGDynClass(base=YANGListType("name",yc_mapping_openconfig_nat__nat_instances_instance_static_mapping, yang_name="mapping", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', 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/nat', defining_module='openconfig-nat', 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 ['nat', 'instances', 'instance', 'static']

  def _get_mapping(self):
    """
    Getter method for mapping, mapped from YANG variable /nat/instances/instance/static/mapping (list)

    YANG Description: List of static NAT mappings.
    """
    return self.__mapping
      
  def _set_mapping(self, v, load=False):
    """
    Setter method for mapping, mapped from YANG variable /nat/instances/instance/static/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: List of static NAT mappings.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_mapping_openconfig_nat__nat_instances_instance_static_mapping, yang_name="mapping", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', 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/nat', defining_module='openconfig-nat', 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("name",yc_mapping_openconfig_nat__nat_instances_instance_static_mapping, yang_name="mapping", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', 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/nat', defining_module='openconfig-nat', yang_type='list', is_config=True)""",
        })

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

  def _unset_mapping(self):
    self.__mapping = YANGDynClass(base=YANGListType("name",yc_mapping_openconfig_nat__nat_instances_instance_static_mapping, yang_name="mapping", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', 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/nat', defining_module='openconfig-nat', yang_type='list', is_config=True)

  mapping = __builtin__.property(_get_mapping, _set_mapping)


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


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

  YANG Description: Counters for NAT translation entry operations.
  """
  __slots__ = ('_path_helper', '_extmethods', '__packet_count_inbound','__packet_count_outbound','__byte_count_inbound','__byte_count_outbound',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/nat'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__packet_count_inbound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packet-count-inbound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    self.__packet_count_outbound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packet-count-outbound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    self.__byte_count_inbound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="byte-count-inbound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    self.__byte_count_outbound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="byte-count-outbound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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 ['nat', 'instances', 'instance', 'translations', 'translation', 'state', 'counters']

  def _get_packet_count_inbound(self):
    """
    Getter method for packet_count_inbound, mapped from YANG variable /nat/instances/instance/translations/translation/state/counters/packet_count_inbound (yang:counter64)

    YANG Description: Number of inbound packets (external to internal) for
this translation.
    """
    return self.__packet_count_inbound
      
  def _set_packet_count_inbound(self, v, load=False):
    """
    Setter method for packet_count_inbound, mapped from YANG variable /nat/instances/instance/translations/translation/state/counters/packet_count_inbound (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_packet_count_inbound is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_packet_count_inbound() directly.

    YANG Description: Number of inbound packets (external to internal) for
this translation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packet-count-inbound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """packet_count_inbound 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="packet-count-inbound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_packet_count_inbound(self):
    self.__packet_count_inbound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packet-count-inbound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)


  def _get_packet_count_outbound(self):
    """
    Getter method for packet_count_outbound, mapped from YANG variable /nat/instances/instance/translations/translation/state/counters/packet_count_outbound (yang:counter64)

    YANG Description: Number of outbound packets (internal to external) for
this translation.
    """
    return self.__packet_count_outbound
      
  def _set_packet_count_outbound(self, v, load=False):
    """
    Setter method for packet_count_outbound, mapped from YANG variable /nat/instances/instance/translations/translation/state/counters/packet_count_outbound (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_packet_count_outbound is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_packet_count_outbound() directly.

    YANG Description: Number of outbound packets (internal to external) for
this translation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packet-count-outbound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """packet_count_outbound 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="packet-count-outbound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_packet_count_outbound(self):
    self.__packet_count_outbound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packet-count-outbound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)


  def _get_byte_count_inbound(self):
    """
    Getter method for byte_count_inbound, mapped from YANG variable /nat/instances/instance/translations/translation/state/counters/byte_count_inbound (yang:counter64)

    YANG Description: Number of inbound bytes (external to internal) for
this translation.
    """
    return self.__byte_count_inbound
      
  def _set_byte_count_inbound(self, v, load=False):
    """
    Setter method for byte_count_inbound, mapped from YANG variable /nat/instances/instance/translations/translation/state/counters/byte_count_inbound (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_byte_count_inbound is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_byte_count_inbound() directly.

    YANG Description: Number of inbound bytes (external to internal) for
this translation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="byte-count-inbound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """byte_count_inbound 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="byte-count-inbound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_byte_count_inbound(self):
    self.__byte_count_inbound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="byte-count-inbound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)


  def _get_byte_count_outbound(self):
    """
    Getter method for byte_count_outbound, mapped from YANG variable /nat/instances/instance/translations/translation/state/counters/byte_count_outbound (yang:counter64)

    YANG Description: Number of outbound bytes (internal to external) for
this translation.
    """
    return self.__byte_count_outbound
      
  def _set_byte_count_outbound(self, v, load=False):
    """
    Setter method for byte_count_outbound, mapped from YANG variable /nat/instances/instance/translations/translation/state/counters/byte_count_outbound (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_byte_count_outbound is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_byte_count_outbound() directly.

    YANG Description: Number of outbound bytes (internal to external) for
this translation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="byte-count-outbound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """byte_count_outbound 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="byte-count-outbound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_byte_count_outbound(self):
    self.__byte_count_outbound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="byte-count-outbound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:counter64', is_config=False)

  packet_count_inbound = __builtin__.property(_get_packet_count_inbound)
  packet_count_outbound = __builtin__.property(_get_packet_count_outbound)
  byte_count_inbound = __builtin__.property(_get_byte_count_inbound)
  byte_count_outbound = __builtin__.property(_get_byte_count_outbound)


  _pyangbind_elements = OrderedDict([('packet_count_inbound', packet_count_inbound), ('packet_count_outbound', packet_count_outbound), ('byte_count_inbound', byte_count_inbound), ('byte_count_outbound', byte_count_outbound), ])


class yc_state_openconfig_nat__nat_instances_instance_translations_translation_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-nat - based on the path /nat/instances/instance/translations/translation/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 NAT translation entry.
  """
  __slots__ = ('_path_helper', '_extmethods', '__translation_id','__internal_address','__internal_port','__external_address','__external_port','__protocol','__creation_time','__last_activity','__timeout','__source_pool','__source_mapping','__counters',)

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

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__translation_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="translation-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint64', is_config=False)
    self.__internal_address = YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="internal-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)
    self.__internal_port = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="internal-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)
    self.__external_address = YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="external-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)
    self.__external_port = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="external-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)
    self.__protocol = YANGDynClass(base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'TCP': {}, 'UDP': {}, 'ICMP': {}, 'ALL': {}},), is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='protocol-type', is_config=False)
    self.__creation_time = YANGDynClass(base=RestrictedClassType(base_type=str, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="creation-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:date-and-time', is_config=False)
    self.__last_activity = YANGDynClass(base=RestrictedClassType(base_type=str, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="last-activity", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:date-and-time', is_config=False)
    self.__timeout = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)
    self.__source_pool = YANGDynClass(base=str, is_leaf=True, yang_name="source-pool", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=False)
    self.__source_mapping = YANGDynClass(base=str, is_leaf=True, yang_name="source-mapping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_nat__nat_instances_instance_translations_translation_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['nat', 'instances', 'instance', 'translations', 'translation', 'state']

  def _get_translation_id(self):
    """
    Getter method for translation_id, mapped from YANG variable /nat/instances/instance/translations/translation/state/translation_id (uint64)

    YANG Description: Unique identifier for the translation entry.
    """
    return self.__translation_id
      
  def _set_translation_id(self, v, load=False):
    """
    Setter method for translation_id, mapped from YANG variable /nat/instances/instance/translations/translation/state/translation_id (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_translation_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_translation_id() directly.

    YANG Description: Unique identifier for the translation 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="translation-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """translation_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="translation-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint64', is_config=False)""",
        })

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

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


  def _get_internal_address(self):
    """
    Getter method for internal_address, mapped from YANG variable /nat/instances/instance/translations/translation/state/internal_address (inet:ip-address)

    YANG Description: Internal (private) IP address being translated.
    """
    return self.__internal_address
      
  def _set_internal_address(self, v, load=False):
    """
    Setter method for internal_address, mapped from YANG variable /nat/instances/instance/translations/translation/state/internal_address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_internal_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_internal_address() directly.

    YANG Description: Internal (private) IP address being translated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="internal-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """internal_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="internal-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)""",
        })

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

  def _unset_internal_address(self):
    self.__internal_address = YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="internal-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)


  def _get_internal_port(self):
    """
    Getter method for internal_port, mapped from YANG variable /nat/instances/instance/translations/translation/state/internal_port (inet:port-number)

    YANG Description: Internal port number being translated.
    """
    return self.__internal_port
      
  def _set_internal_port(self, v, load=False):
    """
    Setter method for internal_port, mapped from YANG variable /nat/instances/instance/translations/translation/state/internal_port (inet:port-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_internal_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_internal_port() directly.

    YANG Description: Internal port number being translated.
    """
    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..65535']}), is_leaf=True, yang_name="internal-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """internal_port must be of a type compatible with inet:port-number""",
          'defined-type': "inet:port-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="internal-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)""",
        })

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

  def _unset_internal_port(self):
    self.__internal_port = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="internal-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)


  def _get_external_address(self):
    """
    Getter method for external_address, mapped from YANG variable /nat/instances/instance/translations/translation/state/external_address (inet:ip-address)

    YANG Description: External (public) IP address used for translation.
    """
    return self.__external_address
      
  def _set_external_address(self, v, load=False):
    """
    Setter method for external_address, mapped from YANG variable /nat/instances/instance/translations/translation/state/external_address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_external_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_external_address() directly.

    YANG Description: External (public) IP address used for translation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="external-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """external_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="external-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)""",
        })

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

  def _unset_external_address(self):
    self.__external_address = YANGDynClass(base=[RestrictedClassType(base_type=str, 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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=str, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="external-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:ip-address', is_config=False)


  def _get_external_port(self):
    """
    Getter method for external_port, mapped from YANG variable /nat/instances/instance/translations/translation/state/external_port (inet:port-number)

    YANG Description: External port number used for translation.
    """
    return self.__external_port
      
  def _set_external_port(self, v, load=False):
    """
    Setter method for external_port, mapped from YANG variable /nat/instances/instance/translations/translation/state/external_port (inet:port-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_external_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_external_port() directly.

    YANG Description: External port number used for translation.
    """
    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..65535']}), is_leaf=True, yang_name="external-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """external_port must be of a type compatible with inet:port-number""",
          'defined-type': "inet:port-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="external-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)""",
        })

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

  def _unset_external_port(self):
    self.__external_port = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..65535']}), is_leaf=True, yang_name="external-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='inet:port-number', is_config=False)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /nat/instances/instance/translations/translation/state/protocol (protocol-type)

    YANG Description: Protocol of the translation entry.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /nat/instances/instance/translations/translation/state/protocol (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: Protocol of the translation entry.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'TCP': {}, 'UDP': {}, 'ICMP': {}, 'ALL': {}},), is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='protocol-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with protocol-type""",
          'defined-type': "openconfig-nat:protocol-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=str,                                     restriction_type="dict_key",                                     restriction_arg={'TCP': {}, 'UDP': {}, 'ICMP': {}, 'ALL': {}},), is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='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=str,                                     restriction_type="dict_key",                                     restriction_arg={'TCP': {}, 'UDP': {}, 'ICMP': {}, 'ALL': {}},), is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='protocol-type', is_config=False)


  def _get_creation_time(self):
    """
    Getter method for creation_time, mapped from YANG variable /nat/instances/instance/translations/translation/state/creation_time (yang:date-and-time)

    YANG Description: Timestamp when the translation entry was created.
    """
    return self.__creation_time
      
  def _set_creation_time(self, v, load=False):
    """
    Setter method for creation_time, mapped from YANG variable /nat/instances/instance/translations/translation/state/creation_time (yang:date-and-time)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_creation_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_creation_time() directly.

    YANG Description: Timestamp when the translation entry was created.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=str, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="creation-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:date-and-time', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """creation_time must be of a type compatible with yang:date-and-time""",
          'defined-type': "yang:date-and-time",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=str, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="creation-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:date-and-time', is_config=False)""",
        })

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

  def _unset_creation_time(self):
    self.__creation_time = YANGDynClass(base=RestrictedClassType(base_type=str, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="creation-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:date-and-time', is_config=False)


  def _get_last_activity(self):
    """
    Getter method for last_activity, mapped from YANG variable /nat/instances/instance/translations/translation/state/last_activity (yang:date-and-time)

    YANG Description: Timestamp of the last packet activity for this translation.
    """
    return self.__last_activity
      
  def _set_last_activity(self, v, load=False):
    """
    Setter method for last_activity, mapped from YANG variable /nat/instances/instance/translations/translation/state/last_activity (yang:date-and-time)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_activity is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_activity() directly.

    YANG Description: Timestamp of the last packet activity for this translation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=str, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="last-activity", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:date-and-time', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_activity must be of a type compatible with yang:date-and-time""",
          'defined-type': "yang:date-and-time",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=str, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="last-activity", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:date-and-time', is_config=False)""",
        })

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

  def _unset_last_activity(self):
    self.__last_activity = YANGDynClass(base=RestrictedClassType(base_type=str, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="last-activity", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='yang:date-and-time', is_config=False)


  def _get_timeout(self):
    """
    Getter method for timeout, mapped from YANG variable /nat/instances/instance/translations/translation/state/timeout (uint32)

    YANG Description: Remaining time before this translation entry expires
due to inactivity.
    """
    return self.__timeout
      
  def _set_timeout(self, v, load=False):
    """
    Setter method for timeout, mapped from YANG variable /nat/instances/instance/translations/translation/state/timeout (uint32)
    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: Remaining time before this translation entry expires
due to inactivity.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """timeout must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', 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..4294967295']}, int_size=32), is_leaf=True, yang_name="timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='uint32', is_config=False)


  def _get_source_pool(self):
    """
    Getter method for source_pool, mapped from YANG variable /nat/instances/instance/translations/translation/state/source_pool (string)

    YANG Description: Name of the dynamic NAT pool that allocated this
translation, if applicable.
    """
    return self.__source_pool
      
  def _set_source_pool(self, v, load=False):
    """
    Setter method for source_pool, mapped from YANG variable /nat/instances/instance/translations/translation/state/source_pool (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_pool is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_pool() directly.

    YANG Description: Name of the dynamic NAT pool that allocated this
translation, if applicable.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=str, is_leaf=True, yang_name="source-pool", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_pool must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=str, is_leaf=True, yang_name="source-pool", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=False)""",
        })

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

  def _unset_source_pool(self):
    self.__source_pool = YANGDynClass(base=str, is_leaf=True, yang_name="source-pool", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=False)


  def _get_source_mapping(self):
    """
    Getter method for source_mapping, mapped from YANG variable /nat/instances/instance/translations/translation/state/source_mapping (string)

    YANG Description: Name of the static NAT mapping that created this translation,
if applicable.
    """
    return self.__source_mapping
      
  def _set_source_mapping(self, v, load=False):
    """
    Setter method for source_mapping, mapped from YANG variable /nat/instances/instance/translations/translation/state/source_mapping (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_mapping is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_mapping() directly.

    YANG Description: Name of the static NAT mapping that created this translation,
if applicable.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=str, is_leaf=True, yang_name="source-mapping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_mapping must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=str, is_leaf=True, yang_name="source-mapping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=False)""",
        })

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

  def _unset_source_mapping(self):
    self.__source_mapping = YANGDynClass(base=str, is_leaf=True, yang_name="source-mapping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='string', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /nat/instances/instance/translations/translation/state/counters (container)

    YANG Description: Counters for NAT translation entry operations.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /nat/instances/instance/translations/translation/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: Counters for NAT translation entry operations.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_nat__nat_instances_instance_translations_translation_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/nat', defining_module='openconfig-nat', 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_nat__nat_instances_instance_translations_translation_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/nat', defining_module='openconfig-nat', 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_nat__nat_instances_instance_translations_translation_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)

  translation_id = __builtin__.property(_get_translation_id)
  internal_address = __builtin__.property(_get_internal_address)
  internal_port = __builtin__.property(_get_internal_port)
  external_address = __builtin__.property(_get_external_address)
  external_port = __builtin__.property(_get_external_port)
  protocol = __builtin__.property(_get_protocol)
  creation_time = __builtin__.property(_get_creation_time)
  last_activity = __builtin__.property(_get_last_activity)
  timeout = __builtin__.property(_get_timeout)
  source_pool = __builtin__.property(_get_source_pool)
  source_mapping = __builtin__.property(_get_source_mapping)
  counters = __builtin__.property(_get_counters)


  _pyangbind_elements = OrderedDict([('translation_id', translation_id), ('internal_address', internal_address), ('internal_port', internal_port), ('external_address', external_address), ('external_port', external_port), ('protocol', protocol), ('creation_time', creation_time), ('last_activity', last_activity), ('timeout', timeout), ('source_pool', source_pool), ('source_mapping', source_mapping), ('counters', counters), ])


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

  YANG Description: List of active NAT translation entries.
  """
  __slots__ = ('_path_helper', '_extmethods', '__translation_id','__state',)

  _yang_name = 'translation'
  _yang_namespace = 'http://openconfig.net/yang/nat'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__translation_id = YANGDynClass(base=str, is_leaf=True, yang_name="translation-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_nat__nat_instances_instance_translations_translation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['nat', 'instances', 'instance', 'translations', 'translation']

  def _get_translation_id(self):
    """
    Getter method for translation_id, mapped from YANG variable /nat/instances/instance/translations/translation/translation_id (leafref)

    YANG Description: Reference to translation entry identifier.
    """
    return self.__translation_id
      
  def _set_translation_id(self, v, load=False):
    """
    Setter method for translation_id, mapped from YANG variable /nat/instances/instance/translations/translation/translation_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_translation_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_translation_id() directly.

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

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

  def _unset_translation_id(self):
    self.__translation_id = YANGDynClass(base=str, is_leaf=True, yang_name="translation-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /nat/instances/instance/translations/translation/state (container)

    YANG Description: Operational state data for the NAT translation entry.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /nat/instances/instance/translations/translation/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is 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 NAT translation entry.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_nat__nat_instances_instance_translations_translation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_nat__nat_instances_instance_translations_translation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)""",
        })

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

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

  translation_id = __builtin__.property(_get_translation_id)
  state = __builtin__.property(_get_state)


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


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

  YANG Description: Active NAT translation entries showing current
address/port mappings.
  """
  __slots__ = ('_path_helper', '_extmethods', '__translation',)

  _yang_name = 'translations'
  _yang_namespace = 'http://openconfig.net/yang/nat'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__translation = YANGDynClass(base=YANGListType("translation_id",yc_translation_openconfig_nat__nat_instances_instance_translations_translation, yang_name="translation", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='translation-id', extensions=None), is_container='list', yang_name="translation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', 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 ['nat', 'instances', 'instance', 'translations']

  def _get_translation(self):
    """
    Getter method for translation, mapped from YANG variable /nat/instances/instance/translations/translation (list)

    YANG Description: List of active NAT translation entries.
    """
    return self.__translation
      
  def _set_translation(self, v, load=False):
    """
    Setter method for translation, mapped from YANG variable /nat/instances/instance/translations/translation (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_translation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_translation() directly.

    YANG Description: List of active NAT translation entries.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("translation_id",yc_translation_openconfig_nat__nat_instances_instance_translations_translation, yang_name="translation", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='translation-id', extensions=None), is_container='list', yang_name="translation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """translation must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("translation_id",yc_translation_openconfig_nat__nat_instances_instance_translations_translation, yang_name="translation", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='translation-id', extensions=None), is_container='list', yang_name="translation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='list', is_config=False)""",
        })

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

  def _unset_translation(self):
    self.__translation = YANGDynClass(base=YANGListType("translation_id",yc_translation_openconfig_nat__nat_instances_instance_translations_translation, yang_name="translation", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='translation-id', extensions=None), is_container='list', yang_name="translation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='list', is_config=False)

  translation = __builtin__.property(_get_translation)


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


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

  YANG Description: List of NAT instances.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__interfaces','__dynamic','__static','__translations',)

  _yang_name = 'instance'
  _yang_namespace = 'http://openconfig.net/yang/nat'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=str, 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/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_nat__nat_instances_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_nat__nat_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)
    self.__interfaces = YANGDynClass(base=yc_interfaces_openconfig_nat__nat_instances_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)
    self.__dynamic = YANGDynClass(base=yc_dynamic_openconfig_nat__nat_instances_instance_dynamic, is_container='container', yang_name="dynamic", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)
    self.__static = YANGDynClass(base=yc_static_openconfig_nat__nat_instances_instance_static, is_container='container', yang_name="static", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)
    self.__translations = YANGDynClass(base=yc_translations_openconfig_nat__nat_instances_instance_translations, is_container='container', yang_name="translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)

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

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

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /nat/instances/instance/name (leafref)

    YANG Description: Reference to NAT instance name.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /nat/instances/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: Reference to NAT instance 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=str, 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/nat', defining_module='openconfig-nat', 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=str, 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/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=str, 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/nat', defining_module='openconfig-nat', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /nat/instances/instance/config (container)

    YANG Description: Configuration parameters for the NAT instance.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /nat/instances/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 for the NAT instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_nat__nat_instances_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_nat__nat_instances_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_nat__nat_instances_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /nat/instances/instance/state (container)

    YANG Description: Operational state data for the NAT instance.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /nat/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: Operational state data for the NAT instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_nat__nat_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_nat__nat_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_nat__nat_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)


  def _get_interfaces(self):
    """
    Getter method for interfaces, mapped from YANG variable /nat/instances/instance/interfaces (container)

    YANG Description: Interface configuration and state for NAT.
    """
    return self.__interfaces
      
  def _set_interfaces(self, v, load=False):
    """
    Setter method for interfaces, mapped from YANG variable /nat/instances/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: Interface configuration and state for NAT.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interfaces_openconfig_nat__nat_instances_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/nat', defining_module='openconfig-nat', 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_nat__nat_instances_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/nat', defining_module='openconfig-nat', 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_nat__nat_instances_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)


  def _get_dynamic(self):
    """
    Getter method for dynamic, mapped from YANG variable /nat/instances/instance/dynamic (container)

    YANG Description: Dynamic NAT configuration and state.
    """
    return self.__dynamic
      
  def _set_dynamic(self, v, load=False):
    """
    Setter method for dynamic, mapped from YANG variable /nat/instances/instance/dynamic (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dynamic is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dynamic() directly.

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

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

  def _unset_dynamic(self):
    self.__dynamic = YANGDynClass(base=yc_dynamic_openconfig_nat__nat_instances_instance_dynamic, is_container='container', yang_name="dynamic", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)


  def _get_static(self):
    """
    Getter method for static, mapped from YANG variable /nat/instances/instance/static (container)

    YANG Description: Static NAT configuration and state.
    """
    return self.__static
      
  def _set_static(self, v, load=False):
    """
    Setter method for static, mapped from YANG variable /nat/instances/instance/static (container)
    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: Static NAT configuration and state.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_static_openconfig_nat__nat_instances_instance_static, is_container='container', yang_name="static", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_static_openconfig_nat__nat_instances_instance_static, is_container='container', yang_name="static", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)""",
        })

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

  def _unset_static(self):
    self.__static = YANGDynClass(base=yc_static_openconfig_nat__nat_instances_instance_static, is_container='container', yang_name="static", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)


  def _get_translations(self):
    """
    Getter method for translations, mapped from YANG variable /nat/instances/instance/translations (container)

    YANG Description: Active NAT translation entries showing current
address/port mappings.
    """
    return self.__translations
      
  def _set_translations(self, v, load=False):
    """
    Setter method for translations, mapped from YANG variable /nat/instances/instance/translations (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_translations is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_translations() directly.

    YANG Description: Active NAT translation entries showing current
address/port mappings.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_translations_openconfig_nat__nat_instances_instance_translations, is_container='container', yang_name="translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """translations must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_translations_openconfig_nat__nat_instances_instance_translations, is_container='container', yang_name="translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)""",
        })

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

  def _unset_translations(self):
    self.__translations = YANGDynClass(base=yc_translations_openconfig_nat__nat_instances_instance_translations, is_container='container', yang_name="translations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state)
  interfaces = __builtin__.property(_get_interfaces, _set_interfaces)
  dynamic = __builtin__.property(_get_dynamic, _set_dynamic)
  static = __builtin__.property(_get_static, _set_static)
  translations = __builtin__.property(_get_translations)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('interfaces', interfaces), ('dynamic', dynamic), ('static', static), ('translations', translations), ])


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

  YANG Description: NAT instance configuration and state.
  """
  __slots__ = ('_path_helper', '_extmethods', '__instance',)

  _yang_name = 'instances'
  _yang_namespace = 'http://openconfig.net/yang/nat'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__instance = YANGDynClass(base=YANGListType("name",yc_instance_openconfig_nat__nat_instances_instance, yang_name="instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', 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/nat', defining_module='openconfig-nat', 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 ['nat', 'instances']

  def _get_instance(self):
    """
    Getter method for instance, mapped from YANG variable /nat/instances/instance (list)

    YANG Description: List of NAT instances.
    """
    return self.__instance
      
  def _set_instance(self, v, load=False):
    """
    Setter method for instance, mapped from YANG variable /nat/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: List of NAT instances.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_instance_openconfig_nat__nat_instances_instance, yang_name="instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', 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/nat', defining_module='openconfig-nat', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instance must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_instance_openconfig_nat__nat_instances_instance, yang_name="instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', 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/nat', defining_module='openconfig-nat', yang_type='list', is_config=True)""",
        })

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

  def _unset_instance(self):
    self.__instance = YANGDynClass(base=YANGListType("name",yc_instance_openconfig_nat__nat_instances_instance, yang_name="instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', 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/nat', defining_module='openconfig-nat', yang_type='list', is_config=True)

  instance = __builtin__.property(_get_instance, _set_instance)


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


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

  YANG Description: Top-level container for NAT.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__instances',)

  _yang_name = 'nat'
  _yang_namespace = 'http://openconfig.net/yang/nat'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_nat__nat_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_nat__nat_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)
    self.__instances = YANGDynClass(base=yc_instances_openconfig_nat__nat_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['nat']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /nat/config (container)

    YANG Description: Global NAT configuration parameters.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /nat/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_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 NAT configuration parameters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_nat__nat_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_nat__nat_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)""",
        })

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

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


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /nat/state (container)

    YANG Description: Global NAT operational state data.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /nat/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_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 NAT operational state data.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_nat__nat_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_nat__nat_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=False)""",
        })

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

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


  def _get_instances(self):
    """
    Getter method for instances, mapped from YANG variable /nat/instances (container)

    YANG Description: NAT instance configuration and state.
    """
    return self.__instances
      
  def _set_instances(self, v, load=False):
    """
    Setter method for instances, mapped from YANG variable /nat/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: NAT instance configuration and state.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_instances_openconfig_nat__nat_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)
    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_nat__nat_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)""",
        })

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

  def _unset_instances(self):
    self.__instances = YANGDynClass(base=yc_instances_openconfig_nat__nat_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/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state)
  instances = __builtin__.property(_get_instances, _set_instances)


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


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

  YANG Description: This module defines configuration and operational state data
for Network Address Translation (NAT) functionality.

NAT enables translation of IP addresses and/or ports between
different network domains.

The model supports:
- Source NAT (SNAT) for outbound traffic translation
- Destination NAT (DNAT) for inbound traffic translation
- Static and dynamic address/port mappings
- Policy-based NAT using ACLs
- Active translation table showing current NAT entries
- Multiple address families (IPv4/NAT44, IPv6/NAT66).
  """
  __slots__ = ('_path_helper', '_extmethods', '__nat',)

  _yang_name = 'openconfig-nat'
  _yang_namespace = 'http://openconfig.net/yang/nat'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__nat = YANGDynClass(base=yc_nat_openconfig_nat__nat, is_container='container', yang_name="nat", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        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_nat(self):
    """
    Getter method for nat, mapped from YANG variable /nat (container)

    YANG Description: Top-level container for NAT.
    """
    return self.__nat
      
  def _set_nat(self, v, load=False):
    """
    Setter method for nat, mapped from YANG variable /nat (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_nat is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_nat() directly.

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

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

  def _unset_nat(self):
    self.__nat = YANGDynClass(base=yc_nat_openconfig_nat__nat, is_container='container', yang_name="nat", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/nat', defining_module='openconfig-nat', yang_type='container', is_config=True)

  nat = __builtin__.property(_get_nat, _set_nat)


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


