// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'bi_exercises.model.dart';

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


BIExercise _$BIExerciseFromJson(Map<String, dynamic> json) {
  return BIExercise()
    ..id = json['id'] as int
    ..name = json['name'] as String
    ..slug = json['slug'] as String
    ..description = json['description'] as String
    ..modality = json['modality'] as String
    ..type = json['type'] as String
    ..equipment_type = json['equipment_type']=="" ? null : json['equipment_type']  as String
    ..level = json['level'] as int
    ..url_video_predefined = json['url_video_predefined'] as String
    ..created_at = json['created_at'] == null
        ? null
        : DateTime.parse(json['created_at'] as String)
    ..updated_at = json['updated_at'] == null
        ? null
        : DateTime.parse(json['updated_at'] as String)
    ..benchmarks = (json['benchmarks'] as List)
        ?.map((e) =>
            e == null ? null : UserBenchmark.fromJson(e as Map<String, dynamic>))
        ?.toList()
    ..workouts = (json['workouts'] as List)
        ?.map((e) =>
            e == null ? null : TrainingWorkout.fromJson(e as Map<String, dynamic>))
        ?.toList()
    ..graph = (json['graph'] as List)
        ?.map((e) =>
            e == null ? null :Map<String, dynamic>.from(e as Map<String, dynamic>))
        ?.toList();
}

Map<String, dynamic> _$BIExerciseToJson(BIExercise instance) => <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'slug': instance.slug,
      'description': instance.description,
      'modality': instance.modality,
      'type': instance.type,
      'equipment_type': instance.equipment_type,
      'level': instance.level,
      'url_video_predefined': instance.url_video_predefined,
      'created_at': instance.created_at?.toIso8601String(),
      'updated_at': instance.updated_at?.toIso8601String(),
      'benchmarks': instance.benchmarks,
      'workouts': instance.workouts,
      'graph': instance.graph
    };
