code: public <T> T resolve(Class<T> resourceType, @Nullable String version) {
      Preconditions.checkArgument(hasEndpoint(), "Resource name must have an endpoint.");
      return resourceNameResolver.resolve(resourceType, this, version);
    }
docs: Attempts to resolve a resource name into a resource, by calling the associated API.
  The resource name must have an endpoint. An optional version can be specified to
  determine in which version of the API to call.