docs: String buildProjectEndpoint(DatastoreOptions options) {
      if (options.getProjectEndpoint() != null) {
        return options.getProjectEndpoint();
      }
      // DatastoreOptions ensures either project endpoint or project ID is set.
      String projectId = checkNotNull(options.getProjectId());
      if (options.getHost() != null) {
        return validateUrl(String.format("https://%s/%s/projects/%s",
            options.getHost(), VERSION, projectId));
      } else if (options.getLocalHost() != null) {
        return validateUrl(String.format("http://%s/%s/projects/%s",
            options.getLocalHost(), VERSION, projectId));
      }
      return validateUrl(String.format("%s/%s/projects/%s",
          DEFAULT_HOST, VERSION, projectId));
    }