# -*- coding: utf-8 -*-# pylint: disable=line-too-long,consider-using-f-string"""Flow Binding Type=======================.. module:: pcapkit.const.mh.fb_typeThis module contains the constant enumeration for **Flow Binding Type**,which is automatically generated from :class:`pcapkit.vendor.mh.fb_type.FlowBindingType`."""fromaenumimportIntEnum,extend_enum__all__=['FlowBindingType']
[docs]classFlowBindingType(IntEnum):"""[FlowBindingType] Flow Binding Type"""#: UnassignedUnassigned_0=0#: Flow Binding Indication [:rfc:`7109`]Indication=1#: Flow Binding Acknowledgement [:rfc:`7109`]Acknowledgement=2@staticmethoddefget(key:'int | str',default:'int'=-1)->'FlowBindingType':"""Backport support for original codes. Args: key: Key to get enum item. default: Default value if not found. :meta private: """ifisinstance(key,int):returnFlowBindingType(key)ifkeynotinFlowBindingType._member_map_:# pylint: disable=no-memberreturnextend_enum(FlowBindingType,key,default)returnFlowBindingType[key]# type: ignore[misc]
[docs]@classmethoddef_missing_(cls,value:'int')->'FlowBindingType':"""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__))if3<=value<=255:#: Unassignedreturnextend_enum(cls,'Unassigned_%d'%value,value)returnsuper()._missing_(value)