toJson method

Map<String, Object> toJson()

Converts a SubjectRulesReviewStatus instance to JSON data.

Implementation

Map<String, Object> toJson() {
  final jsonData = <String, Object>{};

  final tempEvaluationError = evaluationError;
  final tempIncomplete = incomplete;
  final tempNonResourceRules = nonResourceRules;
  final tempResourceRules = resourceRules;

  if (tempEvaluationError != null) {
    jsonData['evaluationError'] = tempEvaluationError;
  }

  jsonData['incomplete'] = tempIncomplete;

  jsonData['nonResourceRules'] =
      tempNonResourceRules.map((e) => e.toJson()).toList(growable: false);

  jsonData['resourceRules'] =
      tempResourceRules.map((e) => e.toJson()).toList(growable: false);

  return jsonData;
}