# -*- coding: utf-8 -*-# pylint: disable=line-too-long,consider-using-f-string"""Flow Identification Mobility Option Status Codes======================================================.. module:: pcapkit.const.mh.flow_id_statusThis module contains the constant enumeration for **Flow Identification Mobility Option Status Codes**,which is automatically generated from :class:`pcapkit.vendor.mh.flow_id_status.FlowIDStatus`."""fromaenumimportIntEnum,extend_enum__all__=['FlowIDStatus']
[docs]classFlowIDStatus(IntEnum):"""[FlowIDStatus] Flow Identification Mobility Option Status Codes"""#: Flow binding successful [:rfc:`6089`]Flow_binding_successful=0#: Administratively prohibited [:rfc:`6089`]Administratively_prohibited=128#: Flow binding rejected, reason unspecified [:rfc:`6089`]Flow_binding_rejected_reason_unspecified=129#: Flow identification mobility option malformed [:rfc:`6089`]Flow_identification_mobility_option_malformed=130#: BID not found [:rfc:`6089`]BID_not_found=131#: FID not found [:rfc:`6089`]FID_not_found=132#: Traffic selector format not supported [:rfc:`6089`]Traffic_selector_format_not_supported=133@staticmethoddefget(key:'int | str',default:'int'=-1)->'FlowIDStatus':"""Backport support for original codes. Args: key: Key to get enum item. default: Default value if not found. :meta private: """ifisinstance(key,int):returnFlowIDStatus(key)ifkeynotinFlowIDStatus._member_map_:# pylint: disable=no-memberreturnextend_enum(FlowIDStatus,key,default)returnFlowIDStatus[key]# type: ignore[misc]
[docs]@classmethoddef_missing_(cls,value:'int')->'FlowIDStatus':"""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__))if1<=value<=127:#: Unassigned; available for success codesreturnextend_enum(cls,'Unassigned_available_for_success_codes_%d'%value,value)if134<=value<=250:#: Unassigned; available for reject codesreturnextend_enum(cls,'Unassigned_available_for_reject_codes_%d'%value,value)if251<=value<=255:#: Reserved for Experimental Use [:rfc:`6089`]returnextend_enum(cls,'Reserved_for_Experimental_Use_%d'%value,value)returnsuper()._missing_(value)