// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'hatching_details.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

_HatchingDetails _$HatchingDetailsFromJson(
  Map<String, dynamic> json,
) => _HatchingDetails(
  id: (json['id'] as num?)?.toInt(),
  chainCompany: json['chain_company'] as String?,
  age: (json['age'] as num?)?.toInt(),
  inspectionLosses: json['inspection_losses'],
  vetFarm: json['vet_farm'] == null
      ? null
      : VetFarm.fromJson(json['vet_farm'] as Map<String, dynamic>),
  activeKill: json['active_kill'] == null
      ? null
      : ActiveKill.fromJson(json['active_kill'] as Map<String, dynamic>),
  killingInfo: json['killing_info'] == null
      ? null
      : KillingInfo.fromJson(json['killing_info'] as Map<String, dynamic>),
  freeGovernmentalInfo: json['free_governmental_info'] == null
      ? null
      : FreeGovernmentalInfo.fromJson(
          json['free_governmental_info'] as Map<String, dynamic>,
        ),
  key: json['key'] as String?,
  createDate: json['create_date'] == null
      ? null
      : DateTime.parse(json['create_date'] as String),
  modifyDate: json['modify_date'] == null
      ? null
      : DateTime.parse(json['modify_date'] as String),
  trash: json['trash'] as bool?,
  hasChainCompany: json['has_chain_company'] as bool?,
  poultryIdForeignKey: json['poultry_id_foreign_key'],
  poultryHatchingIdKey: json['poultry_hatching_id_key'],
  quantity: (json['quantity'] as num?)?.toInt(),
  losses: (json['losses'] as num?)?.toInt(),
  leftOver: (json['left_over'] as num?)?.toInt(),
  killedQuantity: (json['killed_quantity'] as num?)?.toInt(),
  extraKilledQuantity: (json['extra_killed_quantity'] as num?)?.toInt(),
  governmentalKilledQuantity: (json['governmental_killed_quantity'] as num?)
      ?.toDouble(),
  governmentalQuantity: (json['governmental_quantity'] as num?)?.toDouble(),
  freeKilledQuantity: (json['free_killed_quantity'] as num?)?.toDouble(),
  freeQuantity: (json['free_quantity'] as num?)?.toDouble(),
  chainKilledQuantity: (json['chain_killed_quantity'] as num?)?.toDouble(),
  chainKilledWeight: (json['chain_killed_weight'] as num?)?.toDouble(),
  outProvinceKilledWeight: (json['out_province_killed_weight'] as num?)
      ?.toDouble(),
  outProvinceKilledQuantity: (json['out_province_killed_quantity'] as num?)
      ?.toDouble(),
  exportKilledWeight: (json['export_killed_weight'] as num?)?.toDouble(),
  exportKilledQuantity: (json['export_killed_quantity'] as num?)?.toDouble(),
  totalCommitment: (json['total_commitment'] as num?)?.toDouble(),
  commitmentType: json['commitment_type'] as String?,
  totalCommitmentQuantity: (json['total_commitment_quantity'] as num?)
      ?.toDouble(),
  totalFreeCommitmentQuantity: (json['total_free_commitment_quantity'] as num?)
      ?.toDouble(),
  totalFreeCommitmentWeight: (json['total_free_commitment_weight'] as num?)
      ?.toDouble(),
  totalKilledWeight: (json['total_killed_weight'] as num?)?.toDouble(),
  totalAverageKilledWeight: (json['total_average_killed_weight'] as num?)
      ?.toDouble(),
  requestLeftOver: (json['request_left_over'] as num?)?.toInt(),
  hall: (json['hall'] as num?)?.toInt(),
  date: json['date'] == null ? null : DateTime.parse(json['date'] as String),
  predicateDate: json['predicate_date'] == null
      ? null
      : DateTime.parse(json['predicate_date'] as String),
  chickenBreed: json['chicken_breed'] as String?,
  period: (json['period'] as num?)?.toInt(),
  allowHatching: json['allow_hatching'] as String?,
  state: json['state'] as String?,
  archive: json['archive'] as bool?,
  violation: json['violation'] as bool?,
  message: json['message'],
  registrar: json['registrar'],
  breed: (json['breed'] as List<dynamic>?)
      ?.map((e) => Breed.fromJson(e as Map<String, dynamic>))
      .toList(),
  cityNumber: (json['city_number'] as num?)?.toInt(),
  cityName: json['city_name'] as String?,
  provinceNumber: (json['province_number'] as num?)?.toInt(),
  provinceName: json['province_name'] as String?,
  lastChange: json['last_change'] == null
      ? null
      : LastChange.fromJson(json['last_change'] as Map<String, dynamic>),
  chickenAge: (json['chicken_age'] as num?)?.toInt(),
  nowAge: (json['now_age'] as num?)?.toInt(),
  latestHatchingChange: json['latest_hatching_change'] == null
      ? null
      : LatestHatchingChange.fromJson(
          json['latest_hatching_change'] as Map<String, dynamic>,
        ),
  violationReport: json['violation_report'],
  violationMessage: json['violation_message'] as String?,
  violationImage: json['violation_image'],
  violationReporter: json['violation_reporter'],
  violationReportDate: json['violation_report_date'],
  violationReportEditor: json['violation_report_editor'],
  violationReportEditDate: json['violation_report_edit_date'],
  totalLosses: (json['total_losses'] as num?)?.toInt(),
  directLosses: (json['direct_losses'] as num?)?.toInt(),
  directLossesInputer: json['direct_losses_inputer'],
  directLossesDate: json['direct_losses_date'],
  directLossesEditor: json['direct_losses_editor'],
  directLossesLastEditDate: json['direct_losses_last_edit_date'],
  endPeriodLossesInputer: json['end_period_losses_inputer'],
  endPeriodLossesDate: json['end_period_losses_date'],
  endPeriodLossesEditor: json['end_period_losses_editor'],
  endPeriodLossesLastEditDate: json['end_period_losses_last_edit_date'],
  breedingUniqueId: json['breeding_unique_id'] as String?,
  licenceNumber: json['licence_number'] as String?,
  temporaryTrash: json['temporary_trash'] as bool?,
  temporaryDeleted: json['temporary_deleted'] as bool?,
  firstDateInputArchive: json['first_date_input_archive'],
  secondDateInputArchive: json['second_date_input_archive'],
  inputArchiver: json['input_archiver'],
  outputArchiveDate: json['output_archive_date'],
  outputArchiver: json['output_archiver'],
  barDifferenceRequestWeight: (json['bar_difference_request_weight'] as num?)
      ?.toDouble(),
  barDifferenceRequestQuantity:
      (json['bar_difference_request_quantity'] as num?)?.toDouble(),
  healthCertificate: json['health_certificate'],
  samasatDischargePercentage: (json['samasat_discharge_percentage'] as num?)
      ?.toInt(),
  personTypeName: json['person_type_name'] as String?,
  interactTypeName: json['interact_type_name'] as String?,
  unionTypeName: json['union_type_name'] as String?,
  certId: json['cert_id'] as String?,
  increaseQuantity: (json['increase_quantity'] as num?)?.toInt(),
  tenantFullname: json['tenant_fullname'],
  tenantNationalCode: json['tenant_national_code'],
  tenantMobile: json['tenant_mobile'],
  tenantCity: json['tenant_city'],
  hasTenant: json['has_tenant'] as bool?,
  createdBy: json['created_by'],
  modifiedBy: json['modified_by'],
  poultry: (json['poultry'] as num?)?.toInt(),
);

