import 'package:domain/generated/json/base/json_convert_content.dart';
import 'package:domain/entity/form_content_entity.dart';
import 'dart:typed_data';


FormContentEntity $FormContentEntityFromJson(Map<String, dynamic> json) {
  final FormContentEntity formContentEntity = FormContentEntity();
  final String? typeOfApplication = jsonConvert.convert<String>(json['type_of_application']);
  if (typeOfApplication != null) {
    formContentEntity.typeOfApplication = typeOfApplication;
  }
  final String? notesToRecipient = jsonConvert.convert<String>(json['notes_to_recipient']);
  if (notesToRecipient != null) {
    formContentEntity.notesToRecipient = notesToRecipient;
  }
  final String? notesToManagement = jsonConvert.convert<String>(json['notes_to_management']);
  if (notesToManagement != null) {
    formContentEntity.notesToManagement = notesToManagement;
  }
  final List<String>? attachments = (json['attachments'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<String>(e) as String).toList();
  if (attachments != null) {
    formContentEntity.attachments = attachments;
  }
  final String? signature = jsonConvert.convert<String>(json['signature']);
  if (signature != null) {
    formContentEntity.signature = signature;
  }
  final dynamic signatureByteData = json['signatureByteData'];
  if (signatureByteData != null) {
    formContentEntity.signatureByteData = signatureByteData;
  }
  final String? ownershipStatus = jsonConvert.convert<String>(json['ownership_status']);
  if (ownershipStatus != null) {
    formContentEntity.ownershipStatus = ownershipStatus;
  }
  final String? vehicleNumber = jsonConvert.convert<String>(json['vehicle_number']);
  if (vehicleNumber != null) {
    formContentEntity.vehicleNumber = vehicleNumber;
  }
  final String? iuNumber = jsonConvert.convert<String>(json['iu_number']);
  if (iuNumber != null) {
    formContentEntity.iuNumber = iuNumber;
  }
  final String? vehicleMakeModelColour = jsonConvert.convert<String>(json['vehicle_make_model_colour']);
  if (vehicleMakeModelColour != null) {
    formContentEntity.vehicleMakeModelColour = vehicleMakeModelColour;
  }
  final String? startDate = jsonConvert.convert<String>(json['start_date']);
  if (startDate != null) {
    formContentEntity.startDate = startDate;
  }
  final String? endDate = jsonConvert.convert<String>(json['end_date']);
  if (endDate != null) {
    formContentEntity.endDate = endDate;
  }
  final String? timeOrArrival = jsonConvert.convert<String>(json['time_or_arrival']);
  if (timeOrArrival != null) {
    formContentEntity.timeOrArrival = timeOrArrival;
  }
  final String? movingCompany = jsonConvert.convert<String>(json['moving_company']);
  if (movingCompany != null) {
    formContentEntity.movingCompany = movingCompany;
  }
  final String? personInCharge = jsonConvert.convert<String>(json['person_in_charge']);
  if (personInCharge != null) {
    formContentEntity.personInCharge = personInCharge;
  }
  final String? mobileNumber = jsonConvert.convert<String>(json['mobile_number']);
  if (mobileNumber != null) {
    formContentEntity.mobileNumber = mobileNumber;
  }
  final String? companyAddress = jsonConvert.convert<String>(json['company_address']);
  if (companyAddress != null) {
    formContentEntity.companyAddress = companyAddress;
  }
  final String? dateOfEntry = jsonConvert.convert<String>(json['date_of_entry']);
  if (dateOfEntry != null) {
    formContentEntity.dateOfEntry = dateOfEntry;
  }
  final String? guestName = jsonConvert.convert<String>(json['guest_name']);
  if (guestName != null) {
    formContentEntity.guestName = guestName;
  }
  final String? guestMobileNumber = jsonConvert.convert<String>(json['guest_mobile_number']);
  if (guestMobileNumber != null) {
    formContentEntity.guestMobileNumber = guestMobileNumber;
  }
  final String? renovationStartDate = jsonConvert.convert<String>(json['renovation_start_date']);
  if (renovationStartDate != null) {
    formContentEntity.renovationStartDate = renovationStartDate;
  }
  final String? renovationEndDate = jsonConvert.convert<String>(json['renovation_end_date']);
  if (renovationEndDate != null) {
    formContentEntity.renovationEndDate = renovationEndDate;
  }
  final String? hackingStartDate = jsonConvert.convert<String>(json['hacking_start_date']);
  if (hackingStartDate != null) {
    formContentEntity.hackingStartDate = hackingStartDate;
  }
  final String? hackingEndDate = jsonConvert.convert<String>(json['hacking_end_date']);
  if (hackingEndDate != null) {
    formContentEntity.hackingEndDate = hackingEndDate;
  }
  final String? renovationCompany = jsonConvert.convert<String>(json['renovation_company']);
  if (renovationCompany != null) {
    formContentEntity.renovationCompany = renovationCompany;
  }
  final String? listOfRenovationWorks = jsonConvert.convert<String>(json['list_of_renovation_works']);
  if (listOfRenovationWorks != null) {
    formContentEntity.listOfRenovationWorks = listOfRenovationWorks;
  }
  return formContentEntity;
}

Map<String, dynamic> $FormContentEntityToJson(FormContentEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['type_of_application'] = entity.typeOfApplication;
  data['notes_to_recipient'] = entity.notesToRecipient;
  data['notes_to_management'] = entity.notesToManagement;
  data['attachments'] = entity.attachments;
  data['signature'] = entity.signature;
  data['signatureByteData'] = entity.signatureByteData;
  data['ownership_status'] = entity.ownershipStatus;
  data['vehicle_number'] = entity.vehicleNumber;
  data['iu_number'] = entity.iuNumber;
  data['vehicle_make_model_colour'] = entity.vehicleMakeModelColour;
  data['start_date'] = entity.startDate;
  data['end_date'] = entity.endDate;
  data['time_or_arrival'] = entity.timeOrArrival;
  data['moving_company'] = entity.movingCompany;
  data['person_in_charge'] = entity.personInCharge;
  data['mobile_number'] = entity.mobileNumber;
  data['company_address'] = entity.companyAddress;
  data['date_of_entry'] = entity.dateOfEntry;
  data['guest_name'] = entity.guestName;
  data['guest_mobile_number'] = entity.guestMobileNumber;
  data['renovation_start_date'] = entity.renovationStartDate;
  data['renovation_end_date'] = entity.renovationEndDate;
  data['hacking_start_date'] = entity.hackingStartDate;
  data['hacking_end_date'] = entity.hackingEndDate;
  data['renovation_company'] = entity.renovationCompany;
  data['list_of_renovation_works'] = entity.listOfRenovationWorks;
  return data;
}

extension FormContentEntityExtension on FormContentEntity {
  FormContentEntity copyWith({
    String? typeOfApplication,
    String? notesToRecipient,
    String? notesToManagement,
    List<String>? attachments,
    String? signature,
    dynamic signatureByteData,
    String? ownershipStatus,
    String? vehicleNumber,
    String? iuNumber,
    String? vehicleMakeModelColour,
    String? startDate,
    String? endDate,
    String? timeOrArrival,
    String? movingCompany,
    String? personInCharge,
    String? mobileNumber,
    String? companyAddress,
    String? dateOfEntry,
    String? guestName,
    String? guestMobileNumber,
    String? renovationStartDate,
    String? renovationEndDate,
    String? hackingStartDate,
    String? hackingEndDate,
    String? renovationCompany,
    String? listOfRenovationWorks,
  }) {
    return FormContentEntity()
      ..typeOfApplication = typeOfApplication ?? this.typeOfApplication
      ..notesToRecipient = notesToRecipient ?? this.notesToRecipient
      ..notesToManagement = notesToManagement ?? this.notesToManagement
      ..attachments = attachments ?? this.attachments
      ..signature = signature ?? this.signature
      ..signatureByteData = signatureByteData ?? this.signatureByteData
      ..ownershipStatus = ownershipStatus ?? this.ownershipStatus
      ..vehicleNumber = vehicleNumber ?? this.vehicleNumber
      ..iuNumber = iuNumber ?? this.iuNumber
      ..vehicleMakeModelColour = vehicleMakeModelColour ?? this.vehicleMakeModelColour
      ..startDate = startDate ?? this.startDate
      ..endDate = endDate ?? this.endDate
      ..timeOrArrival = timeOrArrival ?? this.timeOrArrival
      ..movingCompany = movingCompany ?? this.movingCompany
      ..personInCharge = personInCharge ?? this.personInCharge
      ..mobileNumber = mobileNumber ?? this.mobileNumber
      ..companyAddress = companyAddress ?? this.companyAddress
      ..dateOfEntry = dateOfEntry ?? this.dateOfEntry
      ..guestName = guestName ?? this.guestName
      ..guestMobileNumber = guestMobileNumber ?? this.guestMobileNumber
      ..renovationStartDate = renovationStartDate ?? this.renovationStartDate
      ..renovationEndDate = renovationEndDate ?? this.renovationEndDate
      ..hackingStartDate = hackingStartDate ?? this.hackingStartDate
      ..hackingEndDate = hackingEndDate ?? this.hackingEndDate
      ..renovationCompany = renovationCompany ?? this.renovationCompany
      ..listOfRenovationWorks = listOfRenovationWorks ?? this.listOfRenovationWorks;
  }
}