// Generated by https://quicktype.io

class Estadisticas {
  List<Estadistica> items = List();

  Estadisticas();

  Estadisticas.fromJsonList(List<dynamic> jsonList) {
    if (jsonList == null) return;

    for (var item in jsonList) {
      final estadistica = new Estadistica.fromJsonMap(item);
      items.add(estadistica);
    }
  }
}

class Estadistica {
  Info info;
  int totalCases;
  int totalRecovered;
  int totalUnresolved;
  int totalDeaths;
  int totalNewCasesToday;
  int totalNewDeathsToday;
  int totalActiveCases;
  int totalSeriousCases;
  int totalDangerRank;

  Estadistica({
    this.info,
    this.totalCases,
    this.totalRecovered,
    this.totalUnresolved,
    this.totalDeaths,
    this.totalNewCasesToday,
    this.totalNewDeathsToday,
    this.totalActiveCases,
    this.totalSeriousCases,
    this.totalDangerRank,
  });

  Estadistica.fromJsonMap(Map<String, dynamic> json) {
    info = Info.fromJsonMap(json);
    totalCases = json['total_cases'];
    totalRecovered = json['total_recovered'];
    totalUnresolved = json['total_unresolved'];
    totalDeaths = json['total_deaths'];
    totalNewCasesToday = json['total_new_cases_today'];
    totalNewDeathsToday = json['total_new_deaths_today'];
    totalActiveCases = json['total_active_cases'];
    totalSeriousCases = json['total_serious_cases'];
    totalDangerRank = json['total_danger_rank'];
  }

  getTotalCases(){
    return this.totalCases;
  }
}

class Info {
  int ourid;
  String title;
  String code;
  String source;

  Info({
    this.ourid,
    this.title,
    this.code,
    this.source,
  });

  Info.fromJsonMap(Map<String, dynamic> json) {
    ourid = json['ourid'];
    title = json['title'];
    code = json['code'];
    source = json['source'];
  }
}
