Alarm class

Constructors

Alarm({required String eventId, required String deviceId, required String alarmId, required AlarmEventTypeEnum eventType, required DateTime eventTimestamp, String? text, String? schemaName, int? schemaId, String? orgId, Map<String, dynamic> alarmData = const {}})
Returns a new Alarm instance.

Properties

alarmData ↔ Map<String, dynamic>
Optional object to include additional data specific to the alarm event. The schema and content of this object would be defined separately based on specific alarm requirements. Can be omitted if no additional data is needed for the event.
getter/setter pair
alarmId ↔ String
Unique identifier for the specific alarm type. Use 'N/A' or a placeholder if the event is a DEVICE_ONLINE or DEVICE_OFFLINE event.
getter/setter pair
deviceId ↔ String
Unique identifier for the device originating the event.
getter/setter pair
eventId ↔ String
Universally Unique Identifier (UUID) for this specific event instance. Used for tracking and idempotency.
getter/setter pair
eventTimestamp ↔ DateTime
Timestamp of the event in Unix epoch seconds.
getter/setter pair
eventType ↔ AlarmEventTypeEnum
Type of event. Allowed values are: ALARM_ACTIVE, ALARM_CLEARED, ALARM_ACKNOWLEDGED, DEVICE_ONLINE, DEVICE_OFFLINE.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
orgId ↔ String?
organization identifier
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
schemaId ↔ int?
Please note: This property should have been non-nullable! Since the specification file does not include a default value (using the "default:" property), however, the generated source code must fall back to having a nullable type. Consider adding a "default:" property in the specification file to hide this note.
getter/setter pair
schemaName ↔ String?
Please note: This property should have been non-nullable! Since the specification file does not include a default value (using the "default:" property), however, the generated source code must fall back to having a nullable type. Consider adding a "default:" property in the specification file to hide this note.
getter/setter pair
text ↔ String?
Please note: This property should have been non-nullable! Since the specification file does not include a default value (using the "default:" property), however, the generated source code must fall back to having a nullable type. Consider adding a "default:" property in the specification file to hide this note.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(dynamic value) → Alarm?
Returns a new Alarm instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<Alarm>
mapFromJson(dynamic json) → Map<String, Alarm>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<Alarm>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.