toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.latestActivityAt != null) {
    json[r'latest_activity_at'] =
        this.latestActivityAt!.toUtc().toIso8601String();
  } else {
    json[r'latest_activity_at'] = null;
  }
  if (this.name != null) {
    json[r'name'] = this.name;
  } else {
    json[r'name'] = null;
  }
  json[r'roles'] = this.roles;
  json[r'sessions'] = this.sessions;
  json[r'user_id'] = this.userId;
  return json;
}