class PurgeEntities extends CommonCommand<PurgeEntities> implements WithEntityType {

    public static PurgeEntities fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders) {
        return new CommandJsonDeserializer<PurgeEntities>(TYPE, jsonObject).deserialize(() -> {
            final EntityType entityType = EntityType.of(jsonObject.getValueOrThrow(JsonFields.ENTITY_TYPE));
            final List<EntityId> entityIds = jsonObject.getValueOrThrow(JsonFields.ENTITY_IDS).stream()
                    .map(JsonValue::asString)
                    .map(DefaultEntityId::of)
                    .collect(Collectors.toList());

            return of(entityType, entityIds, dittoHeaders);
        });
    }

    private  PurgeEntities(final EntityType entityType, final Collection<? extends EntityId> entityIds,
            final DittoHeaders dittoHeaders);

}