toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'allowed_flag_reasons'] = this.allowedFlagReasons;
    json[r'automod'] = this.automod;
    json[r'automod_behavior'] = this.automodBehavior;
  if (this.automodThresholds != null) {
    json[r'automod_thresholds'] = this.automodThresholds;
  } else {
    json[r'automod_thresholds'] = null;
  }
  if (this.blocklist != null) {
    json[r'blocklist'] = this.blocklist;
  } else {
    json[r'blocklist'] = null;
  }
  if (this.blocklistBehavior != null) {
    json[r'blocklist_behavior'] = this.blocklistBehavior;
  } else {
    json[r'blocklist_behavior'] = null;
  }
    json[r'blocklists'] = this.blocklists;
    json[r'commands'] = this.commands;
    json[r'connect_events'] = this.connectEvents;
    json[r'created_at'] = this.createdAt.toUtc().toIso8601String();
    json[r'custom_events'] = this.customEvents;
    json[r'grants'] = this.grants;
    json[r'mark_messages_pending'] = this.markMessagesPending;
    json[r'max_message_length'] = this.maxMessageLength;
    json[r'mutes'] = this.mutes;
    json[r'name'] = this.name;
    json[r'polls'] = this.polls;
    json[r'push_notifications'] = this.pushNotifications;
    json[r'quotes'] = this.quotes;
    json[r'reactions'] = this.reactions;
    json[r'read_events'] = this.readEvents;
    json[r'reminders'] = this.reminders;
    json[r'replies'] = this.replies;
    json[r'search'] = this.search;
    json[r'typing_events'] = this.typingEvents;
    json[r'updated_at'] = this.updatedAt.toUtc().toIso8601String();
    json[r'uploads'] = this.uploads;
    json[r'url_enrichment'] = this.urlEnrichment;
  return json;
}