Oh right, didn't catch the difference in type. It's a little odd that the API is using different types for its canonical resource identifiers but if that's the way it is, I'd go with the type that can capture all the variants; in this case a string.