in server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/mail/MailboxSet.scala [157:179]
def updates(serializer: MailboxSerializer,
capabilities: Set[CapabilityIdentifier],
mailboxIdFactory: MailboxId.Factory,
mailboxSession: MailboxSession): Iterable[Either[PatchUpdateValidationException, Update]] = value.map({
case (property, newValue) => property match {
case "name" => NameUpdate.parse(newValue, mailboxSession)
case "parentId" => ParentIdUpdate.parse(newValue, mailboxIdFactory)
case "sharedWith" => SharedWithResetUpdate.parse(serializer, capabilities)(newValue)
case "role" => Left(ServerSetPropertyException(MailboxPatchObject.roleProperty))
case "sortOrder" => Left(ServerSetPropertyException(MailboxPatchObject.sortOrderProperty))
case "quotas" => rejectQuotasUpdate(capabilities)
case "namespace" => Left(ServerSetPropertyException(MailboxPatchObject.namespaceProperty))
case "unreadThreads" => Left(ServerSetPropertyException(MailboxPatchObject.unreadThreadsProperty))
case "totalThreads" => Left(ServerSetPropertyException(MailboxPatchObject.totalThreadsProperty))
case "unreadEmails" => Left(ServerSetPropertyException(MailboxPatchObject.unreadEmailsProperty))
case "totalEmails" => Left(ServerSetPropertyException(MailboxPatchObject.totalEmailsProperty))
case "myRights" => Left(ServerSetPropertyException(MailboxPatchObject.myRightsProperty))
case "isSubscribed" => IsSubscribedUpdate.parse(newValue)
case property: String if property.startsWith(MailboxPatchObject.sharedWithPrefix) =>
SharedWithPartialUpdate.parse(serializer, capabilities)(property, newValue)
case property => MailboxPatchObject.notFound(property)
}
})