class Customer { List data; String message; String innerMessage; int responseCode; bool isSuccess; Customer({this.data, this.message, this.innerMessage, this.responseCode, this.isSuccess}); Customer.fromJson(Map json) { if (json['data'] != null) { data = []; json['data'].forEach((v) { data.add(new Data.fromJson(v)); }); } message = json['message']; innerMessage = json['innerMessage']; responseCode = json['responseCode']; isSuccess = json['isSuccess']; } Map toJson() { final Map data = new Map(); if (this.data != null) { data['data'] = this.data.map((v) => v.toJson()).toList(); } data['message'] = this.message; data['innerMessage'] = this.innerMessage; data['responseCode'] = this.responseCode; data['isSuccess'] = this.isSuccess; return data; } } class Data { int id; int customerCode; String custName; List buildings; Data({this.id, this.customerCode, this.custName, this.buildings}); Data.fromJson(Map json) { id = json['id']; customerCode = json['customerCode']; custName = json['custName']; if (json['buildings'] != null) { buildings = []; json['buildings'].forEach((v) { buildings.add(new Buildings.fromJson(v)); }); } } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['customerCode'] = this.customerCode; data['custName'] = this.custName; if (this.buildings != null) { data['buildings'] = this.buildings.map((v) => v.toJson()).toList(); } return data; } } class Buildings { int id; String name; int value; List floors; Buildings({this.id, this.name, this.value, this.floors}); Buildings.fromJson(Map json) { id = json['id']; name = json['name']; value = json['value']; if (json['floors'] != null) { floors = []; json['floors'].forEach((v) { floors.add(new Floors.fromJson(v)); }); } } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['name'] = this.name; data['value'] = this.value; if (this.floors != null) { data['floors'] = this.floors.map((v) => v.toJson()).toList(); } return data; } } class Floors { int id; String name; int value; List departments; Floors({this.id, this.name, this.value, this.departments}); Floors.fromJson(Map json) { id = json['id']; name = json['name']; value = json['value']; if (json['departments'] != null) { departments = []; json['departments'].forEach((v) { departments.add(new Departments.fromJson(v)); }); } } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['name'] = this.name; data['value'] = this.value; if (this.departments != null) { data['departments'] = this.departments.map((v) => v.toJson()).toList(); } return data; } } class Departments { int id; String name; Departments({this.id, this.name}); Departments.fromJson(Map json) { id = json['id']; name = json['name']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['name'] = this.name; return data; } }