class InfoCalculadora {
  InfoCalculadora({
    this.result,
    this.response,
    this.message,
  });

  Result? result;
  bool? response;
  String? message;

  factory InfoCalculadora.fromJson(Map<String, dynamic> json) => InfoCalculadora(
    result: Result.fromJson(json["result"]),
    response: json["response"],
    message: json["message"],
  );

  Map<String, dynamic> toJson() => {
    "result": result!.toJson(),
    "response": response,
    "message": message,
  };
}

class Result {
  Result({
    this.ventiladores,
    this.ventiladoresTipos,
    this.ventiladoresModelos,
    this.atenuacion,
    this.potenciaSonora,
  });

  List<Ventilador>? ventiladores;
  List<String>? ventiladoresTipos;
  List<List<String>>? ventiladoresModelos;
  List<Atenuacion>? atenuacion;
  List<PotenciaSonora>? potenciaSonora;

  factory Result.fromJson(Map<String, dynamic> json) => Result(
    ventiladores: List<Ventilador>.from(json["ventiladores"].map((x) => Ventilador.fromJson(x))),
    ventiladoresTipos: List<String>.from(json["ventiladores_tipos"].map((x) => x)),
    ventiladoresModelos: List<List<String>>.from(json["ventiladores_modelos"].map((x) => List<String>.from(x.map((x) => x)))),
    atenuacion: List<Atenuacion>.from(json["atenuacion"].map((x) => Atenuacion.fromJson(x))),
    potenciaSonora: List<PotenciaSonora>.from(json["potencia_sonora"].map((x) => PotenciaSonora.fromJson(x))),
  );

  Map<String, dynamic> toJson() => {
    "ventiladores": List<dynamic>.from(ventiladores!.map((x) => x.toJson())),
    "ventiladores_tipos": List<dynamic>.from(ventiladoresTipos!.map((x) => x)),
    "ventiladores_modelos": List<dynamic>.from(ventiladoresModelos!.map((x) => List<dynamic>.from(x.map((x) => x)))),
    "atenuacion": List<dynamic>.from(atenuacion!.map((x) => x.toJson())),
    "potencia_sonora": List<dynamic>.from(potenciaSonora!.map((x) => x.toJson())),
  };
}

class Atenuacion {
  Atenuacion({
    this.idatenuacion,
    this.diametro,
    this.the63Hz,
    this.the125Hz,
    this.the250Hz,
    this.the500Hz,
    this.the1000Hz,
    this.the2000Hz,
    this.the4000Hz,
    this.the8000Hz,
    this.longitud,
    this.modelo,
  });

  String? idatenuacion;
  String? diametro;
  String? the63Hz;
  String? the125Hz;
  String? the250Hz;
  String? the500Hz;
  String? the1000Hz;
  String? the2000Hz;
  String? the4000Hz;
  String? the8000Hz;
  String? longitud;
  String? modelo;

  factory Atenuacion.fromJson(Map<String, dynamic> json) => Atenuacion(
    idatenuacion: json["IDATENUACION"],
    diametro: json["DIAMETRO"],
    the63Hz: json["63Hz"],
    the125Hz: json["125Hz"],
    the250Hz: json["250Hz"],
    the500Hz: json["500Hz"],
    the1000Hz: json["1000Hz"],
    the2000Hz: json["2000Hz"],
    the4000Hz: json["4000Hz"],
    the8000Hz: json["8000Hz"],
    longitud: json["LONGITUD"],
    modelo: json["MODELO"],
  );

  Map<String, dynamic> toJson() => {
    "IDATENUACION": idatenuacion,
    "DIAMETRO": diametro,
    "63Hz": the63Hz,
    "125Hz": the125Hz,
    "250Hz": the250Hz,
    "500Hz": the500Hz,
    "1000Hz": the1000Hz,
    "2000Hz": the2000Hz,
    "4000Hz": the4000Hz,
    "8000Hz": the8000Hz,
    "LONGITUD": longitud,
    "MODELO": modelo,
  };
}

class PotenciaSonora {
  PotenciaSonora({
    this.idpotson,
    this.msec,
    this.ftmin,
    this.the63Hz,
    this.the125Hz,
    this.the250Hz,
    this.the500Hz,
    this.the1000Hz,
    this.the2000Hz,
    this.the4000Hz,
    this.the8000Hz,
  });

  String? idpotson;
  String? msec;
  String? ftmin;
  String? the63Hz;
  String? the125Hz;
  String? the250Hz;
  String? the500Hz;
  String? the1000Hz;
  String? the2000Hz;
  String? the4000Hz;
  String? the8000Hz;

  factory PotenciaSonora.fromJson(Map<String, dynamic> json) => PotenciaSonora(
    idpotson: json["IDPOTSON"],
    msec: json["MSEC"],
    ftmin: json["FTMIN"],
    the63Hz: json["63Hz"],
    the125Hz: json["125Hz"],
    the250Hz: json["250Hz"],
    the500Hz: json["500Hz"],
    the1000Hz: json["1000Hz"],
    the2000Hz: json["2000Hz"],
    the4000Hz: json["4000Hz"],
    the8000Hz: json["8000Hz"],
  );

  Map<String, dynamic> toJson() => {
    "IDPOTSON": idpotson,
    "MSEC": msec,
    "FTMIN": ftmin,
    "63Hz": the63Hz,
    "125Hz": the125Hz,
    "250Hz": the250Hz,
    "500Hz": the500Hz,
    "1000Hz": the1000Hz,
    "2000Hz": the2000Hz,
    "4000Hz": the4000Hz,
    "8000Hz": the8000Hz,
  };
}

class Ventilador{
  Ventilador({
    this.idmodelo,
    this.tipo,
    this.modelo,
    this.the63Hz,
    this.the125Hz,
    this.the250Hz,
    this.the500Hz,
    this.the1000Hz,
    this.the2000Hz,
    this.the4000Hz,
    this.the8000Hz,
    this.pulgadas,
    this.presion,
    this.desc,
  });

  String? idmodelo;
  String? tipo;
  String? modelo;
  String? the63Hz;
  String? the125Hz;
  String? the250Hz;
  String? the500Hz;
  String? the1000Hz;
  String? the2000Hz;
  String? the4000Hz;
  String? the8000Hz;
  String? pulgadas;
  String? presion;
  String? desc;

  factory Ventilador.fromJson(Map<String, dynamic> json) => Ventilador(
    idmodelo: json["IDMODELO"],
    tipo: json["TIPO"],
    modelo: json["MODELO"],
    the63Hz: json["63Hz"],
    the125Hz: json["125Hz"],
    the250Hz: json["250Hz"],
    the500Hz: json["500Hz"],
    the1000Hz: json["1000Hz"],
    the2000Hz: json["2000Hz"],
    the4000Hz: json["4000Hz"],
    the8000Hz: json["8000Hz"],
    pulgadas: json["PULGADAS"],
    presion: json["PRESION"],
    desc: json["DESC"],
  );

  Map<String, dynamic> toJson() => {
    "IDMODELO": idmodelo,
    "TIPO": tipo,
    "MODELO": modelo,
    "63Hz": the63Hz,
    "125Hz": the125Hz,
    "250Hz": the250Hz,
    "500Hz": the500Hz,
    "1000Hz": the1000Hz,
    "2000Hz": the2000Hz,
    "4000Hz": the4000Hz,
    "8000Hz": the8000Hz,
    "PULGADAS": pulgadas,
    "PRESION": presion,
    "DESC": desc,
  };
}