toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final action = this.action;
  final body = this.body;
  final mediaUrl = this.mediaUrl;
  final rawContent = this.rawContent;
  final sound = this.sound;
  final title = this.title;
  final url = this.url;
  return {
    if (action != null) 'Action': action.toValue(),
    if (body != null) 'Body': body,
    if (mediaUrl != null) 'MediaUrl': mediaUrl,
    if (rawContent != null) 'RawContent': rawContent,
    if (sound != null) 'Sound': sound,
    if (title != null) 'Title': title,
    if (url != null) 'Url': url,
  };
}