class ItemByMedicineModel {
  List<Frequencies> frequencies;
  List<Routes> routes;
  List<Strengths> strengths;

  ItemByMedicineModel({this.frequencies, this.routes, this.strengths});

  ItemByMedicineModel.fromJson(Map<String, dynamic> json) {
    if (json['frequencies'] != null) {
      frequencies = new List<Frequencies>();
      json['frequencies'].forEach((v) {
        frequencies.add(new Frequencies.fromJson(v));
      });
    }
    if (json['routes'] != null) {
      routes = new List<Routes>();
      json['routes'].forEach((v) {
        routes.add(new Routes.fromJson(v));
      });
    }
    if (json['strengths'] != null) {
      strengths = new List<Strengths>();
      json['strengths'].forEach((v) {
        strengths.add(new Strengths.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.frequencies != null) {
      data['frequencies'] = this.frequencies.map((v) => v.toJson()).toList();
    }
    if (this.routes != null) {
      data['routes'] = this.routes.map((v) => v.toJson()).toList();
    }
    if (this.strengths != null) {
      data['strengths'] = this.strengths.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Frequencies {
  String description;
  bool isDefault;
  int parameterCode;

  Frequencies({this.description, this.isDefault, this.parameterCode});

  Frequencies.fromJson(Map<String, dynamic> json) {
    description = json['description'];
    isDefault = json['isDefault'];
    parameterCode = json['parameterCode'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['description'] = this.description;
    data['isDefault'] = this.isDefault;
    data['parameterCode'] = this.parameterCode;
    return data;
  }
}

class Strengths {
  String description;
  bool isDefault;
  int parameterCode;

  Strengths({this.description, this.isDefault, this.parameterCode});

  Strengths.fromJson(Map<String, dynamic> json) {
    description = json['description'];
    isDefault = json['isDefault'];
    parameterCode = json['parameterCode'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['description'] = this.description;
    data['isDefault'] = this.isDefault;
    data['parameterCode'] = this.parameterCode;
    return data;
  }
}

class Routes {
  String description;
  bool isDefault;
  int parameterCode;

  Routes({this.description, this.isDefault, this.parameterCode});

  Routes.fromJson(Map<String, dynamic> json) {
    description = json['description'];
    isDefault = json['isDefault'];
    parameterCode = json['parameterCode'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['description'] = this.description;
    data['isDefault'] = this.isDefault;
    data['parameterCode'] = this.parameterCode;
    return data;
  }
}
