toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.banExpires != null) {
    json[r'ban_expires'] = this.banExpires!.toUtc().toIso8601String();
  } else {
    json[r'ban_expires'] = null;
  }
    json[r'banned'] = this.banned;
  if (this.createdAt != null) {
    json[r'created_at'] = this.createdAt!.toUtc().toIso8601String();
  } else {
    json[r'created_at'] = null;
  }
    json[r'custom'] = this.custom;
  if (this.deactivatedAt != null) {
    json[r'deactivated_at'] = this.deactivatedAt!.toUtc().toIso8601String();
  } else {
    json[r'deactivated_at'] = null;
  }
  if (this.deletedAt != null) {
    json[r'deleted_at'] = this.deletedAt!.toUtc().toIso8601String();
  } else {
    json[r'deleted_at'] = null;
  }
    json[r'id'] = this.id;
  if (this.invisible != null) {
    json[r'invisible'] = this.invisible;
  } else {
    json[r'invisible'] = null;
  }
  if (this.language != null) {
    json[r'language'] = this.language;
  } else {
    json[r'language'] = null;
  }
  if (this.lastActive != null) {
    json[r'last_active'] = this.lastActive!.toUtc().toIso8601String();
  } else {
    json[r'last_active'] = null;
  }
    json[r'online'] = this.online;
  if (this.privacySettings != null) {
    json[r'privacy_settings'] = this.privacySettings;
  } else {
    json[r'privacy_settings'] = null;
  }
  if (this.pushNotifications != null) {
    json[r'push_notifications'] = this.pushNotifications;
  } else {
    json[r'push_notifications'] = null;
  }
  if (this.revokeTokensIssuedBefore != null) {
    json[r'revoke_tokens_issued_before'] = this.revokeTokensIssuedBefore!.toUtc().toIso8601String();
  } else {
    json[r'revoke_tokens_issued_before'] = null;
  }
    json[r'role'] = this.role;
    json[r'teams'] = this.teams;
  if (this.updatedAt != null) {
    json[r'updated_at'] = this.updatedAt!.toUtc().toIso8601String();
  } else {
    json[r'updated_at'] = null;
  }
  return json;
}