# -*- coding: utf-8 -*-# pylint: disable=line-too-long,consider-using-f-string"""HIP Transport Modes=========================.. module:: pcapkit.const.hip.transportThis module contains the constant enumeration for **HIP Transport Modes**,which is automatically generated from :class:`pcapkit.vendor.hip.transport.Transport`."""fromaenumimportIntEnum,extend_enum__all__=['Transport']
[docs]classTransport(IntEnum):"""[Transport] HIP Transport Modes"""#: RESERVED [:rfc:`6261`]RESERVED_0=0#: DEFAULT [:rfc:`6261`]DEFAULT=1#: ESP [:rfc:`6261`]ESP=2#: ESP-TCP [:rfc:`6261`]ESP_TCP=3@staticmethoddefget(key:'int | str',default:'int'=-1)->'Transport':"""Backport support for original codes. Args: key: Key to get enum item. default: Default value if not found. :meta private: """ifisinstance(key,int):returnTransport(key)ifkeynotinTransport._member_map_:# pylint: disable=no-memberreturnextend_enum(Transport,key,default)returnTransport[key]# type: ignore[misc]
[docs]@classmethoddef_missing_(cls,value:'int')->'Transport':"""Lookup function used when value is not found. Args: value: Value to get enum item. """ifnot(isinstance(value,int)and0<=value<=3):raiseValueError('%r is not a valid %s'%(value,cls.__name__))returnsuper()._missing_(value)