toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var type = this.type;
  var username = this.username;
  var userKey = this.userKey;
  var accountId = this.accountId;
  var profilePicture = this.profilePicture;
  var displayName = this.displayName;
  var timeZone = this.timeZone;
  var operations = this.operations;
  var isExternalCollaborator = this.isExternalCollaborator;
  var details = this.details;
  var accountType = this.accountType;
  var email = this.email;
  var publicName = this.publicName;
  var personalSpace = this.personalSpace;
  var externalCollaborator = this.externalCollaborator;

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