Replace switch statements with resource ids with if-then-else

3 jobs for !1438 with 1883-resource-ids-will-be-non-final in 9 minutes and 7 seconds (queued for 6 minutes and 1 second)
latest merge request