// GENERATED CODE - DO NOT MODIFY BY HAND
part of '../../../../data/remote/models/property_area.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
PropertyArea _$PropertyAreaFromJson(Map json) => PropertyArea(
id: (json['id'] as num).toInt(),
name: json['name'] as String,
pickupText: json['pickup_text'] as String,
deliveryText: json['delivery_text'] as String,
isOpen: const FlagConverter().fromJson((json['is_open'] as num).toInt()),
isMeetingArea: const FlagConverter().fromJson(
(json['is_meeting_area'] as num).toInt(),
),
isGuestArea: const FlagConverter().fromJson(
(json['is_guest_area'] as num).toInt(),
),
isPrearrivalArea: const FlagConverter().fromJson(
(json['is_prearrival_area'] as num).toInt(),
),
theme: json['theme'] as String,
icon: json['icon'] as String,
deliveryPrice: (json['delivery_price'] as num?)?.toInt() ?? 0,
isDeliveryDefault: const FlagConverter().fromJson(
(json['is_delivery_default'] as num).toInt(),
),
hasDelivery: const FlagConverter().fromJson(
(json['has_delivery'] as num).toInt(),
),
events: (json['events'] as List<dynamic>)
.map((e) => PropertyEvent.fromJson(Map<String, dynamic>.from(e as Map)))
.toList(),
skipLocation: json['skip_location'] as bool,
);
Map<String, dynamic> _$PropertyAreaToJson(
PropertyArea instance,
) => <String, dynamic>{
'id': instance.id,
'name': instance.name,
'pickup_text': instance.pickupText,
'delivery_text': instance.deliveryText,
'is_open': const FlagConverter().toJson(instance.isOpen),
'is_meeting_area': const FlagConverter().toJson(instance.isMeetingArea),
'is_guest_area': const FlagConverter().toJson(instance.isGuestArea),
'is_prearrival_area': const FlagConverter().toJson(instance.isPrearrivalArea),
'theme': instance.theme,
'icon': instance.icon,
'delivery_price': instance.deliveryPrice,
'is_delivery_default': const FlagConverter().toJson(
instance.isDeliveryDefault,
),
'has_delivery': const FlagConverter().toJson(instance.hasDelivery),
'events': instance.events.map((e) => e.toJson()).toList(),
'skip_location': instance.skipLocation,
};