178 lines
6.6 KiB
Dart
178 lines
6.6 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'machine.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
Portafilter _$PortafilterFromJson(Map<String, dynamic> json) => Portafilter(
|
|
id: json['id'] as String,
|
|
size: json['size'] as String,
|
|
material: json['material'] as String,
|
|
);
|
|
|
|
Map<String, dynamic> _$PortafilterToJson(Portafilter instance) =>
|
|
<String, dynamic>{
|
|
'id': instance.id,
|
|
'size': instance.size,
|
|
'material': instance.material,
|
|
};
|
|
|
|
Machine _$MachineFromJson(Map<String, dynamic> json) => Machine(
|
|
id: json['id'] as String,
|
|
manufacturer: json['manufacturer'] as String,
|
|
year: (json['year'] as num).toInt(),
|
|
model: json['model'] as String,
|
|
type: $enumDecode(_$MachineTypeEnumMap, json['type']),
|
|
steamWand: json['steamWand'] as bool,
|
|
details: json['details'] as String,
|
|
isOwned: json['isOwned'] as bool,
|
|
rating: (json['rating'] as num).toDouble(),
|
|
popularity: (json['popularity'] as num).toInt(),
|
|
portafilters: (json['portafilters'] as List<dynamic>)
|
|
.map((e) => Portafilter.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
specifications: json['specifications'] as Map<String, dynamic>,
|
|
);
|
|
|
|
Map<String, dynamic> _$MachineToJson(Machine instance) => <String, dynamic>{
|
|
'id': instance.id,
|
|
'manufacturer': instance.manufacturer,
|
|
'year': instance.year,
|
|
'model': instance.model,
|
|
'type': _$MachineTypeEnumMap[instance.type]!,
|
|
'steamWand': instance.steamWand,
|
|
'details': instance.details,
|
|
'isOwned': instance.isOwned,
|
|
'rating': instance.rating,
|
|
'popularity': instance.popularity,
|
|
'portafilters': instance.portafilters,
|
|
'specifications': instance.specifications,
|
|
};
|
|
|
|
const _$MachineTypeEnumMap = {
|
|
MachineType.espresso: 'Espresso',
|
|
MachineType.drip: 'Drip',
|
|
MachineType.percolation: 'Percolation',
|
|
MachineType.frenchPress: 'French Press',
|
|
MachineType.coldBrew: 'Cold Brew',
|
|
MachineType.e61: 'E61',
|
|
MachineType.pod: 'Pod',
|
|
MachineType.espressoPod: 'Espresso Pod',
|
|
MachineType.grinder: 'Grinder',
|
|
};
|
|
|
|
EspressoMachine _$EspressoMachineFromJson(Map<String, dynamic> json) =>
|
|
EspressoMachine(
|
|
id: json['id'] as String,
|
|
manufacturer: json['manufacturer'] as String,
|
|
year: (json['year'] as num).toInt(),
|
|
model: json['model'] as String,
|
|
type: $enumDecode(_$MachineTypeEnumMap, json['type']),
|
|
steamWand: json['steamWand'] as bool,
|
|
details: json['details'] as String,
|
|
isOwned: json['isOwned'] as bool,
|
|
rating: (json['rating'] as num).toDouble(),
|
|
popularity: (json['popularity'] as num).toInt(),
|
|
portafilters: (json['portafilters'] as List<dynamic>)
|
|
.map((e) => Portafilter.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
specifications: json['specifications'] as Map<String, dynamic>,
|
|
boilerType: json['boilerType'] as String,
|
|
capacity: json['capacity'] as String,
|
|
grinder: json['grinder'] as String?,
|
|
heatSourceDescription: json['heatSourceDescription'] as String,
|
|
hopper: json['hopper'] as bool,
|
|
isDosing: json['isDosing'] as bool,
|
|
maxPressureBars: (json['maxPressureBars'] as num).toInt(),
|
|
pressureGaugeIncluded: json['pressureGaugeIncluded'] as bool,
|
|
programmable: json['programmable'] as bool,
|
|
usesLever: json['usesLever'] as bool,
|
|
waterCapacity: (json['waterCapacity'] as num).toInt(),
|
|
portafilter: json['portafilter'] == null
|
|
? null
|
|
: Portafilter.fromJson(json['portafilter'] as Map<String, dynamic>),
|
|
);
|
|
|
|
Map<String, dynamic> _$EspressoMachineToJson(EspressoMachine instance) =>
|
|
<String, dynamic>{
|
|
'id': instance.id,
|
|
'manufacturer': instance.manufacturer,
|
|
'year': instance.year,
|
|
'model': instance.model,
|
|
'type': _$MachineTypeEnumMap[instance.type]!,
|
|
'steamWand': instance.steamWand,
|
|
'details': instance.details,
|
|
'isOwned': instance.isOwned,
|
|
'rating': instance.rating,
|
|
'popularity': instance.popularity,
|
|
'portafilters': instance.portafilters,
|
|
'specifications': instance.specifications,
|
|
'boilerType': instance.boilerType,
|
|
'capacity': instance.capacity,
|
|
'grinder': instance.grinder,
|
|
'heatSourceDescription': instance.heatSourceDescription,
|
|
'hopper': instance.hopper,
|
|
'isDosing': instance.isDosing,
|
|
'maxPressureBars': instance.maxPressureBars,
|
|
'pressureGaugeIncluded': instance.pressureGaugeIncluded,
|
|
'programmable': instance.programmable,
|
|
'usesLever': instance.usesLever,
|
|
'waterCapacity': instance.waterCapacity,
|
|
'portafilter': instance.portafilter,
|
|
};
|
|
|
|
DripCoffee _$DripCoffeeFromJson(Map<String, dynamic> json) => DripCoffee(
|
|
id: json['id'] as String,
|
|
manufacturer: json['manufacturer'] as String,
|
|
year: (json['year'] as num).toInt(),
|
|
model: json['model'] as String,
|
|
type: $enumDecode(_$MachineTypeEnumMap, json['type']),
|
|
steamWand: json['steamWand'] as bool,
|
|
details: json['details'] as String,
|
|
isOwned: json['isOwned'] as bool,
|
|
rating: (json['rating'] as num).toDouble(),
|
|
popularity: (json['popularity'] as num).toInt(),
|
|
portafilters: (json['portafilters'] as List<dynamic>)
|
|
.map((e) => Portafilter.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
specifications: json['specifications'] as Map<String, dynamic>,
|
|
brewerType: json['brewerType'] as String,
|
|
caraffe: json['caraffe'] as bool,
|
|
filterType: json['filterType'] as String,
|
|
programmable: json['programmable'] as bool,
|
|
);
|
|
|
|
Map<String, dynamic> _$DripCoffeeToJson(DripCoffee instance) =>
|
|
<String, dynamic>{
|
|
'id': instance.id,
|
|
'manufacturer': instance.manufacturer,
|
|
'year': instance.year,
|
|
'model': instance.model,
|
|
'type': _$MachineTypeEnumMap[instance.type]!,
|
|
'steamWand': instance.steamWand,
|
|
'details': instance.details,
|
|
'isOwned': instance.isOwned,
|
|
'rating': instance.rating,
|
|
'popularity': instance.popularity,
|
|
'portafilters': instance.portafilters,
|
|
'specifications': instance.specifications,
|
|
'brewerType': instance.brewerType,
|
|
'caraffe': instance.caraffe,
|
|
'filterType': instance.filterType,
|
|
'programmable': instance.programmable,
|
|
};
|
|
|
|
Grinder _$GrinderFromJson(Map<String, dynamic> json) => Grinder(
|
|
id: json['id'] as String,
|
|
burrType: json['burrType'] as String,
|
|
grindSettingsCount: (json['grindSettingsCount'] as num).toInt(),
|
|
);
|
|
|
|
Map<String, dynamic> _$GrinderToJson(Grinder instance) => <String, dynamic>{
|
|
'id': instance.id,
|
|
'burrType': instance.burrType,
|
|
'grindSettingsCount': instance.grindSettingsCount,
|
|
};
|