///
/// Code generated by jsonToDartModel https://ashamp.github.io/jsonToDartModel/
///
class WardData {
/*
{
  "WardId": 1,
  "DistrictId": 1,
  "WardName": "Phường Phúc Xá"
}
*/

  int? wardId;
  int? districtId;
  String? wardName;

  WardData({
    this.wardId,
    this.districtId,
    this.wardName,
  });
  WardData.fromJson(Map<String, dynamic> json) {
    wardId = json["WardId"]?.toInt();
    districtId = json["DistrictId"]?.toInt();
    wardName = json["WardName"]?.toString();
  }
  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data["WardId"] = wardId;
    data["DistrictId"] = districtId;
    data["WardName"] = wardName;
    return data;
  }
}

class WardResponse {
/*
{
  "totalRecord": 0,
  "isSuccess": true,
  "errorMesssage": null,
  "Data": [
    {
      "WardId": 1,
      "DistrictId": 1,
      "WardName": "Phường Phúc Xá"
    }
  ],
  "message": null
}
*/

  int? totalRecord;
  bool? isSuccess;
  String? errorMesssage;
  List<WardData>? data;
  String? message;

  WardResponse({
    this.totalRecord,
    this.isSuccess,
    this.errorMesssage,
    this.data,
    this.message,
  });
  WardResponse.fromJson(Map<String, dynamic> json) {
    totalRecord = json["totalRecord"]?.toInt();
    isSuccess = json["isSuccess"];
    errorMesssage = json["errorMesssage"]?.toString();
    if (json["Data"] != null) {
      final v = json["Data"];
      final arr0 = <WardData>[];
      v.forEach((v) {
        arr0.add(WardData.fromJson(v));
      });
      data = arr0;
    }
    message = json["message"]?.toString();
  }
  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data["totalRecord"] = totalRecord;
    data["isSuccess"] = isSuccess;
    data["errorMesssage"] = errorMesssage;
    if (this.data != null) {
      final v = this.data;
      final arr0 = [];
      v!.forEach((v) {
        arr0.add(v.toJson());
      });
      data["Data"] = arr0;
    }
    data["message"] = message;
    return data;
  }
}
