toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.autoTranslationEnabled != null) {
    json[r'auto_translation_enabled'] = this.autoTranslationEnabled;
  } else {
    json[r'auto_translation_enabled'] = null;
  }
    json[r'auto_translation_language'] = this.autoTranslationLanguage;
    json[r'cid'] = this.cid;
  if (this.config != null) {
    json[r'config'] = this.config;
  } else {
    json[r'config'] = null;
  }
  if (this.configOverrides != null) {
    json[r'config_overrides'] = this.configOverrides;
  } else {
    json[r'config_overrides'] = null;
  }
  if (this.cooldown != null) {
    json[r'cooldown'] = this.cooldown;
  } else {
    json[r'cooldown'] = null;
  }
    json[r'created_at'] = this.createdAt.toUtc().toIso8601String();
  if (this.createdBy != null) {
    json[r'created_by'] = this.createdBy;
  } else {
    json[r'created_by'] = null;
  }
    json[r'custom'] = this.custom;
  if (this.deletedAt != null) {
    json[r'deleted_at'] = this.deletedAt!.toUtc().toIso8601String();
  } else {
    json[r'deleted_at'] = null;
  }
    json[r'disabled'] = this.disabled;
    json[r'frozen'] = this.frozen;
    json[r'id'] = this.id;
    json[r'invites'] = this.invites;
  if (this.lastMessageAt != null) {
    json[r'last_message_at'] = this.lastMessageAt!.toUtc().toIso8601String();
  } else {
    json[r'last_message_at'] = null;
  }
  if (this.memberCount != null) {
    json[r'member_count'] = this.memberCount;
  } else {
    json[r'member_count'] = null;
  }
    json[r'members'] = this.members;
  if (this.team != null) {
    json[r'team'] = this.team;
  } else {
    json[r'team'] = null;
  }
  if (this.truncatedBy != null) {
    json[r'truncated_by'] = this.truncatedBy;
  } else {
    json[r'truncated_by'] = null;
  }
    json[r'type'] = this.type;
    json[r'updated_at'] = this.updatedAt.toUtc().toIso8601String();
  return json;
}