text: 
  from operator import attrgetter
  import pyangbind.lib.xpathhelper as xpathhelper
  from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
  from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
  from pyangbind.lib.base import PybindBase
  from decimal import Decimal
  from bitarray import bitarray
  import __builtin__
  class ipsec_auth_key_config(PybindBase):
    """
    This class was auto-generated by the PythonClass plugin for PYANG
    from YANG module brocade-interface - based on the path /interface/gigabitethernet/ipv6/interface-ospfv3-conf/authentication/ipsec-auth-key-config. Each member element of
    the container is represented as a class variable - with a specific
    YANG type.
    """
    __slots__ = ('_pybind_generated_by', '_path_helper', '_yang_name', '_rest_name', '_extmethods', '__spi','__ah','__ah_no_encrypt','__ah_key','__esp','__esp_no_encrypt','__esp_key','__esp_auth','__esp_auth_no_encrypt','__esp_auth_key',)
  
    _yang_name = 'ipsec-auth-key-config'
    _rest_name = ''
  
    _pybind_generated_by = 'container'
  
    def __init__(self, *args, **kwargs):
  
      path_helper_ = kwargs.pop("path_helper", None)
      if path_helper_ is False:
        self._path_helper = False
      elif path_helper_ is not None and isinstance(path_helper_, xpathhelper.YANGPathHelper):
        self._path_helper = path_helper_
      elif hasattr(self, "_parent"):
        path_helper_ = getattr(self._parent, "_path_helper", False)
        self._path_helper = path_helper_
      else:
        self._path_helper = False
  
      extmethods = kwargs.pop("extmethods", None)
      if extmethods is False:
        self._extmethods = False
      elif extmethods is not None and isinstance(extmethods, dict):
        self._extmethods = extmethods
      elif hasattr(self, "_parent"):
        extmethods = getattr(self._parent, "_extmethods", None)
        self._extmethods = extmethods
      else:
        self._extmethods = False
      self.__ah_no_encrypt = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="ah-no-encrypt", rest_name="no-encrypt", parent=self, choice=(u'ch-algorithm', u'ca-ah-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Do not encrypt the key ', u'cli-optional-in-sequence': None, u'alt-name': u'no-encrypt', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='empty', is_config=True)
      self.__esp = YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'NULL': {'value': 1}},), is_leaf=True, yang_name="esp", rest_name="esp", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Specify Encapsulating Security Payload (ESP)', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='algorithm-type-esp', is_config=True)
      self.__ah = YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'hmac-sha1': {'value': 2}, u'hmac-md5': {'value': 1}},), is_leaf=True, yang_name="ah", rest_name="ah", parent=self, choice=(u'ch-algorithm', u'ca-ah-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Specify the authentication algorithm to use', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='algorithm-type-ah', is_config=True)
      self.__esp_key = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'0..80']}), is_leaf=True, yang_name="esp-key", rest_name="esp-key", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Hexadecimal key string for ESP', u'hidden': u'full', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='ipsec-authentication-hexkey-string', is_config=True)
      self.__esp_auth_key = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'0..80']}), is_leaf=True, yang_name="esp-auth-key", rest_name="key", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Hexadecimal key string for authentication algorithm', u'alt-name': u'key', u'suppress-echo': u'true'}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='ipsec-authentication-hexkey-string', is_config=True)
      self.__spi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': [u'512..4294967295']}), is_leaf=True, yang_name="spi", rest_name="spi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Security Parameter Index', u'cli-full-no': None, u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='spi-value-type', is_config=True)
      self.__esp_no_encrypt = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="esp-no-encrypt", rest_name="esp-no-encrypt", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Do not encrypt the key ', u'cli-optional-in-sequence': None, u'hidden': u'full', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='empty', is_config=True)
      self.__esp_auth = YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'hmac-sha1': {'value': 2}, u'hmac-md5': {'value': 1}},), is_leaf=True, yang_name="esp-auth", rest_name="esp-auth", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Use Authentication Algorithm', u'cli-drop-node-name': None, u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='algorithm-type-ah', is_config=True)
      self.__esp_auth_no_encrypt = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="esp-auth-no-encrypt", rest_name="no-encrypt", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Do not encrypt the key ', u'cli-optional-in-sequence': None, u'alt-name': u'no-encrypt', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='empty', is_config=True)
      self.__ah_key = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'0..80']}), is_leaf=True, yang_name="ah-key", rest_name="key", parent=self, choice=(u'ch-algorithm', u'ca-ah-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Key used for ah', u'alt-name': u'key', u'suppress-echo': u'true'}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='ipsec-authentication-hexkey-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 [u'interface', u'gigabitethernet', u'ipv6', u'interface-ospfv3-conf', u'authentication', u'ipsec-auth-key-config']
  
    def _rest_path(self):
      if hasattr(self, "_parent"):
        if self._rest_name:
          return self._parent._rest_path()+[self._rest_name]
        else:
          return self._parent._rest_path()
      else:
        return [u'interface', u'GigabitEthernet', u'ipv6', u'ospf', u'authentication']
  
    def _get_spi(self):
      """
      Getter method for spi, mapped from YANG variable /interface/gigabitethernet/ipv6/interface_ospfv3_conf/authentication/ipsec_auth_key_config/spi (spi-value-type)
  
      YANG Description: Security Parameter IndexThe SPI value in combination with the destination IP address and security protocol  uniquely identifies the Security Association for a datagram. The near-end and far-end values for the spi must be the same.
      """
      return self.__spi
        
    def _set_spi(self, v, load=False):
      """
      Setter method for spi, mapped from YANG variable /interface/gigabitethernet/ipv6/interface_ospfv3_conf/authentication/ipsec_auth_key_config/spi (spi-value-type)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_spi is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_spi() directly.
  
      YANG Description: Security Parameter IndexThe SPI value in combination with the destination IP address and security protocol  uniquely identifies the Security Association for a datagram. The near-end and far-end values for the spi must be the same.
      """
      if hasattr(v, "_utype"):
        v = v._utype(v)
      try:
        t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': [u'512..4294967295']}), is_leaf=True, yang_name="spi", rest_name="spi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Security Parameter Index', u'cli-full-no': None, u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='spi-value-type', is_config=True)
      except (TypeError, ValueError):
        raise ValueError({
            'error-string': """spi must be of a type compatible with spi-value-type""",
            'defined-type': "brocade-ospfv3:spi-value-type",
            'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': [u'512..4294967295']}), is_leaf=True, yang_name="spi", rest_name="spi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Security Parameter Index', u'cli-full-no': None, u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='spi-value-type', is_config=True)""",
          })
  
      self.__spi = t
      if hasattr(self, '_set'):
        self._set()
  
    def _unset_spi(self):
      self.__spi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': [u'512..4294967295']}), is_leaf=True, yang_name="spi", rest_name="spi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Security Parameter Index', u'cli-full-no': None, u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='spi-value-type', is_config=True)
  
  
    def _get_ah(self):
      """
      Getter method for ah, mapped from YANG variable /interface/gigabitethernet/ipv6/interface_ospfv3_conf/authentication/ipsec_auth_key_config/ah (algorithm-type-ah)
  
      YANG Description: Specify the authentication algorithm to use. 
      """
      return self.__ah
        
    def _set_ah(self, v, load=False):
      """
      Setter method for ah, mapped from YANG variable /interface/gigabitethernet/ipv6/interface_ospfv3_conf/authentication/ipsec_auth_key_config/ah (algorithm-type-ah)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_ah is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_ah() directly.
  
      YANG Description: Specify the authentication algorithm to use. 
      """
      if hasattr(v, "_utype"):
        v = v._utype(v)
      try:
        t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'hmac-sha1': {'value': 2}, u'hmac-md5': {'value': 1}},), is_leaf=True, yang_name="ah", rest_name="ah", parent=self, choice=(u'ch-algorithm', u'ca-ah-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Specify the authentication algorithm to use', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='algorithm-type-ah', is_config=True)
      except (TypeError, ValueError):
        raise ValueError({
            'error-string': """ah must be of a type compatible with algorithm-type-ah""",
            'defined-type': "brocade-ospfv3:algorithm-type-ah",
            'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'hmac-sha1': {'value': 2}, u'hmac-md5': {'value': 1}},), is_leaf=True, yang_name="ah", rest_name="ah", parent=self, choice=(u'ch-algorithm', u'ca-ah-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Specify the authentication algorithm to use', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='algorithm-type-ah', is_config=True)""",
          })
  
      self.__ah = t
      if hasattr(self, '_set'):
        self._set()
  
    def _unset_ah(self):
      self.__ah = YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'hmac-sha1': {'value': 2}, u'hmac-md5': {'value': 1}},), is_leaf=True, yang_name="ah", rest_name="ah", parent=self, choice=(u'ch-algorithm', u'ca-ah-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Specify the authentication algorithm to use', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='algorithm-type-ah', is_config=True)
  
  
    def _get_ah_no_encrypt(self):
      """
      Getter method for ah_no_encrypt, mapped from YANG variable /interface/gigabitethernet/ipv6/interface_ospfv3_conf/authentication/ipsec_auth_key_config/ah_no_encrypt (empty)
  
      YANG Description: Do not encrypt the key 
      """
      return self.__ah_no_encrypt
        
    def _set_ah_no_encrypt(self, v, load=False):
      """
      Setter method for ah_no_encrypt, mapped from YANG variable /interface/gigabitethernet/ipv6/interface_ospfv3_conf/authentication/ipsec_auth_key_config/ah_no_encrypt (empty)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_ah_no_encrypt is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_ah_no_encrypt() directly.
  
      YANG Description: Do not encrypt the key 
      """
      if hasattr(v, "_utype"):
        v = v._utype(v)
      try:
        t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="ah-no-encrypt", rest_name="no-encrypt", parent=self, choice=(u'ch-algorithm', u'ca-ah-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Do not encrypt the key ', u'cli-optional-in-sequence': None, u'alt-name': u'no-encrypt', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='empty', is_config=True)
      except (TypeError, ValueError):
        raise ValueError({
            'error-string': """ah_no_encrypt must be of a type compatible with empty""",
            'defined-type': "empty",
            'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="ah-no-encrypt", rest_name="no-encrypt", parent=self, choice=(u'ch-algorithm', u'ca-ah-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Do not encrypt the key ', u'cli-optional-in-sequence': None, u'alt-name': u'no-encrypt', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='empty', is_config=True)""",
          })
  
      self.__ah_no_encrypt = t
      if hasattr(self, '_set'):
        self._set()
  
    def _unset_ah_no_encrypt(self):
      self.__ah_no_encrypt = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="ah-no-encrypt", rest_name="no-encrypt", parent=self, choice=(u'ch-algorithm', u'ca-ah-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Do not encrypt the key ', u'cli-optional-in-sequence': None, u'alt-name': u'no-encrypt', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='empty', is_config=True)
  
  
    def _get_ah_key(self):
      """
      Getter method for ah_key, mapped from YANG variable /interface/gigabitethernet/ipv6/interface_ospfv3_conf/authentication/ipsec_auth_key_config/ah_key (ipsec-authentication-hexkey-string)
  
      YANG Description: Key used for ah
      """
      return self.__ah_key
        
    def _set_ah_key(self, v, load=False):
      """
      Setter method for ah_key, mapped from YANG variable /interface/gigabitethernet/ipv6/interface_ospfv3_conf/authentication/ipsec_auth_key_config/ah_key (ipsec-authentication-hexkey-string)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_ah_key is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_ah_key() directly.
  
      YANG Description: Key used for ah
      """
      if hasattr(v, "_utype"):
        v = v._utype(v)
      try:
        t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'0..80']}), is_leaf=True, yang_name="ah-key", rest_name="key", parent=self, choice=(u'ch-algorithm', u'ca-ah-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Key used for ah', u'alt-name': u'key', u'suppress-echo': u'true'}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='ipsec-authentication-hexkey-string', is_config=True)
      except (TypeError, ValueError):
        raise ValueError({
            'error-string': """ah_key must be of a type compatible with ipsec-authentication-hexkey-string""",
            'defined-type': "brocade-ospfv3:ipsec-authentication-hexkey-string",
            'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'0..80']}), is_leaf=True, yang_name="ah-key", rest_name="key", parent=self, choice=(u'ch-algorithm', u'ca-ah-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Key used for ah', u'alt-name': u'key', u'suppress-echo': u'true'}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='ipsec-authentication-hexkey-string', is_config=True)""",
          })
  
      self.__ah_key = t
      if hasattr(self, '_set'):
        self._set()
  
    def _unset_ah_key(self):
      self.__ah_key = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'0..80']}), is_leaf=True, yang_name="ah-key", rest_name="key", parent=self, choice=(u'ch-algorithm', u'ca-ah-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Key used for ah', u'alt-name': u'key', u'suppress-echo': u'true'}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='ipsec-authentication-hexkey-string', is_config=True)
  
  
    def _get_esp(self):
      """
      Getter method for esp, mapped from YANG variable /interface/gigabitethernet/ipv6/interface_ospfv3_conf/authentication/ipsec_auth_key_config/esp (algorithm-type-esp)
  
      YANG Description: Specify Encapsulating Security Payload (ESP) as the protocol to provide packet-level security. 
      """
      return self.__esp
        
    def _set_esp(self, v, load=False):
      """
      Setter method for esp, mapped from YANG variable /interface/gigabitethernet/ipv6/interface_ospfv3_conf/authentication/ipsec_auth_key_config/esp (algorithm-type-esp)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_esp is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_esp() directly.
  
      YANG Description: Specify Encapsulating Security Payload (ESP) as the protocol to provide packet-level security. 
      """
      if hasattr(v, "_utype"):
        v = v._utype(v)
      try:
        t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'NULL': {'value': 1}},), is_leaf=True, yang_name="esp", rest_name="esp", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Specify Encapsulating Security Payload (ESP)', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='algorithm-type-esp', is_config=True)
      except (TypeError, ValueError):
        raise ValueError({
            'error-string': """esp must be of a type compatible with algorithm-type-esp""",
            'defined-type': "brocade-ospfv3:algorithm-type-esp",
            'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'NULL': {'value': 1}},), is_leaf=True, yang_name="esp", rest_name="esp", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Specify Encapsulating Security Payload (ESP)', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='algorithm-type-esp', is_config=True)""",
          })
  
      self.__esp = t
      if hasattr(self, '_set'):
        self._set()
  
    def _unset_esp(self):
      self.__esp = YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'NULL': {'value': 1}},), is_leaf=True, yang_name="esp", rest_name="esp", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Specify Encapsulating Security Payload (ESP)', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='algorithm-type-esp', is_config=True)
  
  
    def _get_esp_no_encrypt(self):
      """
      Getter method for esp_no_encrypt, mapped from YANG variable /interface/gigabitethernet/ipv6/interface_ospfv3_conf/authentication/ipsec_auth_key_config/esp_no_encrypt (empty)
  
      YANG Description: Do not encrypt the key 
      """
      return self.__esp_no_encrypt
        
    def _set_esp_no_encrypt(self, v, load=False):
      """
      Setter method for esp_no_encrypt, mapped from YANG variable /interface/gigabitethernet/ipv6/interface_ospfv3_conf/authentication/ipsec_auth_key_config/esp_no_encrypt (empty)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_esp_no_encrypt is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_esp_no_encrypt() directly.
  
      YANG Description: Do not encrypt the key 
      """
      if hasattr(v, "_utype"):
        v = v._utype(v)
      try:
        t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="esp-no-encrypt", rest_name="esp-no-encrypt", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Do not encrypt the key ', u'cli-optional-in-sequence': None, u'hidden': u'full', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='empty', is_config=True)
      except (TypeError, ValueError):
        raise ValueError({
            'error-string': """esp_no_encrypt must be of a type compatible with empty""",
            'defined-type': "empty",
            'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="esp-no-encrypt", rest_name="esp-no-encrypt", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Do not encrypt the key ', u'cli-optional-in-sequence': None, u'hidden': u'full', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='empty', is_config=True)""",
          })
  
      self.__esp_no_encrypt = t
      if hasattr(self, '_set'):
        self._set()
  
    def _unset_esp_no_encrypt(self):
      self.__esp_no_encrypt = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="esp-no-encrypt", rest_name="esp-no-encrypt", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Do not encrypt the key ', u'cli-optional-in-sequence': None, u'hidden': u'full', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='empty', is_config=True)
  
  
    def _get_esp_key(self):
      """
      Getter method for esp_key, mapped from YANG variable /interface/gigabitethernet/ipv6/interface_ospfv3_conf/authentication/ipsec_auth_key_config/esp_key (ipsec-authentication-hexkey-string)
  
      YANG Description: Hexadecimal key string for ESP
      """
      return self.__esp_key
        
    def _set_esp_key(self, v, load=False):
      """
      Setter method for esp_key, mapped from YANG variable /interface/gigabitethernet/ipv6/interface_ospfv3_conf/authentication/ipsec_auth_key_config/esp_key (ipsec-authentication-hexkey-string)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_esp_key is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_esp_key() directly.
  
      YANG Description: Hexadecimal key string for ESP
      """
      if hasattr(v, "_utype"):
        v = v._utype(v)
      try:
        t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'0..80']}), is_leaf=True, yang_name="esp-key", rest_name="esp-key", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Hexadecimal key string for ESP', u'hidden': u'full', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='ipsec-authentication-hexkey-string', is_config=True)
      except (TypeError, ValueError):
        raise ValueError({
            'error-string': """esp_key must be of a type compatible with ipsec-authentication-hexkey-string""",
            'defined-type': "brocade-ospfv3:ipsec-authentication-hexkey-string",
            'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'0..80']}), is_leaf=True, yang_name="esp-key", rest_name="esp-key", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Hexadecimal key string for ESP', u'hidden': u'full', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='ipsec-authentication-hexkey-string', is_config=True)""",
          })
  
      self.__esp_key = t
      if hasattr(self, '_set'):
        self._set()
  
    def _unset_esp_key(self):
      self.__esp_key = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'0..80']}), is_leaf=True, yang_name="esp-key", rest_name="esp-key", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Hexadecimal key string for ESP', u'hidden': u'full', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='ipsec-authentication-hexkey-string', is_config=True)
  
  
    def _get_esp_auth(self):
      """
      Getter method for esp_auth, mapped from YANG variable /interface/gigabitethernet/ipv6/interface_ospfv3_conf/authentication/ipsec_auth_key_config/esp_auth (algorithm-type-ah)
      """
      return self.__esp_auth
        
    def _set_esp_auth(self, v, load=False):
      """
      Setter method for esp_auth, mapped from YANG variable /interface/gigabitethernet/ipv6/interface_ospfv3_conf/authentication/ipsec_auth_key_config/esp_auth (algorithm-type-ah)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_esp_auth is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_esp_auth() directly.
      """
      if hasattr(v, "_utype"):
        v = v._utype(v)
      try:
        t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'hmac-sha1': {'value': 2}, u'hmac-md5': {'value': 1}},), is_leaf=True, yang_name="esp-auth", rest_name="esp-auth", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Use Authentication Algorithm', u'cli-drop-node-name': None, u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='algorithm-type-ah', is_config=True)
      except (TypeError, ValueError):
        raise ValueError({
            'error-string': """esp_auth must be of a type compatible with algorithm-type-ah""",
            'defined-type': "brocade-ospfv3:algorithm-type-ah",
            'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'hmac-sha1': {'value': 2}, u'hmac-md5': {'value': 1}},), is_leaf=True, yang_name="esp-auth", rest_name="esp-auth", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Use Authentication Algorithm', u'cli-drop-node-name': None, u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='algorithm-type-ah', is_config=True)""",
          })
  
      self.__esp_auth = t
      if hasattr(self, '_set'):
        self._set()
  
    def _unset_esp_auth(self):
      self.__esp_auth = YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'hmac-sha1': {'value': 2}, u'hmac-md5': {'value': 1}},), is_leaf=True, yang_name="esp-auth", rest_name="esp-auth", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Use Authentication Algorithm', u'cli-drop-node-name': None, u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='algorithm-type-ah', is_config=True)
  
  
    def _get_esp_auth_no_encrypt(self):
      """
      Getter method for esp_auth_no_encrypt, mapped from YANG variable /interface/gigabitethernet/ipv6/interface_ospfv3_conf/authentication/ipsec_auth_key_config/esp_auth_no_encrypt (empty)
  
      YANG Description: Do not encrypt the key 
      """
      return self.__esp_auth_no_encrypt
        
    def _set_esp_auth_no_encrypt(self, v, load=False):
      """
      Setter method for esp_auth_no_encrypt, mapped from YANG variable /interface/gigabitethernet/ipv6/interface_ospfv3_conf/authentication/ipsec_auth_key_config/esp_auth_no_encrypt (empty)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_esp_auth_no_encrypt is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_esp_auth_no_encrypt() directly.
  
      YANG Description: Do not encrypt the key 
      """
      if hasattr(v, "_utype"):
        v = v._utype(v)
      try:
        t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="esp-auth-no-encrypt", rest_name="no-encrypt", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Do not encrypt the key ', u'cli-optional-in-sequence': None, u'alt-name': u'no-encrypt', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='empty', is_config=True)
      except (TypeError, ValueError):
        raise ValueError({
            'error-string': """esp_auth_no_encrypt must be of a type compatible with empty""",
            'defined-type': "empty",
            'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="esp-auth-no-encrypt", rest_name="no-encrypt", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Do not encrypt the key ', u'cli-optional-in-sequence': None, u'alt-name': u'no-encrypt', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='empty', is_config=True)""",
          })
  
      self.__esp_auth_no_encrypt = t
      if hasattr(self, '_set'):
        self._set()
  
    def _unset_esp_auth_no_encrypt(self):
      self.__esp_auth_no_encrypt = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="esp-auth-no-encrypt", rest_name="no-encrypt", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Do not encrypt the key ', u'cli-optional-in-sequence': None, u'alt-name': u'no-encrypt', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='empty', is_config=True)
  
  
    def _get_esp_auth_key(self):
      """
      Getter method for esp_auth_key, mapped from YANG variable /interface/gigabitethernet/ipv6/interface_ospfv3_conf/authentication/ipsec_auth_key_config/esp_auth_key (ipsec-authentication-hexkey-string)
  
      YANG Description: Hexadecimal key string for authentication algorithm
      """
      return self.__esp_auth_key
        
    def _set_esp_auth_key(self, v, load=False):
      """
      Setter method for esp_auth_key, mapped from YANG variable /interface/gigabitethernet/ipv6/interface_ospfv3_conf/authentication/ipsec_auth_key_config/esp_auth_key (ipsec-authentication-hexkey-string)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_esp_auth_key is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_esp_auth_key() directly.
  
      YANG Description: Hexadecimal key string for authentication algorithm
      """
      if hasattr(v, "_utype"):
        v = v._utype(v)
      try:
        t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'0..80']}), is_leaf=True, yang_name="esp-auth-key", rest_name="key", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Hexadecimal key string for authentication algorithm', u'alt-name': u'key', u'suppress-echo': u'true'}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='ipsec-authentication-hexkey-string', is_config=True)
      except (TypeError, ValueError):
        raise ValueError({
            'error-string': """esp_auth_key must be of a type compatible with ipsec-authentication-hexkey-string""",
            'defined-type': "brocade-ospfv3:ipsec-authentication-hexkey-string",
            'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'0..80']}), is_leaf=True, yang_name="esp-auth-key", rest_name="key", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Hexadecimal key string for authentication algorithm', u'alt-name': u'key', u'suppress-echo': u'true'}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='ipsec-authentication-hexkey-string', is_config=True)""",
          })
  
      self.__esp_auth_key = t
      if hasattr(self, '_set'):
        self._set()
  
    def _unset_esp_auth_key(self):
      self.__esp_auth_key = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'0..80']}), is_leaf=True, yang_name="esp-auth-key", rest_name="key", parent=self, choice=(u'ch-algorithm', u'ca-esp-algorithm'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Hexadecimal key string for authentication algorithm', u'alt-name': u'key', u'suppress-echo': u'true'}}, namespace='urn:brocade.com:mgmt:brocade-ospfv3', defining_module='brocade-ospfv3', yang_type='ipsec-authentication-hexkey-string', is_config=True)
  
    spi = __builtin__.property(_get_spi, _set_spi)
    ah = __builtin__.property(_get_ah, _set_ah)
    ah_no_encrypt = __builtin__.property(_get_ah_no_encrypt, _set_ah_no_encrypt)
    ah_key = __builtin__.property(_get_ah_key, _set_ah_key)
    esp = __builtin__.property(_get_esp, _set_esp)
    esp_no_encrypt = __builtin__.property(_get_esp_no_encrypt, _set_esp_no_encrypt)
    esp_key = __builtin__.property(_get_esp_key, _set_esp_key)
    esp_auth = __builtin__.property(_get_esp_auth, _set_esp_auth)
    esp_auth_no_encrypt = __builtin__.property(_get_esp_auth_no_encrypt, _set_esp_auth_no_encrypt)
    esp_auth_key = __builtin__.property(_get_esp_auth_key, _set_esp_auth_key)
  
    __choices__ = {u'ch-algorithm': {u'ca-ah-algorithm': [u'ah', u'ah_no_encrypt', u'ah_key'], u'ca-esp-algorithm': [u'esp', u'esp_no_encrypt', u'esp_key', u'esp_auth', u'esp_auth_no_encrypt', u'esp_auth_key']}}
    _pyangbind_elements = {'spi': spi, 'ah': ah, 'ah_no_encrypt': ah_no_encrypt, 'ah_key': ah_key, 'esp': esp, 'esp_no_encrypt': esp_no_encrypt, 'esp_key': esp_key, 'esp_auth': esp_auth, 'esp_auth_no_encrypt': esp_auth_no_encrypt, 'esp_auth_key': esp_auth_key, }
  
  
  