# -*- coding: utf-8 -*-# pylint: disable=line-too-long,consider-using-f-string"""Operator-Identifier Type Registry=======================================.. module:: pcapkit.const.mh.operator_idThis module contains the constant enumeration for **Operator-Identifier Type Registry**,which is automatically generated from :class:`pcapkit.vendor.mh.operator_id.OperatorID`."""fromaenumimportIntEnum,extend_enum__all__=['OperatorID']
[docs]classOperatorID(IntEnum):"""[OperatorID] Operator-Identifier Type Registry"""#: Reserved [:rfc:`6757`]Reserved_0=0#: Operator-Identifier as a variable-length Private Enterprise Number (PEN)#: [:rfc:`6757`]Operator_Identifier_as_a_variable_length_Private_Enterprise_Number=1#: Realm of the Operator [:rfc:`6757`]Realm_of_the_Operator=2#: Reserved [:rfc:`6757`]Reserved_255=255@staticmethoddefget(key:'int | str',default:'int'=-1)->'OperatorID':"""Backport support for original codes. Args: key: Key to get enum item. default: Default value if not found. :meta private: """ifisinstance(key,int):returnOperatorID(key)ifkeynotinOperatorID._member_map_:# pylint: disable=no-memberreturnextend_enum(OperatorID,key,default)returnOperatorID[key]# type: ignore[misc]
[docs]@classmethoddef_missing_(cls,value:'int')->'OperatorID':"""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<=254:#: Unassignedreturnextend_enum(cls,'Unassigned_%d'%value,value)returnsuper()._missing_(value)