class OkHttpClientBuilderImpl
    extends StandardHttpClientBuilder<OkHttpClientImpl, OkHttpClientFactory, OkHttpClientBuilderImpl> {

  private final okhttp3.OkHttpClient.Builder builder;

  public OkHttpClientBuilderImpl(OkHttpClientFactory clientFactory, okhttp3.OkHttpClient.Builder builder) {
    super(clientFactory);
    this.builder = builder;
  }

  okhttp3.OkHttpClient.Builder getBuilder() {
    return builder;
  }

  @Override
  public OkHttpClientImpl build() {
    if (client != null) {
      return completeBuild(this.client.getOkHttpClient().newBuilder(), true);
    }
    return initialBuild(builder);
  }

  public OkHttpClientImpl initialBuild(okhttp3.OkHttpClient.Builder builder) {
    // configure the main properties
    if (connectTimeout != null) {
      builder.connectTimeout(this.connectTimeout);
    }
    if (sslContext != null) {
      X509TrustManager trustManager = null;
      if (trustManagers != null && trustManagers.length == 1) {
        trustManager = (X509TrustManager) trustManagers[0];
      }
      builder.sslSocketFactory(sslContext.getSocketFactory(), trustManager);
    }
    if (followRedirects) {
      builder.followRedirects(true).followSslRedirects(true);
    }
    if (proxyType == ProxyType.DIRECT) {
      builder.proxy(Proxy.NO_PROXY);
    } else if (proxyAddress != null) {
      builder.proxy(new Proxy(convertProxyType(), proxyAddress));
      if (proxyAuthorization != null) {
        builder.proxyAuthenticator(
            (route, response) -> response.request().newBuilder()
                .header(StandardHttpHeaders.PROXY_AUTHORIZATION, proxyAuthorization).build());
      }
    }
    if (tlsVersions != null) {
      ConnectionSpec spec = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
          .tlsVersions(Arrays.stream(tlsVersions)
              .map(tls -> okhttp3.TlsVersion.valueOf(tls.name()))
              .toArray(okhttp3.TlsVersion[]::new))
          .build();
      builder.connectionSpecs(Arrays.asList(spec, CLEARTEXT));
    }
    if (preferHttp11) {
      builder.protocols(Collections.singletonList(Protocol.HTTP_1_1));
    }
    return completeBuild(builder, false);
  }

  private Proxy.Type convertProxyType() {<FILL_FUNCTION_BODY>}

  private OkHttpClientImpl completeBuild(okhttp3.OkHttpClient.Builder builder, boolean derived) {
    if (authenticatorNone) {
      builder.authenticator(Authenticator.NONE);
    }

    if (!derived) {
      clientFactory.additionalConfig(builder);
    }

    OkHttpClient client = builder.build();

    return new OkHttpClientImpl(client, this, new AtomicBoolean());
  }

  @Override
  protected OkHttpClientBuilderImpl newInstance(OkHttpClientFactory clientFactory) {
    return new OkHttpClientBuilderImpl(clientFactory, this.builder);
  }

}

    switch (proxyType) {
      case DIRECT:
        return Proxy.Type.DIRECT;
      case HTTP:
        return Proxy.Type.HTTP;
      case SOCKS4:
      case SOCKS5:
        return Proxy.Type.SOCKS;
      default:
        throw new KubernetesClientException("Unsupported proxy type");
    }
  
<methods>public io.fabric8.kubernetes.client.okhttp.OkHttpClientBuilderImpl addOrReplaceInterceptor(java.lang.String, io.fabric8.kubernetes.client.http.Interceptor) ,public io.fabric8.kubernetes.client.okhttp.OkHttpClientBuilderImpl authenticatorNone() ,public io.fabric8.kubernetes.client.okhttp.OkHttpClientBuilderImpl clientFactory(io.fabric8.kubernetes.client.okhttp.OkHttpClientFactory) ,public io.fabric8.kubernetes.client.okhttp.OkHttpClientBuilderImpl connectTimeout(long, java.util.concurrent.TimeUnit) ,public io.fabric8.kubernetes.client.okhttp.OkHttpClientBuilderImpl copy(io.fabric8.kubernetes.client.okhttp.OkHttpClientImpl) ,public io.fabric8.kubernetes.client.okhttp.OkHttpClientBuilderImpl followAllRedirects() ,public io.fabric8.kubernetes.client.okhttp.OkHttpClientBuilderImpl preferHttp11() ,public io.fabric8.kubernetes.client.okhttp.OkHttpClientBuilderImpl proxyAddress(java.net.InetSocketAddress) ,public io.fabric8.kubernetes.client.okhttp.OkHttpClientBuilderImpl proxyAuthorization(java.lang.String) ,public io.fabric8.kubernetes.client.okhttp.OkHttpClientBuilderImpl proxyType(io.fabric8.kubernetes.client.http.HttpClient.ProxyType) ,public io.fabric8.kubernetes.client.okhttp.OkHttpClientBuilderImpl 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.okhttp.OkHttpClientBuilderImpl tlsVersions(io.fabric8.kubernetes.client.http.TlsVersion[]) <variables>protected boolean authenticatorNone,protected io.fabric8.kubernetes.client.okhttp.OkHttpClientImpl client,protected io.fabric8.kubernetes.client.okhttp.OkHttpClientFactory 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