class ThingCommandEnforcement extends AbstractEnforcement<ThingCommand<?>> {

    private static ThingCommand transformModifyThingToCreateThing(final ThingCommand receivedCommand) {
        if (receivedCommand instanceof ModifyThing) {
            final ModifyThing modifyThing = (ModifyThing) receivedCommand;
            final JsonObject initialPolicy = modifyThing.getInitialPolicy().orElse(null);
            final String policyIdOrPlaceholder = modifyThing.getPolicyIdOrPlaceholder().orElse(null);
            final Thing newThing = modifyThing.getThing().toBuilder()
                    .setId(modifyThing.getThingEntityId())
                    .build();
            return CreateThing.of(newThing, initialPolicy, policyIdOrPlaceholder, modifyThing.getDittoHeaders());
        } else {
            return receivedCommand;
        }
    }

    private  ThingCommandEnforcement(final Contextual<ThingCommand<?>> data,
            final ActorRef thingsShardRegion,
            final ActorRef policiesShardRegion,
            final Cache<EntityIdWithResourceType, Entry<EntityIdWithResourceType>> thingIdCache,
            final Cache<EntityIdWithResourceType, Entry<Enforcer>> policyEnforcerCache,
            final Cache<EntityIdWithResourceType, Entry<Enforcer>> aclEnforcerCache,
            final PreEnforcer preEnforcer,
            final List<SubjectIssuer> subjectIssuersForPolicyMigration);

}