JiraWorkflowStatus.fromJson constructor

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

Implementation

factory JiraWorkflowStatus.fromJson(Map<String, Object?> json) {
  return JiraWorkflowStatus(
    description: json[r'description'] as String?,
    id: json[r'id'] as String?,
    name: json[r'name'] as String?,
    scope: json[r'scope'] != null
        ? WorkflowScope.fromJson(json[r'scope']! as Map<String, Object?>)
        : null,
    statusCategory: json[r'statusCategory'] != null
        ? JiraWorkflowStatusStatusCategory.fromValue(
            json[r'statusCategory']! as String)
        : null,
    statusReference: json[r'statusReference'] as String?,
    usages: (json[r'usages'] as List<Object?>?)
            ?.map((i) => ProjectIssueTypes.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
  );
}