toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final id = this.id;
  final adMarkers = this.adMarkers;
  final adTriggers = this.adTriggers;
  final adsOnDeliveryRestrictions = this.adsOnDeliveryRestrictions;
  final includeIframeOnlyStream = this.includeIframeOnlyStream;
  final manifestName = this.manifestName;
  final playlistType = this.playlistType;
  final playlistWindowSeconds = this.playlistWindowSeconds;
  final programDateTimeIntervalSeconds = this.programDateTimeIntervalSeconds;
  return {
    'id': id,
    if (adMarkers != null) 'adMarkers': adMarkers.toValue(),
    if (adTriggers != null)
      'adTriggers': adTriggers.map((e) => e.toValue()).toList(),
    if (adsOnDeliveryRestrictions != null)
      'adsOnDeliveryRestrictions': adsOnDeliveryRestrictions.toValue(),
    if (includeIframeOnlyStream != null)
      'includeIframeOnlyStream': includeIframeOnlyStream,
    if (manifestName != null) 'manifestName': manifestName,
    if (playlistType != null) 'playlistType': playlistType.toValue(),
    if (playlistWindowSeconds != null)
      'playlistWindowSeconds': playlistWindowSeconds,
    if (programDateTimeIntervalSeconds != null)
      'programDateTimeIntervalSeconds': programDateTimeIntervalSeconds,
  };
}