# -*- coding: utf-8 -*-# pylint: disable=line-too-long,consider-using-f-string"""Mobile Node Group Identifier Type Registry================================================.. module:: pcapkit.const.mh.mn_group_idThis module contains the constant enumeration for **Mobile Node Group Identifier Type Registry**,which is automatically generated from :class:`pcapkit.vendor.mh.mn_group_id.MNGroupID`."""fromaenumimportIntEnum,extend_enum__all__=['MNGroupID']
[docs]classMNGroupID(IntEnum):"""[MNGroupID] Mobile Node Group Identifier Type Registry"""#: Reserved [:rfc:`6602`]Reserved_0=0#: Bulk Binding Update Group [:rfc:`6602`]Bulk_Binding_Update_Group=1#: Reserved [:rfc:`6602`]Reserved_255=255@staticmethoddefget(key:'int | str',default:'int'=-1)->'MNGroupID':"""Backport support for original codes. Args: key: Key to get enum item. default: Default value if not found. :meta private: """ifisinstance(key,int):returnMNGroupID(key)ifkeynotinMNGroupID._member_map_:# pylint: disable=no-memberreturnextend_enum(MNGroupID,key,default)returnMNGroupID[key]# type: ignore[misc]
[docs]@classmethoddef_missing_(cls,value:'int')->'MNGroupID':"""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__))if2<=value<=254:#: Unassignedreturnextend_enum(cls,'Unassigned_%d'%value,value)returnsuper()._missing_(value)