// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'poultry_location_model.dart';

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

_PoultryLocationModel _$PoultryLocationModelFromJson(
  Map<String, dynamic> json,
) => _PoultryLocationModel(
  id: (json['id'] as num?)?.toInt(),
  unitName: json['unit_name'] as String?,
  lat: (json['Lat'] as num?)?.toDouble(),
  long: (json['Long'] as num?)?.toDouble(),
  user: json['user'] == null
      ? null
      : User.fromJson(json['user'] as Map<String, dynamic>),
  hatching: (json['hatching'] as List<dynamic>?)
      ?.map((e) => Hatching.fromJson(e as Map<String, dynamic>))
      .toList(),
  address: json['address'] == null
      ? null
      : Address.fromJson(json['address'] as Map<String, dynamic>),
  breedingUniqueId: json['breeding_unique_id'] as String?,
);

Map<String, dynamic> _$PoultryLocationModelToJson(
  _PoultryLocationModel instance,
) => <String, dynamic>{
  'id': instance.id,
  'unit_name': instance.unitName,
  'Lat': instance.lat,
  'Long': instance.long,
  'user': instance.user,
  'hatching': instance.hatching,
  'address': instance.address,
  'breeding_unique_id': instance.breedingUniqueId,
};

_User _$UserFromJson(Map<String, dynamic> json) => _User(
  fullname: json['fullname'] as String?,
  mobile: json['mobile'] as String?,
);

Map<String, dynamic> _$UserToJson(_User instance) => <String, dynamic>{
  'fullname': instance.fullname,
  'mobile': instance.mobile,
};

_Hatching _$HatchingFromJson(Map<String, dynamic> json) => _Hatching(
  leftOver: (json['left_over'] as num?)?.toInt(),
  chickenAge: (json['chicken_age'] as num?)?.toInt(),
  date: json['date'] == null ? null : DateTime.parse(json['date'] as String),
  licenceNumber: json['licence_number'] as String?,
);

Map<String, dynamic> _$HatchingToJson(_Hatching instance) => <String, dynamic>{
  'left_over': instance.leftOver,
  'chicken_age': instance.chickenAge,
  'date': instance.date?.toIso8601String(),
  'licence_number': instance.licenceNumber,
};

_Address _$AddressFromJson(Map<String, dynamic> json) => _Address(
  city: json['city'] == null
      ? null
      : City.fromJson(json['city'] as Map<String, dynamic>),
  address: json['address'] as String?,
);

Map<String, dynamic> _$AddressToJson(_Address instance) => <String, dynamic>{
  'city': instance.city,
  'address': instance.address,
};

_City _$CityFromJson(Map<String, dynamic> json) =>
    _City(name: json['name'] as String?);

Map<String, dynamic> _$CityToJson(_City instance) => <String, dynamic>{
  'name': instance.name,
};
