class GetSubLocOnDistrictResponse {
  String? error;
  List<SubLocations>? subLocations;
  String? message;

  GetSubLocOnDistrictResponse({this.error, this.subLocations, this.message});

  GetSubLocOnDistrictResponse.fromJson(Map<String, dynamic> json) {
    error = json['error'];
    if (json['sub_locations'] != null) {
      subLocations = <SubLocations>[];
      json['sub_locations'].forEach((v) {
        subLocations!.add(new SubLocations.fromJson(v));
      });
    }
    message = json['message'];
  }

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

class SubLocations {
  String? id;
  String? districtId;
  String? subLocality;
  String? date;
  String? isExists;
  String? createdDatetime;
  String? updatedDatetime;

  SubLocations(
      {this.id,
        this.districtId,
        this.subLocality,
        this.date,
        this.isExists,
        this.createdDatetime,
        this.updatedDatetime});

  SubLocations.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    districtId = json['district_id'];
    subLocality = json['sub_locality'];
    date = json['date'];
    isExists = json['is_exists'];
    createdDatetime = json['created_datetime'];
    updatedDatetime = json['updated_datetime'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['district_id'] = this.districtId;
    data['sub_locality'] = this.subLocality;
    data['date'] = this.date;
    data['is_exists'] = this.isExists;
    data['created_datetime'] = this.createdDatetime;
    data['updated_datetime'] = this.updatedDatetime;
    return data;
  }
}
