ComponentWithIssueCount.fromJson constructor

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

Implementation

factory ComponentWithIssueCount.fromJson(Map<String, Object?> json) {
  return ComponentWithIssueCount(
    assignee: json[r'assignee'] != null
        ? User.fromJson(json[r'assignee']! as Map<String, Object?>)
        : null,
    assigneeType: json[r'assigneeType'] != null
        ? ComponentWithIssueCountAssigneeType.fromValue(
            json[r'assigneeType']! as String)
        : null,
    description: json[r'description'] as String?,
    id: json[r'id'] as String?,
    isAssigneeTypeValid: json[r'isAssigneeTypeValid'] as bool? ?? false,
    issueCount: (json[r'issueCount'] as num?)?.toInt(),
    lead: json[r'lead'] != null
        ? User.fromJson(json[r'lead']! as Map<String, Object?>)
        : null,
    name: json[r'name'] as String?,
    project: json[r'project'] as String?,
    projectId: (json[r'projectId'] as num?)?.toInt(),
    realAssignee: json[r'realAssignee'] != null
        ? User.fromJson(json[r'realAssignee']! as Map<String, Object?>)
        : null,
    realAssigneeType: json[r'realAssigneeType'] != null
        ? ComponentWithIssueCountRealAssigneeType.fromValue(
            json[r'realAssigneeType']! as String)
        : null,
    self: json[r'self'] as String?,
  );
}