toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.channelMentions != null) {
    json[r'channel_mentions'] = this.channelMentions;
  } else {
    json[r'channel_mentions'] = null;
  }
  if (this.defaultPreference != null) {
    json[r'default_preference'] = this.defaultPreference;
  } else {
    json[r'default_preference'] = null;
  }
  if (this.directMentions != null) {
    json[r'direct_mentions'] = this.directMentions;
  } else {
    json[r'direct_mentions'] = null;
  }
  if (this.groupMentions != null) {
    json[r'group_mentions'] = this.groupMentions;
  } else {
    json[r'group_mentions'] = null;
  }
  if (this.hereMentions != null) {
    json[r'here_mentions'] = this.hereMentions;
  } else {
    json[r'here_mentions'] = null;
  }
  if (this.roleMentions != null) {
    json[r'role_mentions'] = this.roleMentions;
  } else {
    json[r'role_mentions'] = null;
  }
  if (this.threadReplies != null) {
    json[r'thread_replies'] = this.threadReplies;
  } else {
    json[r'thread_replies'] = null;
  }
  return json;
}