toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'character'] = this.character;
  json[r'account'] = this.account;
  json[r'type'] = this.type;
  json[r'description'] = this.description;
  if (this.content != null) {
    json[r'content'] = this.content;
  } else {
    json[r'content'] = null;
  }
  json[r'cooldown'] = this.cooldown;
  if (this.cooldownExpiration != null) {
    json[r'cooldown_expiration'] =
        this.cooldownExpiration!.toUtc().toIso8601String();
  } else {
    json[r'cooldown_expiration'] = null;
  }
  json[r'created_at'] = this.createdAt.toUtc().toIso8601String();
  return json;
}