SlaInformationOngoingCycleDTO.fromJson constructor

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

Implementation

factory SlaInformationOngoingCycleDTO.fromJson(Map<String, Object?> json) {
  return SlaInformationOngoingCycleDTO(
    breachTime: json[r'breachTime'] != null
        ? DateDTO.fromJson(json[r'breachTime']! as Map<String, Object?>)
        : null,
    breached: json[r'breached'] as bool? ?? false,
    elapsedTime: json[r'elapsedTime'] != null
        ? DurationDTO.fromJson(json[r'elapsedTime']! as Map<String, Object?>)
        : null,
    goalDuration: json[r'goalDuration'] != null
        ? DurationDTO.fromJson(json[r'goalDuration']! as Map<String, Object?>)
        : null,
    paused: json[r'paused'] as bool? ?? false,
    remainingTime: json[r'remainingTime'] != null
        ? DurationDTO.fromJson(
            json[r'remainingTime']! as Map<String, Object?>)
        : null,
    startTime: json[r'startTime'] != null
        ? DateDTO.fromJson(json[r'startTime']! as Map<String, Object?>)
        : null,
    withinCalendarHours: json[r'withinCalendarHours'] as bool? ?? false,
  );
}