toMap method

  1. @override
Map<String, dynamic> toMap()
override

Implementation

@override
Map<String, dynamic> toMap() {
  return {
    "\$id": $id,
    "\$createdAt": $createdAt,
    "\$updatedAt": $updatedAt,
    "monitorId": monitorId,
    "projectId": projectId,
    "name": name,
    "status": status.value,
    "resolvedAt": resolvedAt,
    "acknowledgedAt": acknowledgedAt,
    "acknowledgedBy": acknowledgedBy,
    "acknowledgedByName": acknowledgedByName,
    "escalationId": escalationId,
    "escalationStep": escalationStep,
    "escalationRound": escalationRound,
    "escalatesAt": escalatesAt,
    "rules": rules,
    "severity": severity.value,
    "metric": metric?.value,
    "comparator": comparator?.value,
    "threshold": threshold,
    "value": value,
    "peak": peak,
    "type": type.value,
    "resourceType": resourceType.value,
    "resourceId": resourceId,
    "notifications": notifications,
    "latency": latency,
    "result": result?.value,
  };
}