Use a class to avoid redefining the type resource.