SubjectRulesReviewStatus.fromJson constructor

SubjectRulesReviewStatus.fromJson(
  1. Map<String, dynamic> json
)

Creates a SubjectRulesReviewStatus from JSON data.

Implementation

factory SubjectRulesReviewStatus.fromJson(Map<String, dynamic> json) {
  final tempEvaluationErrorJson = json['evaluationError'];
  final tempIncompleteJson = json['incomplete'];
  final tempNonResourceRulesJson = json['nonResourceRules'];
  final tempResourceRulesJson = json['resourceRules'];

  final String? tempEvaluationError = tempEvaluationErrorJson;
  final bool tempIncomplete = tempIncompleteJson;

  final List<NonResourceRule> tempNonResourceRules =
      List<dynamic>.from(tempNonResourceRulesJson)
          .map(
            (e) => NonResourceRule.fromJson(
              Map<String, dynamic>.from(e),
            ),
          )
          .toList();

  final List<ResourceRule> tempResourceRules =
      List<dynamic>.from(tempResourceRulesJson)
          .map(
            (e) => ResourceRule.fromJson(
              Map<String, dynamic>.from(e),
            ),
          )
          .toList();

  return SubjectRulesReviewStatus(
    evaluationError: tempEvaluationError,
    incomplete: tempIncomplete,
    nonResourceRules: tempNonResourceRules,
    resourceRules: tempResourceRules,
  );
}