class GetDistrictOnStateResponse {
  String? error;
  List<Districts>? districts;
  String? message;

  GetDistrictOnStateResponse({this.error, this.districts, this.message});

  GetDistrictOnStateResponse.fromJson(Map<String, dynamic> json) {
    error = json['error'];
    if (json['districts'] != null) {
      districts = <Districts>[];
      json['districts'].forEach((v) {
        districts!.add(new Districts.fromJson(v));
      });
    }
    message = json['message'];
  }

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

class Districts {
  String? id;
  String? state;
  String? district;
  String? date;
  String? isExists;
  String? createdDatetime;
  String? updatedDatetime;

  Districts(
      {this.id,
        this.state,
        this.district,
        this.date,
        this.isExists,
        this.createdDatetime,
        this.updatedDatetime});

  Districts.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    state = json['state'];
    district = json['district'];
    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['state'] = this.state;
    data['district'] = this.district;
    data['date'] = this.date;
    data['is_exists'] = this.isExists;
    data['created_datetime'] = this.createdDatetime;
    data['updated_datetime'] = this.updatedDatetime;
    return data;
  }
}
