# -*- coding: utf-8 -*-# pylint: disable=line-too-long,consider-using-f-string"""Simplified Multicast Forwarding Duplicate Packet Detection (``SMF_DPD``) Options======================================================================================.. module:: pcapkit.const.ipv6.smf_dpd_modeThis module contains the constant enumeration for **Simplified Multicast Forwarding Duplicate Packet Detection (``SMF_DPD``) Options**,which is automatically generated from :class:`pcapkit.vendor.ipv6.smf_dpd_mode.SMFDPDMode`."""fromaenumimportIntEnum,extend_enum__all__=['SMFDPDMode']
[docs]classSMFDPDMode(IntEnum):"""[SMFDPDMode] Simplified Multicast Forwarding Duplicate Packet Detection (``SMF_DPD``) Options"""I_DPD=0H_DPD=1@staticmethoddefget(key:'int | str',default:'int'=-1)->'SMFDPDMode':"""Backport support for original codes. Args: key: Key to get enum item. default: Default value if not found. :meta private: """ifisinstance(key,int):returnSMFDPDMode(key)ifkeynotinSMFDPDMode._member_map_:# pylint: disable=no-memberreturnextend_enum(SMFDPDMode,key,default)returnSMFDPDMode[key]# type: ignore[misc]
[docs]@classmethoddef_missing_(cls,value:'int')->'SMFDPDMode':"""Lookup function used when value is not found. Args: value: Value to get enum item. """ifnot(isinstance(value,int)and0<=value<=1):raiseValueError('%r is not a valid %s'%(value,cls.__name__))returnextend_enum(cls,'Unassigned_%d'%value,value)