@Override
  public @NotNull URI toURI() {
    int port = getPort() == null ? -1 : getPort();
    try {
      return new URI(getSchema(), null, getHost(), port, getSuffix(), null, null);
    }
    catch (URISyntaxException e) {
      // shouldn't happen, because we pre-validate the data
      throw new RuntimeException(e);
    }
  }
@Override
  public @NotNull URI toURI()