toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'id'] = this.id;
    json[r'name'] = this.name;
    json[r'keyPrefix'] = this.keyPrefix;
  if (this.scopes != null) {
    json[r'scopes'] = this.scopes;
  } else {
    json[r'scopes'] = null;
  }
    json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
  if (this.lastUsedAt != null) {
    json[r'lastUsedAt'] = this.lastUsedAt!.toUtc().toIso8601String();
  } else {
    json[r'lastUsedAt'] = null;
  }
    json[r'key'] = this.key;
  return json;
}