toJson method
Converts a SubjectAccessReviewStatus instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempAllowed = allowed;
final tempDenied = denied;
final tempEvaluationError = evaluationError;
final tempReason = reason;
jsonData['allowed'] = tempAllowed;
if (tempDenied != null) {
jsonData['denied'] = tempDenied;
}
if (tempEvaluationError != null) {
jsonData['evaluationError'] = tempEvaluationError;
}
if (tempReason != null) {
jsonData['reason'] = tempReason;
}
return jsonData;
}