singsound_result_detail_entity.g.dart 4.32 KB
import 'package:wow_english/generated/json/base/json_convert_content.dart';
import 'package:wow_english/models/singsound_result_detail_entity.dart';

SingsoundResultDetailEntity $SingsoundResultDetailEntityFromJson(
    Map<String, dynamic> json) {
  final SingsoundResultDetailEntity singsoundResultDetailEntity = SingsoundResultDetailEntity();
  final int? dpType = jsonConvert.convert<int>(json['dp_type']);
  if (dpType != null) {
    singsoundResultDetailEntity.dpType = dpType;
  }
  final int? tonescore = jsonConvert.convert<int>(json['tonescore']);
  if (tonescore != null) {
    singsoundResultDetailEntity.tonescore = tonescore;
  }
  final int? dur = jsonConvert.convert<int>(json['dur']);
  if (dur != null) {
    singsoundResultDetailEntity.dur = dur;
  }
  final int? liaisonref = jsonConvert.convert<int>(json['liaisonref']);
  if (liaisonref != null) {
    singsoundResultDetailEntity.liaisonref = liaisonref;
  }
  final int? stressref = jsonConvert.convert<int>(json['stressref']);
  if (stressref != null) {
    singsoundResultDetailEntity.stressref = stressref;
  }
  final int? senseref = jsonConvert.convert<int>(json['senseref']);
  if (senseref != null) {
    singsoundResultDetailEntity.senseref = senseref;
  }
  final int? start = jsonConvert.convert<int>(json['start']);
  if (start != null) {
    singsoundResultDetailEntity.start = start;
  }
  final int? liaisonscore = jsonConvert.convert<int>(json['liaisonscore']);
  if (liaisonscore != null) {
    singsoundResultDetailEntity.liaisonscore = liaisonscore;
  }
  final int? fluency = jsonConvert.convert<int>(json['fluency']);
  if (fluency != null) {
    singsoundResultDetailEntity.fluency = fluency;
  }
  final String? char = jsonConvert.convert<String>(json['char']);
  if (char != null) {
    singsoundResultDetailEntity.char = char;
  }
  final int? toneref = jsonConvert.convert<int>(json['toneref']);
  if (toneref != null) {
    singsoundResultDetailEntity.toneref = toneref;
  }
  final int? stressscore = jsonConvert.convert<int>(json['stressscore']);
  if (stressscore != null) {
    singsoundResultDetailEntity.stressscore = stressscore;
  }
  final int? score = jsonConvert.convert<int>(json['score']);
  if (score != null) {
    singsoundResultDetailEntity.score = score;
  }
  final int? end = jsonConvert.convert<int>(json['end']);
  if (end != null) {
    singsoundResultDetailEntity.end = end;
  }
  final int? sensescore = jsonConvert.convert<int>(json['sensescore']);
  if (sensescore != null) {
    singsoundResultDetailEntity.sensescore = sensescore;
  }
  return singsoundResultDetailEntity;
}

Map<String, dynamic> $SingsoundResultDetailEntityToJson(
    SingsoundResultDetailEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['dp_type'] = entity.dpType;
  data['tonescore'] = entity.tonescore;
  data['dur'] = entity.dur;
  data['liaisonref'] = entity.liaisonref;
  data['stressref'] = entity.stressref;
  data['senseref'] = entity.senseref;
  data['start'] = entity.start;
  data['liaisonscore'] = entity.liaisonscore;
  data['fluency'] = entity.fluency;
  data['char'] = entity.char;
  data['toneref'] = entity.toneref;
  data['stressscore'] = entity.stressscore;
  data['score'] = entity.score;
  data['end'] = entity.end;
  data['sensescore'] = entity.sensescore;
  return data;
}

extension SingsoundResultDetailEntityExtension on SingsoundResultDetailEntity {
  SingsoundResultDetailEntity copyWith({
    int? dpType,
    int? tonescore,
    int? dur,
    int? liaisonref,
    int? stressref,
    int? senseref,
    int? start,
    int? liaisonscore,
    int? fluency,
    String? char,
    int? toneref,
    int? stressscore,
    int? score,
    int? end,
    int? sensescore,
  }) {
    return SingsoundResultDetailEntity()
      ..dpType = dpType ?? this.dpType
      ..tonescore = tonescore ?? this.tonescore
      ..dur = dur ?? this.dur
      ..liaisonref = liaisonref ?? this.liaisonref
      ..stressref = stressref ?? this.stressref
      ..senseref = senseref ?? this.senseref
      ..start = start ?? this.start
      ..liaisonscore = liaisonscore ?? this.liaisonscore
      ..fluency = fluency ?? this.fluency
      ..char = char ?? this.char
      ..toneref = toneref ?? this.toneref
      ..stressscore = stressscore ?? this.stressscore
      ..score = score ?? this.score
      ..end = end ?? this.end
      ..sensescore = sensescore ?? this.sensescore;
  }
}