Map<String, dynamic> _$HatchingDetailsToJson(_HatchingDetails instance) =>
    <String, dynamic>{
      'id': instance.id,
      'chain_company': instance.chainCompany,
      'age': instance.age,
      'inspection_losses': instance.inspectionLosses,
      'vet_farm': instance.vetFarm,
      'active_kill': instance.activeKill,
      'killing_info': instance.killingInfo,
      'free_governmental_info': instance.freeGovernmentalInfo,
      'key': instance.key,
      'create_date': instance.createDate?.toIso8601String(),
      'modify_date': instance.modifyDate?.toIso8601String(),
      'trash': instance.trash,
      'has_chain_company': instance.hasChainCompany,
      'poultry_id_foreign_key': instance.poultryIdForeignKey,
      'poultry_hatching_id_key': instance.poultryHatchingIdKey,
      'quantity': instance.quantity,
      'losses': instance.losses,
      'left_over': instance.leftOver,
      'killed_quantity': instance.killedQuantity,
      'extra_killed_quantity': instance.extraKilledQuantity,
      'governmental_killed_quantity': instance.governmentalKilledQuantity,
      'governmental_quantity': instance.governmentalQuantity,
      'free_killed_quantity': instance.freeKilledQuantity,
      'free_quantity': instance.freeQuantity,
      'chain_killed_quantity': instance.chainKilledQuantity,
      'chain_killed_weight': instance.chainKilledWeight,
      'out_province_killed_weight': instance.outProvinceKilledWeight,
      'out_province_killed_quantity': instance.outProvinceKilledQuantity,
      'export_killed_weight': instance.exportKilledWeight,
      'export_killed_quantity': instance.exportKilledQuantity,
      'total_commitment': instance.totalCommitment,
      'commitment_type': instance.commitmentType,
      'total_commitment_quantity': instance.totalCommitmentQuantity,
      'total_free_commitment_quantity': instance.totalFreeCommitmentQuantity,
      'total_free_commitment_weight': instance.totalFreeCommitmentWeight,
      'total_killed_weight': instance.totalKilledWeight,
      'total_average_killed_weight': instance.totalAverageKilledWeight,
      'request_left_over': instance.requestLeftOver,
      'hall': instance.hall,
      'date': instance.date?.toIso8601String(),
      'predicate_date': instance.predicateDate?.toIso8601String(),
      'chicken_breed': instance.chickenBreed,
      'period': instance.period,
      'allow_hatching': instance.allowHatching,
      'state': instance.state,
      'archive': instance.archive,
      'violation': instance.violation,
      'message': instance.message,
      'registrar': instance.registrar,
      'breed': instance.breed,
      'city_number': instance.cityNumber,
      'city_name': instance.cityName,
      'province_number': instance.provinceNumber,
      'province_name': instance.provinceName,
      'last_change': instance.lastChange,
      'chicken_age': instance.chickenAge,
      'now_age': instance.nowAge,
      'latest_hatching_change': instance.latestHatchingChange,
      'violation_report': instance.violationReport,
      'violation_message': instance.violationMessage,
      'violation_image': instance.violationImage,
      'violation_reporter': instance.violationReporter,
      'violation_report_date': instance.violationReportDate,
      'violation_report_editor': instance.violationReportEditor,
      'violation_report_edit_date': instance.violationReportEditDate,
      'total_losses': instance.totalLosses,
      'direct_losses': instance.directLosses,
      'direct_losses_inputer': instance.directLossesInputer,
      'direct_losses_date': instance.directLossesDate,
      'direct_losses_editor': instance.directLossesEditor,
      'direct_losses_last_edit_date': instance.directLossesLastEditDate,
      'end_period_losses_inputer': instance.endPeriodLossesInputer,
      'end_period_losses_date': instance.endPeriodLossesDate,
      'end_period_losses_editor': instance.endPeriodLossesEditor,
      'end_period_losses_last_edit_date': instance.endPeriodLossesLastEditDate,
      'breeding_unique_id': instance.breedingUniqueId,
      'licence_number': instance.licenceNumber,
      'temporary_trash': instance.temporaryTrash,
      'temporary_deleted': instance.temporaryDeleted,
      'first_date_input_archive': instance.firstDateInputArchive,
      'second_date_input_archive': instance.secondDateInputArchive,
      'input_archiver': instance.inputArchiver,
      'output_archive_date': instance.outputArchiveDate,
      'output_archiver': instance.outputArchiver,
      'bar_difference_request_weight': instance.barDifferenceRequestWeight,
      'bar_difference_request_quantity': instance.barDifferenceRequestQuantity,
      'health_certificate': instance.healthCertificate,
      'samasat_discharge_percentage': instance.samasatDischargePercentage,
      'person_type_name': instance.personTypeName,
      'interact_type_name': instance.interactTypeName,
      'union_type_name': instance.unionTypeName,
      'cert_id': instance.certId,
      'increase_quantity': instance.increaseQuantity,
      'tenant_fullname': instance.tenantFullname,
      'tenant_national_code': instance.tenantNationalCode,
      'tenant_mobile': instance.tenantMobile,
      'tenant_city': instance.tenantCity,
      'has_tenant': instance.hasTenant,
      'created_by': instance.createdBy,
      'modified_by': instance.modifiedBy,
      'poultry': instance.poultry,
    };

