you have to do `instanceof` check and if it is not desired api throw `UnsupportedApiException`.