toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final detectorModelName = this.detectorModelName;
  final messageId = this.messageId;
  final state = this.state;
  final keyValue = this.keyValue;
  return {
    'detectorModelName': detectorModelName,
    'messageId': messageId,
    'state': state,
    if (keyValue != null) 'keyValue': keyValue,
  };
}