# -*- coding: utf-8 -*-# pylint: disable=line-too-long,consider-using-f-string"""QS Functions==================.. module:: pcapkit.const.ipv6.qs_functionThis module contains the constant enumeration for **QS Functions**,which is automatically generated from :class:`pcapkit.vendor.ipv6.qs_function.QSFunction`."""fromaenumimportIntEnum,extend_enum__all__=['QSFunction']
[docs]classQSFunction(IntEnum):"""[QSFunction] QS Functions"""Quick_Start_Request=0Report_of_Approved_Rate=8@staticmethoddefget(key:'int | str',default:'int'=-1)->'QSFunction':"""Backport support for original codes. Args: key: Key to get enum item. default: Default value if not found. :meta private: """ifisinstance(key,int):returnQSFunction(key)ifkeynotinQSFunction._member_map_:# pylint: disable=no-memberreturnextend_enum(QSFunction,key,default)returnQSFunction[key]# type: ignore[misc]
[docs]@classmethoddef_missing_(cls,value:'int')->'QSFunction':"""Lookup function used when value is not found. Args: value: Value to get enum item. """ifnot(isinstance(value,int)and0<=value<=8):raiseValueError('%r is not a valid %s'%(value,cls.__name__))returnextend_enum(cls,'Unassigned_%d'%value,value)