import 'Address.dart'; import 'Product.dart'; import 'Service_details.dart'; import 'Technician.dart'; class ServiceRequestResponse { ServiceRequestResponse({ this.address, this.date, this.description, this.id, this.prioritys, this.product, this.requeststate, this.service, this.serviceduration, this.technician, this.timestamp, this.withproduct,}); ServiceRequestResponse.fromJson(dynamic json) { address = json['address'] != null ? Address.fromJson(json['address']) : null; date = json['date']; description = json['description']; id = json['id']; prioritys = json['prioritys']; product = json['product'] != null ? Product.fromJson(json['product']) : null; requeststate = json['requeststate']; service = json['service'] != null ? ServiceDetail.fromJson(json['service']) : null; serviceduration = json['serviceduration']; technician = json['technician'] != null ? Technician.fromJson(json['technician']) : null; timestamp = json['timestamp']; withproduct = json['withproduct']; } Address? address; int? date; String? description; int? id; String? prioritys; Product? product; String? requeststate; ServiceDetail? service; double? serviceduration; Technician? technician; int? timestamp; bool? withproduct; Map toJson() { final map = {}; if (address != null) { map['address'] = address?.toJson(); } map['date'] = date; map['description'] = description; map['id'] = id; map['prioritys'] = prioritys; if (product != null) { map['product'] = product?.toJson(); } map['requeststate'] = requeststate; if (service != null) { map['service'] = service?.toJson(); } map['serviceduration'] = serviceduration; if (technician != null) { map['technician'] = technician?.toJson(); } map['timestamp'] = timestamp; map['withproduct'] = withproduct; return map; } }