// ************************************************************************** // JsonSerializableGenerator // ************************************************************************** _ClockStatusModel _$ClockStatusModelFromJson(Map json) => _ClockStatusModel( isClockedIn: json['isClockedIn'] as bool, lastPunchTime: json['lastPunchTime'] == null ? null : DateTime.parse(json['lastPunchTime'] as String), elapsedMinutes: (json['elapsedMinutes'] as num?)?.toInt(), withinGeofence: json['withinGeofence'] as bool, geofenceDistance: (json['geofenceDistance'] as num?)?.toDouble(), canClockIn: json['canClockIn'] as bool, canClockOut: json['canClockOut'] as bool, clockWindowMessage: json['clockWindowMessage'] as String?, currentShift: json['currentShift'] == null ? null : ShiftModel.fromJson(json['currentShift'] as Map), storeGeofence: json['storeGeofence'] == null ? null : GeofenceModel.fromJson( json['storeGeofence'] as Map, ), ); Map _$ClockStatusModelToJson(_ClockStatusModel instance) => { 'isClockedIn': instance.isClockedIn, 'lastPunchTime': instance.lastPunchTime?.toIso8601String(), 'elapsedMinutes': instance.elapsedMinutes, 'withinGeofence': instance.withinGeofence, 'geofenceDistance': instance.geofenceDistance, 'canClockIn': instance.canClockIn, 'canClockOut': instance.canClockOut, 'clockWindowMessage': instance.clockWindowMessage, 'currentShift': instance.currentShift, 'storeGeofence': instance.storeGeofence, }; _ShiftModel _$ShiftModelFromJson(Map json) => _ShiftModel( shiftId: (json['shiftId'] as num).toInt(), startTime: json['startTime'] as String?, endTime: json['endTime'] as String?, position: json['position'] as String?, positionColor: json['positionColor'] as String?, totalHours: (json['totalHours'] as num?)?.toDouble(), ); Map _$ShiftModelToJson(_ShiftModel instance) => { 'shiftId': instance.shiftId, 'startTime': instance.startTime, 'endTime': instance.endTime, 'position': instance.position, 'positionColor': instance.positionColor, 'totalHours': instance.totalHours, }; _GeofenceModel _$GeofenceModelFromJson(Map json) => _GeofenceModel( latitude: (json['latitude'] as num).toDouble(), longitude: (json['longitude'] as num).toDouble(), radiusMeters: (json['radiusMeters'] as num?)?.toDouble() ?? 200.0, ); Map _$GeofenceModelToJson(_GeofenceModel instance) => { 'latitude': instance.latitude, 'longitude': instance.longitude, 'radiusMeters': instance.radiusMeters, }; _ClockInRequest _$ClockInRequestFromJson(Map json) => _ClockInRequest( latitude: (json['latitude'] as num).toDouble(), longitude: (json['longitude'] as num).toDouble(), accuracy: (json['accuracy'] as num).toDouble(), deviceId: json['deviceId'] as String, ); Map _$ClockInRequestToJson(_ClockInRequest instance) => { 'latitude': instance.latitude, 'longitude': instance.longitude, 'accuracy': instance.accuracy, 'deviceId': instance.deviceId, }; _ClockResultModel _$ClockResultModelFromJson(Map json) => _ClockResultModel( punchId: (json['punchId'] as num).toInt(), punchTime: DateTime.parse(json['punchTime'] as String), shiftId: (json['shiftId'] as num?)?.toInt(), isUnscheduled: json['isUnscheduled'] as bool? ?? false, totalHours: (json['totalHours'] as num?)?.toDouble(), message: json['message'] as String?, ); Map _$ClockResultModelToJson(_ClockResultModel instance) => { 'punchId': instance.punchId, 'punchTime': instance.punchTime.toIso8601String(), 'shiftId': instance.shiftId, 'isUnscheduled': instance.isUnscheduled, 'totalHours': instance.totalHours, 'message': instance.message, };