SlaInformationDTO.fromJson constructor

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

Implementation

factory SlaInformationDTO.fromJson(Map<String, Object?> json) {
  return SlaInformationDTO(
    links: json[r'_links'] != null
        ? SelfLinkDTO.fromJson(json[r'_links']! as Map<String, Object?>)
        : null,
    completedCycles: (json[r'completedCycles'] as List<Object?>?)
            ?.map((i) => SlaInformationCompletedCycleDTO.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    id: json[r'id'] as String?,
    name: json[r'name'] as String?,
    ongoingCycle: json[r'ongoingCycle'] != null
        ? SlaInformationOngoingCycleDTO.fromJson(
            json[r'ongoingCycle']! as Map<String, Object?>)
        : null,
    slaDisplayFormat: json[r'slaDisplayFormat'] as String?,
  );
}