encode static method
Implementation
static Map<String, dynamic> encode(User value) {
Map<String, dynamic> entityAsMap = {
"id" : value.id,
"rev" : value.rev,
"deletionDate" : value.deletionDate,
"created" : value.created,
"identifier" : value.identifier.map((x0) => Identifier.encode(x0)).toList(),
"name" : value.name,
"properties" : value.properties.map((x0) => DecryptedPropertyStub.encode(x0)).toList(),
"permissions" : value.permissions.map((x0) => Permission.encode(x0)).toList(),
"roles" : value.roles.map((x0) => x0).toList(),
"type" : value.type == null ? null : UsersType.encode(value.type!),
"status" : value.status == null ? null : UsersStatus.encode(value.status!),
"login" : value.login,
"passwordHash" : value.passwordHash,
"groupId" : value.groupId,
"healthcarePartyId" : value.healthcarePartyId,
"patientId" : value.patientId,
"deviceId" : value.deviceId,
"autoDelegations" : value.autoDelegations.map((k0, v0) => MapEntry(DelegationTag.encode(k0), v0.map((x1) => x1).toList())),
"createdDate" : value.createdDate?.millisecondsSinceEpoch,
"termsOfUseDate" : value.termsOfUseDate?.millisecondsSinceEpoch,
"email" : value.email,
"mobilePhone" : value.mobilePhone,
"applicationTokens" : value.applicationTokens.map((k0, v0) => MapEntry(k0, v0)),
"authenticationTokens" : value.authenticationTokens.map((k0, v0) => MapEntry(k0, AuthenticationToken.encode(v0))),
"systemMetadata" : value.systemMetadata == null ? null : UserSystemMetadata.encode(value.systemMetadata!)
};
return entityAsMap;
}