class ModulesPermissionsModel { bool? canAdd; bool? canEdit; bool? canView; bool? canDelete; Module? module; ModulesPermissionsModel({this.canAdd, this.canEdit, this.canView, this.canDelete, this.module}); ModulesPermissionsModel.fromJson(Map json) { canAdd = json['canAdd']; canEdit = json['canEdit']; canView = json['canView']; canDelete = json['canDelete']; module = json['module'] != null ? new Module.fromJson(json['module']) : null; } Map toJson() { final Map data = new Map(); data['canAdd'] = this.canAdd; data['canEdit'] = this.canEdit; data['canView'] = this.canView; data['canDelete'] = this.canDelete; if (this.module != null) { data['module'] = this.module!.toJson(); } return data; } } class Module { int? id; String? name; int? value; Module({this.id, this.name, this.value}); Module.fromJson(Map json) { id = json['id']; name = json['name']; value = json['value']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['name'] = this.name; data['value'] = this.value; return data; } }