ReviewAttemptByOrdinalRequest.fromJson constructor

ReviewAttemptByOrdinalRequest.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory ReviewAttemptByOrdinalRequest.fromJson(
  Map<String, Object?> json,
) =>
    ReviewAttemptByOrdinalRequest(
      publicMessage: json["public_message"] == null
          ? null
          : json["public_message"] as String,
      reasons: json["reasons"] == null
          ? null
          : (json["reasons"] as List)
              .map(
                (item) => ReviewReasonInput.fromJson(
                  (item as Map).cast<String, Object?>(),
                ),
              )
              .toList(),
      attemptOrdinal: (json["attempt_ordinal"] as num).toInt(),
      decision: UploadReviewDecision.fromJson(json["decision"]),
      id: json["id"] as String,
    );