Enumeration Type
Module: thinkiq.model.enumeration_type
EnumerationType
- class thinkiq.model.enumeration_type.EnumerationType(**kwargs)
EnumerationType - ThinkIQ entity for mapping numeric codes to human-readable names.
Enumeration types map numeric codes to human-readable names, descriptions, and color codes.
Properties:
- id: int
- default_enumeration_values: list[str]
- enumeration_names: list[str]
- enumeration_descriptions: list[str]
- enumeration_color_codes: list[str]
- enum_lookup: dict
Mapping from values to names.
Methods
- __init__(**kwargs)
Construct a Node (aka Thing) object using keyword arguments that will become properties of the returned object.
- save()
- Return type:
None
- delete()
- Return type:
None
- decode(values)
Convert numeric codes into names.
- Return type:
Union[str,list]
- encode(values)
Convert names into numeric codes.
- Return type:
Union[Any,list]
Integration with Attribute
Attributes of type “enumeration” can attach an EnumerationType.
Get enumeration type .. automethod:: thinkiq.model.attribute.Attribute.get_enumeration_type
Decode values .. automethod:: thinkiq.model.attribute.Attribute.decode
Encode names .. automethod:: thinkiq.model.attribute.Attribute.encode