_VetFarm _$VetFarmFromJson(Map<String, dynamic> json) => _VetFarm(
  vetFarmFullName: json['vet_farm_full_name'] as String?,
  vetFarmMobile: json['vet_farm_mobile'] as String?,
);

Map<String, dynamic> _$VetFarmToJson(_VetFarm instance) => <String, dynamic>{
  'vet_farm_full_name': instance.vetFarmFullName,
  'vet_farm_mobile': instance.vetFarmMobile,
};

_ActiveKill _$ActiveKillFromJson(Map<String, dynamic> json) => _ActiveKill(
  activeKill: json['active_kill'] as bool?,
  countOfRequest: (json['count_of_request'] as num?)?.toInt(),
);

Map<String, dynamic> _$ActiveKillToJson(_ActiveKill instance) =>
    <String, dynamic>{
      'active_kill': instance.activeKill,
      'count_of_request': instance.countOfRequest,
    };

_KillingInfo _$KillingInfoFromJson(Map<String, dynamic> json) => _KillingInfo(
  violationMessage: json['violation_message'] as String?,
  provinceKillRequests: (json['province_kill_requests'] as num?)?.toInt(),
  provinceKillRequestsQuantity:
      (json['province_kill_requests_quantity'] as num?)?.toInt(),
  provinceKillRequestsWeight: (json['province_kill_requests_weight'] as num?)
      ?.toDouble(),
  killHouseRequests: (json['kill_house_requests'] as num?)?.toInt(),
  killHouseRequestsFirstQuantity:
      (json['kill_house_requests_first_quantity'] as num?)?.toInt(),
  killHouseRequestsFirstWeight:
      (json['kill_house_requests_first_weight'] as num?)?.toDouble(),
  barCompleteWithKillHouse: (json['bar_complete_with_kill_house'] as num?)
      ?.toInt(),
  acceptedRealQuantityFinal: (json['accepted_real_quantity_final'] as num?)
      ?.toInt(),
  acceptedRealWightFinal: (json['accepted_real_wight_final'] as num?)
      ?.toDouble(),
  wareHouseBars: (json['ware_house_bars'] as num?)?.toInt(),
  wareHouseBarsQuantity: (json['ware_house_bars_quantity'] as num?)?.toInt(),
  wareHouseBarsWeight: (json['ware_house_bars_weight'] as num?)?.toDouble(),
  wareHouseBarsWeightLose: (json['ware_house_bars_weight_lose'] as num?)
      ?.toDouble(),
);

