toJson method
Implementation
Map<String, Object?> toJson() {
var type = this.type;
var username = this.username;
var userKey = this.userKey;
var accountId = this.accountId;
var accountType = this.accountType;
var email = this.email;
var publicName = this.publicName;
var profilePicture = this.profilePicture;
var displayName = this.displayName;
var timeZone = this.timeZone;
var isExternalCollaborator = this.isExternalCollaborator;
var externalCollaborator = this.externalCollaborator;
var operations = this.operations;
var details = this.details;
var personalSpace = this.personalSpace;
var expandable = this.expandable;
var links = this.links;
final json = <String, Object?>{};
json[r'type'] = type.value;
if (username != null) {
json[r'username'] = username;
}
if (userKey != null) {
json[r'userKey'] = userKey;
}
if (accountId != null) {
json[r'accountId'] = accountId;
}
if (accountType != null) {
json[r'accountType'] = accountType.value;
}
if (email != null) {
json[r'email'] = email;
}
if (publicName != null) {
json[r'publicName'] = publicName;
}
if (profilePicture != null) {
json[r'profilePicture'] = profilePicture.toJson();
}
if (displayName != null) {
json[r'displayName'] = displayName;
}
if (timeZone != null) {
json[r'timeZone'] = timeZone;
}
json[r'isExternalCollaborator'] = isExternalCollaborator;
json[r'externalCollaborator'] = externalCollaborator;
json[r'operations'] = operations.map((i) => i.toJson()).toList();
if (details != null) {
json[r'details'] = details.toJson();
}
if (personalSpace != null) {
json[r'personalSpace'] = personalSpace.toJson();
}
if (expandable != null) {
json[r'_expandable'] = expandable.toJson();
}
if (links != null) {
json[r'_links'] = links.toJson();
}
return json;
}