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;

  final json = <String, Object?>{};
  json[r'type'] = type.value;
  if (username != null) {
    json[r'username'] = username;
  }
  if (userKey != null) {
    json[r'userKey'] = userKey;
  }
  json[r'accountId'] = accountId;
  return json;
}