Map<String, dynamic> _$KillingInfoToJson(
  _KillingInfo instance,
) => <String, dynamic>{
  'violation_message': instance.violationMessage,
  'province_kill_requests': instance.provinceKillRequests,
  'province_kill_requests_quantity': instance.provinceKillRequestsQuantity,
  'province_kill_requests_weight': instance.provinceKillRequestsWeight,
  'kill_house_requests': instance.killHouseRequests,
  'kill_house_requests_first_quantity': instance.killHouseRequestsFirstQuantity,
  'kill_house_requests_first_weight': instance.killHouseRequestsFirstWeight,
  'bar_complete_with_kill_house': instance.barCompleteWithKillHouse,
  'accepted_real_quantity_final': instance.acceptedRealQuantityFinal,
  'accepted_real_wight_final': instance.acceptedRealWightFinal,
  'ware_house_bars': instance.wareHouseBars,
  'ware_house_bars_quantity': instance.wareHouseBarsQuantity,
  'ware_house_bars_weight': instance.wareHouseBarsWeight,
  'ware_house_bars_weight_lose': instance.wareHouseBarsWeightLose,
};

_FreeGovernmentalInfo _$FreeGovernmentalInfoFromJson(
  Map<String, dynamic> json,
) => _FreeGovernmentalInfo(
  governmentalAllocatedQuantity:
      (json['governmental_allocated_quantity'] as num?)?.toInt(),
  totalCommitmentQuantity: (json['total_commitment_quantity'] as num?)
      ?.toDouble(),
  freeAllocatedQuantity: (json['free_allocated_quantity'] as num?)?.toInt(),
  totalFreeCommitmentQuantity: (json['total_free_commitment_quantity'] as num?)
      ?.toDouble(),
  leftTotalFreeCommitmentQuantity:
      (json['left_total_free_commitment_quantity'] as num?)?.toInt(),
);

