Enum types - AWS IoT Things Graph

Enum types

The EnumType construct defines an enumeration that associates unique identifiers to integer values within a specified scope.

Example: Enum types

The following example specifies integer values for Low, Medium, and High. Use the enumValue directive to assign integer values to each identifier.

enum lowMediumHigh @enumType(id:'urn:tdm:aws:enum:lowMediumHigh') { Low @enumValue(value:0), Medium @enumValue(value:1), High @enumValue(value:2) } enum trueFalse @enumType(id:'urn:tdm:aws:enum:trueFalse') { TRUE @enumValue(value:0), FALSE @enumValue(value:1) }