toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final _json = <String, dynamic>{};
  if (selectionId != null) {
    _json[r'SelectionId'] = selectionId;
  } else {
    _json[r'SelectionId'] = null;
  }
    _json[r'Name'] = name;
  if (description != null) {
    _json[r'Description'] = description;
  } else {
    _json[r'Description'] = null;
  }
    _json[r'ImageFile'] = imageFile;
  if (timeOfDay != null) {
    _json[r'TimeOfDay'] = timeOfDay;
  } else {
    _json[r'TimeOfDay'] = null;
  }
  if (duration != null) {
    _json[r'Duration'] = duration;
  } else {
    _json[r'Duration'] = null;
  }
  if (rating != null) {
    _json[r'Rating'] = rating;
  } else {
    _json[r'Rating'] = null;
  }
  if (ratingCount != null) {
    _json[r'RatingCount'] = ratingCount;
  } else {
    _json[r'RatingCount'] = null;
  }
  if (random != null) {
    _json[r'Random'] = random;
  } else {
    _json[r'Random'] = null;
  }
  if (views != null) {
    _json[r'Views'] = views;
  } else {
    _json[r'Views'] = null;
  }
  if (createDate != null) {
    _json[r'CreateDate'] = createDate!.toUtc().toIso8601String();
  } else {
    _json[r'CreateDate'] = null;
  }
  if (changeDate != null) {
    _json[r'ChangeDate'] = changeDate!.toUtc().toIso8601String();
  } else {
    _json[r'ChangeDate'] = null;
  }
  if (trackSelections != null) {
    _json[r'TrackSelections'] = trackSelections;
  } else {
    _json[r'TrackSelections'] = null;
  }
  if (companyTypeSelections != null) {
    _json[r'CompanyTypeSelections'] = companyTypeSelections;
  } else {
    _json[r'CompanyTypeSelections'] = null;
  }
  if (genreSelections != null) {
    _json[r'GenreSelections'] = genreSelections;
  } else {
    _json[r'GenreSelections'] = null;
  }
  return _json;
}