Map<String, dynamic> _$FreeGovernmentalInfoToJson(
  _FreeGovernmentalInfo instance,
) => <String, dynamic>{
  'governmental_allocated_quantity': instance.governmentalAllocatedQuantity,
  'total_commitment_quantity': instance.totalCommitmentQuantity,
  'free_allocated_quantity': instance.freeAllocatedQuantity,
  'total_free_commitment_quantity': instance.totalFreeCommitmentQuantity,
  'left_total_free_commitment_quantity':
      instance.leftTotalFreeCommitmentQuantity,
};

_Breed _$BreedFromJson(Map<String, dynamic> json) => _Breed(
  breed: json['breed'] as String?,
  mainQuantity: (json['main_quantity'] as num?)?.toInt(),
  remainQuantity: (json['remain_quantity'] as num?)?.toInt(),
);

Map<String, dynamic> _$BreedToJson(_Breed instance) => <String, dynamic>{
  'breed': instance.breed,
  'main_quantity': instance.mainQuantity,
  'remain_quantity': instance.remainQuantity,
};

_LastChange _$LastChangeFromJson(Map<String, dynamic> json) => _LastChange(
  date: json['date'] == null ? null : DateTime.parse(json['date'] as String),
  role: json['role'] as String?,
  type: json['type'] as String?,
  fullName: json['full_name'] as String?,
);

Map<String, dynamic> _$LastChangeToJson(_LastChange instance) =>
    <String, dynamic>{
      'date': instance.date?.toIso8601String(),
      'role': instance.role,
      'type': instance.type,
      'full_name': instance.fullName,
    };

_LatestHatchingChange _$LatestHatchingChangeFromJson(
  Map<String, dynamic> json,
) => _LatestHatchingChange(
  date: json['date'] == null ? null : DateTime.parse(json['date'] as String),
  role: json['role'] as String?,
  fullName: json['full_name'] as String?,
);

Map<String, dynamic> _$LatestHatchingChangeToJson(
  _LatestHatchingChange instance,
) => <String, dynamic>{
  'date': instance.date?.toIso8601String(),
  'role': instance.role,
  'full_name': instance.fullName,
};
