public static <T> Optional<T> loadOptionalModel(Class<T> clzz, File file) {
        if (!file.exists()) {
            return Optional.empty();
        }
        return Optional.of(loadModel(clzz, file));
    }
Return an InputStream of the specified resource, failing if it can't be found.

@param location Location of resource
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/utils/ModelLoaderUtils.java