# -*- coding: utf-8 -*-# pylint: disable=line-too-long,consider-using-f-string"""Subtype Field of the MN-HA and MN-AAA Authentication Mobility Options===========================================================================.. module:: pcapkit.const.mh.auth_subtypeThis module contains the constant enumeration for **Subtype Field of the MN-HA and MN-AAA Authentication Mobility Options**,which is automatically generated from :class:`pcapkit.vendor.mh.auth_subtype.AuthSubtype`."""fromaenumimportIntEnum,extend_enum__all__=['AuthSubtype']
[docs]classAuthSubtype(IntEnum):"""[AuthSubtype] Subtype Field of the MN-HA and MN-AAA Authentication Mobility Options"""#: MN-HA authentication mobility option [:rfc:`4285`]MN_HA=1#: MN-AAA authentication mobility option [:rfc:`4285`]MN_AAA=2@staticmethoddefget(key:'int | str',default:'int'=-1)->'AuthSubtype':"""Backport support for original codes. Args: key: Key to get enum item. default: Default value if not found. :meta private: """ifisinstance(key,int):returnAuthSubtype(key)ifkeynotinAuthSubtype._member_map_:# pylint: disable=no-memberreturnextend_enum(AuthSubtype,key,default)returnAuthSubtype[key]# type: ignore[misc]
[docs]@classmethoddef_missing_(cls,value:'int')->'AuthSubtype':"""Lookup function used when value is not found. Args: value: Value to get enum item. """ifnot(isinstance(value,int)and0<=value<=255):raiseValueError('%r is not a valid %s'%(value,cls.__name__))returnextend_enum(cls,'Unassigned_%d'%value,value)