@@ -1025,11 +1025,52 @@ public Builder withProxy(String proxyHost, int proxyPort) {
10251025 return this ;
10261026 }
10271027
1028+ /**
1029+ * Sets a custom host URL for the control and data plane operations.
1030+ * <p>
1031+ * This method allows you to specify a custom base URL for Pinecone control and data plane requests.
1032+ * <p>
1033+ * Example usage:
1034+ * <pre>{@code
1035+ * Pinecone client = new Pinecone.Builder("PINECONE_API_KEY")
1036+ * .withHost("http://localhost:5080")
1037+ * .build();
1038+ *
1039+ * // Requests will now be sent to the specified host.
1040+ * client.listIndexes();
1041+ * }</pre>
1042+ *
1043+ * @param host The custom host URL for the Pinecone service. Must be a valid URL.
1044+ * @return This {@link Builder} instance for chaining method calls.
1045+ */
10281046 public Builder withHost (String host ) {
10291047 this .host = host ;
10301048 return this ;
10311049 }
10321050
1051+ /**
1052+ * Configures whether TLS (Transport Layer Security) should be enabled for data plane operations.
1053+ * <p>
1054+ * By default, TLS is enabled for data plane requests to ensure secure communication for data plane operations.
1055+ * This method can be used to disable TLS if needed (e.g., for testing or when communicating with non-secure
1056+ * endpoints). Disabling TLS in a production environment is not recommended due to potential security risks.
1057+ * <p>
1058+ * Example usage:
1059+ * <pre>{@code
1060+ * Pinecone client = new Pinecone.Builder("PINECONE_API_KEY")
1061+ * .withTlsEnabled(false)
1062+ * .build();
1063+ *
1064+ * // Get index for data plane operations
1065+ * Index index = pinecone.getIndexConnection("PINECONE_INDEX_NAME");
1066+ *
1067+ * // Requests will now be made without TLS encryption (not recommended for production use).
1068+ * index.upsert("v1", Arrays.asList(1f, 2f, 3f));
1069+ * }</pre>
1070+ *
1071+ * @param enableTls {@code true} to enable TLS (default), {@code false} to disable it.
1072+ * @return This {@link Builder} instance for chaining method calls.
1073+ */
10331074 public Builder withTlsEnabled (boolean enableTls ) {
10341075 this .enableTls = enableTls ;
10351076 return this ;
0 commit comments