TopicRule.fromJson constructor
TopicRule.fromJson(
- Map<String, dynamic> json
)
Implementation
factory TopicRule.fromJson(Map<String, dynamic> json) {
return TopicRule(
actions: (json['actions'] as List?)
?.whereNotNull()
.map((e) => Action.fromJson(e as Map<String, dynamic>))
.toList(),
awsIotSqlVersion: json['awsIotSqlVersion'] as String?,
createdAt: timeStampFromJson(json['createdAt']),
description: json['description'] as String?,
errorAction: json['errorAction'] != null
? Action.fromJson(json['errorAction'] as Map<String, dynamic>)
: null,
ruleDisabled: json['ruleDisabled'] as bool?,
ruleName: json['ruleName'] as String?,
sql: json['sql'] as String?,
);
}