# -*- coding: utf-8 -*-# pylint: disable=line-too-long,consider-using-f-string"""TaggerID Types====================.. module:: pcapkit.const.ipv6.tagger_idThis module contains the constant enumeration for **TaggerID Types**,which is automatically generated from :class:`pcapkit.vendor.ipv6.tagger_id.TaggerID`."""fromaenumimportIntEnum,extend_enum__all__=['TaggerID']
[docs]classTaggerID(IntEnum):"""[TaggerID] TaggerID Types"""#: NULL [:rfc:`6621`]NULL=0#: DEFAULT [:rfc:`6621`]DEFAULT=1#: IPv4 [:rfc:`6621`]IPv4=2#: IPv6 [:rfc:`6621`]IPv6=3@staticmethoddefget(key:'int | str',default:'int'=-1)->'TaggerID':"""Backport support for original codes. Args: key: Key to get enum item. default: Default value if not found. :meta private: """ifisinstance(key,int):returnTaggerID(key)ifkeynotinTaggerID._member_map_:# pylint: disable=no-memberreturnextend_enum(TaggerID,key,default)returnTaggerID[key]# type: ignore[misc]
[docs]@classmethoddef_missing_(cls,value:'int')->'TaggerID':"""Lookup function used when value is not found. Args: value: Value to get enum item. """ifnot(isinstance(value,int)and0<=value<=7):raiseValueError('%r is not a valid %s'%(value,cls.__name__))if4<=value<=7:#: Unassignedreturnextend_enum(cls,'Unassigned_%d'%value,value)returnsuper()._missing_(value)