class JettyHttpClientBuilder
    extends StandardHttpClientBuilder<JettyHttpClient, JettyHttpClientFactory, JettyHttpClientBuilder> {

  private static final int MAX_CONNECTIONS = Integer.MAX_VALUE;
  // the default for etcd seems to be 3 MB, but we'll default to unlimited to have the same behavior across clients
  private static final int MAX_WS_MESSAGE_SIZE = Integer.MAX_VALUE;

  public JettyHttpClientBuilder(JettyHttpClientFactory clientFactory) {
    super(clientFactory);
    // TODO: HTTP2 disabled, MockWebServer support is limited and requires changes
    //  Enable (preferHttp11->false) the feature after fixing MockWebServer
    //  https://github.com/fabric8io/kubernetes-client/issues/4193
    this.preferHttp11 = true;
  }

  @Override
  public JettyHttpClient build() {<FILL_FUNCTION_BODY>}

  private static HttpClientTransport newTransport(SslContextFactory.Client sslContextFactory, boolean preferHttp11) {
    final var clientConnector = new ClientConnector();
    clientConnector.setSslContextFactory(sslContextFactory);
    final HttpClientTransport transport;
    if (preferHttp11) {
      transport = new HttpClientTransportOverHTTP(clientConnector);
    } else {
      var http2 = new ClientConnectionFactoryOverHTTP2.HTTP2(new HTTP2Client(clientConnector));
      transport = new HttpClientTransportDynamic(clientConnector, http2, HttpClientConnectionFactory.HTTP11);
    }
    return transport;
  }

  @Override
  protected JettyHttpClientBuilder newInstance(JettyHttpClientFactory clientFactory) {
    return new JettyHttpClientBuilder(clientFactory);
  }

  @Override
  public Duration getConnectTimeout() {
    return Optional.ofNullable(connectTimeout).orElse(Duration.ZERO);
  }
}

    if (client != null) {
      return new JettyHttpClient(this, client.getJetty(), client.getJettyWs(), client.getClosed());
    }
    final var sslContextFactory = new SslContextFactory.Client();
    if (sslContext != null) {
      sslContextFactory.setSslContext(sslContext);
    }
    if (tlsVersions != null && tlsVersions.length > 0) {
      sslContextFactory.setIncludeProtocols(Stream.of(tlsVersions).map(TlsVersion::javaName).toArray(String[]::new));
    }
    HttpClient sharedHttpClient = new HttpClient(newTransport(sslContextFactory, preferHttp11));
    WebSocketClient sharedWebSocketClient = new WebSocketClient(new HttpClient(newTransport(sslContextFactory, preferHttp11)));
    sharedWebSocketClient.setMaxBinaryMessageSize(MAX_WS_MESSAGE_SIZE);
    // the api-server does not seem to fragment messages, so the frames can be very large
    sharedWebSocketClient.setMaxFrameSize(MAX_WS_MESSAGE_SIZE);
    sharedWebSocketClient.setMaxTextMessageSize(MAX_WS_MESSAGE_SIZE);
    sharedWebSocketClient.setIdleTimeout(Duration.ZERO);
    if (connectTimeout != null) {
      sharedHttpClient.setConnectTimeout(connectTimeout.toMillis());
      sharedWebSocketClient.setConnectTimeout(connectTimeout.toMillis());
    }
    sharedHttpClient.setFollowRedirects(followRedirects);
    // long running http requests count against this and eventually exhaust
    // the work that can be done
    sharedHttpClient.setMaxConnectionsPerDestination(MAX_CONNECTIONS);
    sharedWebSocketClient.getHttpClient().setMaxConnectionsPerDestination(MAX_CONNECTIONS);
    if (proxyType != ProxyType.DIRECT && proxyAddress != null) {
      Origin.Address address = new Origin.Address(proxyAddress.getHostString(), proxyAddress.getPort());
      // Jetty allows for the differentiation of proxy being secure separately from the destination,
      // but we'll always set that flag to false
      switch (proxyType) {
        case HTTP:
          sharedHttpClient.getProxyConfiguration().addProxy(new HttpProxy(address, false));
          break;
        case SOCKS4:
          sharedHttpClient.getProxyConfiguration().addProxy(new Socks4Proxy(address, false));
          break;
        default:
          throw new KubernetesClientException("Unsupported proxy type");
      }
      sharedHttpClient.getProxyConfiguration().addProxy(new HttpProxy(address, false));
      addProxyAuthInterceptor();
    }
    clientFactory.additionalConfig(sharedHttpClient, sharedWebSocketClient);
    return new JettyHttpClient(this, sharedHttpClient, sharedWebSocketClient);
  
<methods>public io.fabric8.kubernetes.client.jetty.JettyHttpClientBuilder addOrReplaceInterceptor(java.lang.String, io.fabric8.kubernetes.client.http.Interceptor) ,public io.fabric8.kubernetes.client.jetty.JettyHttpClientBuilder authenticatorNone() ,public io.fabric8.kubernetes.client.jetty.JettyHttpClientBuilder clientFactory(io.fabric8.kubernetes.client.jetty.JettyHttpClientFactory) ,public io.fabric8.kubernetes.client.jetty.JettyHttpClientBuilder connectTimeout(long, java.util.concurrent.TimeUnit) ,public io.fabric8.kubernetes.client.jetty.JettyHttpClientBuilder copy(io.fabric8.kubernetes.client.jetty.JettyHttpClient) ,public io.fabric8.kubernetes.client.jetty.JettyHttpClientBuilder followAllRedirects() ,public io.fabric8.kubernetes.client.jetty.JettyHttpClientBuilder preferHttp11() ,public io.fabric8.kubernetes.client.jetty.JettyHttpClientBuilder proxyAddress(java.net.InetSocketAddress) ,public io.fabric8.kubernetes.client.jetty.JettyHttpClientBuilder proxyAuthorization(java.lang.String) ,public io.fabric8.kubernetes.client.jetty.JettyHttpClientBuilder proxyType(io.fabric8.kubernetes.client.http.HttpClient.ProxyType) ,public io.fabric8.kubernetes.client.jetty.JettyHttpClientBuilder sslContext(javax.net.ssl.KeyManager[], javax.net.ssl.TrustManager[]) ,public io.fabric8.kubernetes.client.http.HttpClient.DerivedClientBuilder tag(java.lang.Object) ,public transient io.fabric8.kubernetes.client.jetty.JettyHttpClientBuilder tlsVersions(io.fabric8.kubernetes.client.http.TlsVersion[]) <variables>protected boolean authenticatorNone,protected io.fabric8.kubernetes.client.jetty.JettyHttpClient client,protected io.fabric8.kubernetes.client.jetty.JettyHttpClientFactory clientFactory,protected java.time.Duration connectTimeout,protected boolean followRedirects,protected LinkedHashMap<java.lang.String,io.fabric8.kubernetes.client.http.Interceptor> interceptors,protected javax.net.ssl.KeyManager[] keyManagers,protected boolean preferHttp11,protected java.net.InetSocketAddress proxyAddress,protected java.lang.String proxyAuthorization,protected io.fabric8.kubernetes.client.http.HttpClient.ProxyType proxyType,protected javax.net.ssl.SSLContext sslContext,protected LinkedHashMap<Class<?>,java.lang.Object> tags,protected io.fabric8.kubernetes.client.http.TlsVersion[] tlsVersions,protected javax.net.ssl.TrustManager[] trustManagers