toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (id != null) {
    json[r'id'] = id;
  }
  if (rev != null) {
    json[r'rev'] = rev;
  }
  if (deletionDate != null) {
    json[r'deletionDate'] = deletionDate;
  }
  if (created != null) {
    json[r'created'] = created;
  }
  if (name != null) {
    json[r'name'] = name;
  }
  json[r'properties'] = properties.toList();
  json[r'roles'] = roles.toList();
  if (login != null) {
    json[r'login'] = login;
  }
  if (passwordHash != null) {
    json[r'passwordHash'] = passwordHash;
  }
  if (secret != null) {
    json[r'secret'] = secret;
  }
  if (use2fa != null) {
    json[r'use2fa'] = use2fa;
  }
  if (groupId != null) {
    json[r'groupId'] = groupId;
  }
  if (healthcarePartyId != null) {
    json[r'healthcarePartyId'] = healthcarePartyId;
  }
  if (patientId != null) {
    json[r'patientId'] = patientId;
  }
  if (deviceId != null) {
    json[r'deviceId'] = deviceId;
  }
  json[r'autoDelegations'] = autoDelegations.map((k, v) => MapEntry(k, v.toList()));
  if (email != null) {
    json[r'email'] = email;
  }
  if (mobilePhone != null) {
    json[r'mobilePhone'] = mobilePhone;
  }
  json[r'authenticationTokens'] = authenticationTokens;
  if (status != null) {
    json[r'status'] = status;
  }
  return json;
}