// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'user_benchmark.model.dart';

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

UserBenchmark _$UserBenchmarkFromJson(Map<String, dynamic> json) {
  return UserBenchmark()
    ..id = json['id'] as int
    ..user_id = json['user_id'] as int
    ..training_session_id = json['training_session_id'] as int
    ..training_workout_id = json['training_workout_id'] as int
    ..level = json['level'] 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)
    ..score = json['score'] as int
    ..user_benchmark_sections = (json['user_benchmark_sections'] as List)
        ?.map((e) => e == null
            ? null
            : UserBenchmarkSection.fromJson(e as Map<String, dynamic>))
        ?.toList()
    ..user = json['user'] == null
        ? null
        : User.fromJson(json['user'] as Map<String, dynamic>);
}

Map<String, dynamic> _$UserBenchmarkToJson(UserBenchmark instance) =>
    <String, dynamic>{
      'id': instance.id,
      'user_id': instance.user_id,
      'training_session_id': instance.training_session_id,
      'training_workout_id': instance.training_workout_id,
      'level': instance.level,
      'created_at': instance.created_at?.toIso8601String(),
      'updated_at': instance.updated_at?.toIso8601String(),
      'score': instance.score,
      'user_benchmark_sections': instance.user_benchmark_sections,
      'user': instance.user,
    };
