From 96421c89dd68c5acf16339cecae3c28859187283 Mon Sep 17 00:00:00 2001 From: rohanshah18 Date: Fri, 10 Jan 2025 14:36:53 -0500 Subject: [PATCH 1/5] generate code based on 2025-01 api spec --- codegen/apis | 2 +- .../integration/inference/EmbedTest.java | 2 +- .../integration/inference/RerankTest.java | 22 +- .../java/io/pinecone/clients/Inference.java | 12 +- .../db_control/client/ApiCallback.java | 2 +- .../db_control/client/ApiClient.java | 4 +- .../db_control/client/ApiException.java | 4 +- .../db_control/client/ApiResponse.java | 2 +- .../db_control/client/Configuration.java | 6 +- .../client/GzipRequestInterceptor.java | 2 +- .../openapitools/db_control/client/JSON.java | 6 +- .../openapitools/db_control/client/Pair.java | 4 +- .../client/ProgressRequestBody.java | 2 +- .../client/ProgressResponseBody.java | 2 +- .../db_control/client/StringUtil.java | 4 +- .../client/api/ManageIndexesApi.java | 162 +++++- .../db_control/client/auth/ApiKeyAuth.java | 4 +- .../client/auth/Authentication.java | 2 +- .../db_control/client/auth/HttpBasicAuth.java | 2 +- .../client/auth/HttpBearerAuth.java | 4 +- .../client/model/AbstractOpenApiSchema.java | 4 +- .../client/model/CollectionList.java | 4 +- .../client/model/CollectionModel.java | 4 +- .../client/model/ConfigureIndexRequest.java | 57 +- .../model/ConfigureIndexRequestEmbed.java | 368 +++++++++++++ .../model/ConfigureIndexRequestSpec.java | 4 +- .../model/ConfigureIndexRequestSpecPod.java | 4 +- .../client/model/CreateCollectionRequest.java | 4 +- .../model/CreateIndexForModelRequest.java | 504 +++++++++++++++++ .../CreateIndexForModelRequestEmbed.java | 457 ++++++++++++++++ .../client/model/CreateIndexRequest.java | 64 ++- .../client/model/DeletionProtection.java | 4 +- .../client/model/ErrorResponse.java | 4 +- .../client/model/ErrorResponseError.java | 4 +- .../db_control/client/model/IndexList.java | 4 +- .../db_control/client/model/IndexModel.java | 98 +++- .../client/model/IndexModelSpec.java | 4 +- .../client/model/IndexModelStatus.java | 4 +- .../db_control/client/model/IndexSpec.java | 6 +- .../client/model/ModelIndexEmbed.java | 517 ++++++++++++++++++ .../db_control/client/model/PodSpec.java | 4 +- .../client/model/PodSpecMetadataConfig.java | 4 +- .../client/model/ServerlessSpec.java | 6 +- .../db_data/client/ApiCallback.java | 2 +- .../db_data/client/ApiClient.java | 4 +- .../db_data/client/ApiException.java | 4 +- .../db_data/client/ApiResponse.java | 2 +- .../db_data/client/Configuration.java | 6 +- .../client/GzipRequestInterceptor.java | 2 +- .../org/openapitools/db_data/client/JSON.java | 12 +- .../org/openapitools/db_data/client/Pair.java | 4 +- .../db_data/client/ProgressRequestBody.java | 2 +- .../db_data/client/ProgressResponseBody.java | 2 +- .../db_data/client/StringUtil.java | 4 +- .../db_data/client/api/BulkOperationsApi.java | 50 +- .../client/api/VectorOperationsApi.java | 333 ++++++++++- .../db_data/client/auth/ApiKeyAuth.java | 4 +- .../db_data/client/auth/Authentication.java | 2 +- .../db_data/client/auth/HttpBasicAuth.java | 2 +- .../db_data/client/auth/HttpBearerAuth.java | 4 +- .../client/model/AbstractOpenApiSchema.java | 4 +- .../db_data/client/model/DeleteRequest.java | 6 +- .../model/DescribeIndexStatsRequest.java | 6 +- .../db_data/client/model/FetchResponse.java | 4 +- .../db_data/client/model/Hit.java | 350 ++++++++++++ .../db_data/client/model/ImportErrorMode.java | 4 +- .../db_data/client/model/ImportModel.java | 6 +- .../client/model/IndexDescription.java | 74 ++- .../client/model/ListImportsResponse.java | 4 +- .../db_data/client/model/ListItem.java | 4 +- .../db_data/client/model/ListResponse.java | 4 +- .../client/model/NamespaceSummary.java | 4 +- .../db_data/client/model/Pagination.java | 4 +- .../db_data/client/model/ProtobufAny.java | 4 +- .../client/model/ProtobufNullValue.java | 2 +- .../db_data/client/model/QueryRequest.java | 6 +- .../db_data/client/model/QueryResponse.java | 4 +- .../db_data/client/model/QueryVector.java | 4 +- .../db_data/client/model/RpcStatus.java | 4 +- .../db_data/client/model/ScoredVector.java | 4 +- .../client/model/SearchRecordsRequest.java | 367 +++++++++++++ .../model/SearchRecordsRequestQuery.java | 409 ++++++++++++++ .../model/SearchRecordsRequestRerank.java | 434 +++++++++++++++ .../client/model/SearchRecordsResponse.java | 324 +++++++++++ .../model/SearchRecordsResponseResult.java | 310 +++++++++++ .../client/model/SearchRecordsVector.java | 375 +++++++++++++ .../db_data/client/model/SearchUsage.java | 348 ++++++++++++ .../db_data/client/model/SearchVector.java | 295 ++++++++++ .../client/model/SingleQueryResults.java | 4 +- .../db_data/client/model/SparseValues.java | 4 +- .../client/model/StartImportRequest.java | 8 +- .../client/model/StartImportResponse.java | 6 +- .../db_data/client/model/UpdateRequest.java | 4 +- .../db_data/client/model/UpsertRecord.java | 292 ++++++++++ .../db_data/client/model/UpsertRequest.java | 4 +- .../db_data/client/model/UpsertResponse.java | 4 +- .../db_data/client/model/Usage.java | 4 +- .../db_data/client/model/Vector.java | 4 +- .../inference/client/ApiCallback.java | 2 +- .../inference/client/ApiClient.java | 4 +- .../inference/client/ApiException.java | 4 +- .../inference/client/ApiResponse.java | 2 +- .../inference/client/Configuration.java | 6 +- .../client/GzipRequestInterceptor.java | 2 +- .../openapitools/inference/client/JSON.java | 18 +- .../openapitools/inference/client/Pair.java | 4 +- .../inference/client/ProgressRequestBody.java | 2 +- .../client/ProgressResponseBody.java | 2 +- .../inference/client/StringUtil.java | 4 +- .../inference/client/api/InferenceApi.java | 2 +- .../inference/client/auth/ApiKeyAuth.java | 4 +- .../inference/client/auth/Authentication.java | 2 +- .../inference/client/auth/HttpBasicAuth.java | 2 +- .../inference/client/auth/HttpBearerAuth.java | 4 +- .../client/model/AbstractOpenApiSchema.java | 4 +- ...estParameters.java => DenseEmbedding.java} | 146 ++--- .../inference/client/model/EmbedRequest.java | 31 +- .../client/model/EmbedRequestInputsInner.java | 4 +- .../inference/client/model/Embedding.java | 411 +++++++------- .../client/model/EmbeddingsList.java | 40 +- .../client/model/EmbeddingsListUsage.java | 5 +- .../inference/client/model/ErrorResponse.java | 4 +- .../client/model/ErrorResponseError.java | 4 +- .../client/model/RankedDocument.java | 18 +- .../inference/client/model/RerankRequest.java | 30 +- .../inference/client/model/RerankResult.java | 4 +- .../client/model/RerankResultUsage.java | 7 +- .../client/model/SparseEmbedding.java | 418 ++++++++++++++ .../inference/client/model/VectorType.java | 72 +++ .../resources/createIndexResponse.valid.json | 3 +- ...teIndexResponse.withUnknownProperties.json | 3 +- ...ribeCollection.witihUnknownProperties.json | 3 +- .../describeIndexResponse.valid.json | 3 +- ...beIndexResponse.withUnknownProperties.json | 3 +- src/test/resources/indexListJsonString.json | 6 +- src/test/resources/podIndexJsonString.json | 3 +- .../resources/serverlessIndexJsonString.json | 3 +- 137 files changed, 7160 insertions(+), 649 deletions(-) create mode 100644 src/main/java/org/openapitools/db_control/client/model/ConfigureIndexRequestEmbed.java create mode 100644 src/main/java/org/openapitools/db_control/client/model/CreateIndexForModelRequest.java create mode 100644 src/main/java/org/openapitools/db_control/client/model/CreateIndexForModelRequestEmbed.java create mode 100644 src/main/java/org/openapitools/db_control/client/model/ModelIndexEmbed.java create mode 100644 src/main/java/org/openapitools/db_data/client/model/Hit.java create mode 100644 src/main/java/org/openapitools/db_data/client/model/SearchRecordsRequest.java create mode 100644 src/main/java/org/openapitools/db_data/client/model/SearchRecordsRequestQuery.java create mode 100644 src/main/java/org/openapitools/db_data/client/model/SearchRecordsRequestRerank.java create mode 100644 src/main/java/org/openapitools/db_data/client/model/SearchRecordsResponse.java create mode 100644 src/main/java/org/openapitools/db_data/client/model/SearchRecordsResponseResult.java create mode 100644 src/main/java/org/openapitools/db_data/client/model/SearchRecordsVector.java create mode 100644 src/main/java/org/openapitools/db_data/client/model/SearchUsage.java create mode 100644 src/main/java/org/openapitools/db_data/client/model/SearchVector.java create mode 100644 src/main/java/org/openapitools/db_data/client/model/UpsertRecord.java rename src/main/java/org/openapitools/inference/client/model/{EmbedRequestParameters.java => DenseEmbedding.java} (65%) create mode 100644 src/main/java/org/openapitools/inference/client/model/SparseEmbedding.java create mode 100644 src/main/java/org/openapitools/inference/client/model/VectorType.java diff --git a/codegen/apis b/codegen/apis index 39e90e26..24c62612 160000 --- a/codegen/apis +++ b/codegen/apis @@ -1 +1 @@ -Subproject commit 39e90e26073686ed3a46d3db1e8b91e845bde90c +Subproject commit 24c62612dad963af00da4baa29c173c954244ac7 diff --git a/src/integration/java/io/pinecone/integration/inference/EmbedTest.java b/src/integration/java/io/pinecone/integration/inference/EmbedTest.java index ba547d96..5fbd1982 100644 --- a/src/integration/java/io/pinecone/integration/inference/EmbedTest.java +++ b/src/integration/java/io/pinecone/integration/inference/EmbedTest.java @@ -35,7 +35,7 @@ public void testGenerateEmbeddings() throws ApiException { assertNotNull(embeddings, "Expected embedding to be not null"); Assertions.assertEquals(embeddingModel, embeddings.getModel()); - Assertions.assertEquals(1024, embeddings.getData().get(0).getValues().size()); + Assertions.assertEquals(1024, embeddings.getData().get(0).getDenseEmbedding().getValues().size()); Assertions.assertEquals(2, embeddings.getData().size()); } diff --git a/src/integration/java/io/pinecone/integration/inference/RerankTest.java b/src/integration/java/io/pinecone/integration/inference/RerankTest.java index 54c5183f..2a27f388 100644 --- a/src/integration/java/io/pinecone/integration/inference/RerankTest.java +++ b/src/integration/java/io/pinecone/integration/inference/RerankTest.java @@ -22,24 +22,24 @@ public class RerankTest { public void testRerank() throws ApiException { String model = "bge-reranker-v2-m3"; String query = "The tech company Apple is known for its innovative products like the iPhone."; - List> documents = new ArrayList<>(); + List> documents = new ArrayList<>(); - Map doc1 = new HashMap<>(); + Map doc1 = new HashMap<>(); doc1.put("id", "vec1"); doc1.put("my_field", "Apple is a popular fruit known for its sweetness and crisp texture."); documents.add(doc1); - Map doc2 = new HashMap<>(); + Map doc2 = new HashMap<>(); doc2.put("id", "vec2"); doc2.put("my_field", "Many people enjoy eating apples as a healthy snack."); documents.add(doc2); - Map doc3 = new HashMap<>(); + Map doc3 = new HashMap<>(); doc3.put("id", "vec3"); doc3.put("my_field", "Apple Inc. has revolutionized the tech industry with its sleek designs and user-friendly interfaces."); documents.add(doc3); - Map doc4 = new HashMap<>(); + Map doc4 = new HashMap<>(); doc4.put("id", "vec4"); doc4.put("my_field", "An apple a day keeps the doctor away, as the saying goes."); documents.add(doc4); @@ -47,7 +47,7 @@ public void testRerank() throws ApiException { List rankFields = Arrays.asList("my_field"); int topN = 2; boolean returnDocuments = true; - Map parameters = new HashMap<>(); + Map parameters = new HashMap<>(); parameters.put("truncate", "END"); RerankResult result = inference.rerank(model, query, documents, rankFields, topN, returnDocuments, parameters); @@ -63,24 +63,24 @@ public void testRerank() throws ApiException { public void testRerankWithRequiredParameters() throws ApiException { String model = "bge-reranker-v2-m3"; String query = "The tech company Apple is known for its innovative products like the iPhone."; - List> documents = new ArrayList<>(); + List> documents = new ArrayList<>(); - Map doc1 = new HashMap<>(); + Map doc1 = new HashMap<>(); doc1.put("id", "vec1"); doc1.put("text", "Apple is a popular fruit known for its sweetness and crisp texture."); documents.add(doc1); - Map doc2 = new HashMap<>(); + Map doc2 = new HashMap<>(); doc2.put("id", "vec2"); doc2.put("text", "Many people enjoy eating apples as a healthy snack."); documents.add(doc2); - Map doc3 = new HashMap<>(); + Map doc3 = new HashMap<>(); doc3.put("id", "vec3"); doc3.put("text", "Apple Inc. has revolutionized the tech industry with its sleek designs and user-friendly interfaces."); documents.add(doc3); - Map doc4 = new HashMap<>(); + Map doc4 = new HashMap<>(); doc4.put("id", "vec4"); doc4.put("text", "An apple a day keeps the doctor away, as the saying goes."); documents.add(doc4); diff --git a/src/main/java/io/pinecone/clients/Inference.java b/src/main/java/io/pinecone/clients/Inference.java index 14da5f66..ea98ec17 100644 --- a/src/main/java/io/pinecone/clients/Inference.java +++ b/src/main/java/io/pinecone/clients/Inference.java @@ -49,12 +49,12 @@ public Inference(PineconeConfig config) { * @throws ApiException If the API call fails, an ApiException is thrown. */ public EmbeddingsList embed(String model, Map parameters, List inputs) throws ApiException { - EmbedRequestParameters embedRequestParameters = new EmbedRequestParameters(); - parameters.forEach(embedRequestParameters::putAdditionalProperty); +// EmbedRequestParameters embedRequestParameters = new EmbedRequestParameters(); +// parameters.forEach(embedRequestParameters::putAdditionalProperty); EmbedRequest embedRequest = new EmbedRequest() .model(model) - .parameters(embedRequestParameters) + .parameters(parameters) .inputs(convertToEmbedInputs(inputs)); return inferenceApi.embed(embedRequest); @@ -74,7 +74,7 @@ public EmbeddingsList embed(String model, Map parameters, List> documents) throws ApiException { + List> documents) throws ApiException { return rerank(model, query, documents, @@ -100,11 +100,11 @@ public RerankResult rerank(String model, */ public RerankResult rerank(String model, String query, - List> documents, + List> documents, List rankFields, int topN, boolean returnDocuments, - Map parameters) throws ApiException { + Map parameters) throws ApiException { RerankRequest rerankRequest = new RerankRequest(); rerankRequest diff --git a/src/main/java/org/openapitools/db_control/client/ApiCallback.java b/src/main/java/org/openapitools/db_control/client/ApiCallback.java index 710a4ff5..1fbcdb21 100644 --- a/src/main/java/org/openapitools/db_control/client/ApiCallback.java +++ b/src/main/java/org/openapitools/db_control/client/ApiCallback.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/db_control/client/ApiClient.java b/src/main/java/org/openapitools/db_control/client/ApiClient.java index fa75cf16..39477a57 100644 --- a/src/main/java/org/openapitools/db_control/client/ApiClient.java +++ b/src/main/java/org/openapitools/db_control/client/ApiClient.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -140,7 +140,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2024-10/java"); + setUserAgent("OpenAPI-Generator/2025-01/java"); authentications = new HashMap(); } diff --git a/src/main/java/org/openapitools/db_control/client/ApiException.java b/src/main/java/org/openapitools/db_control/client/ApiException.java index 7e43c5ac..6b2aecb9 100644 --- a/src/main/java/org/openapitools/db_control/client/ApiException.java +++ b/src/main/java/org/openapitools/db_control/client/ApiException.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/org/openapitools/db_control/client/ApiResponse.java b/src/main/java/org/openapitools/db_control/client/ApiResponse.java index becef8ad..9dada288 100644 --- a/src/main/java/org/openapitools/db_control/client/ApiResponse.java +++ b/src/main/java/org/openapitools/db_control/client/ApiResponse.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/db_control/client/Configuration.java b/src/main/java/org/openapitools/db_control/client/Configuration.java index e742b5c3..02eeb112 100644 --- a/src/main/java/org/openapitools/db_control/client/Configuration.java +++ b/src/main/java/org/openapitools/db_control/client/Configuration.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,9 +13,9 @@ package org.openapitools.db_control.client; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class Configuration { - public static final String VERSION = "2024-10"; + public static final String VERSION = "2025-01"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/org/openapitools/db_control/client/GzipRequestInterceptor.java b/src/main/java/org/openapitools/db_control/client/GzipRequestInterceptor.java index 888a2cbd..568c6f92 100644 --- a/src/main/java/org/openapitools/db_control/client/GzipRequestInterceptor.java +++ b/src/main/java/org/openapitools/db_control/client/GzipRequestInterceptor.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/db_control/client/JSON.java b/src/main/java/org/openapitools/db_control/client/JSON.java index cb3c1727..4daeab8f 100644 --- a/src/main/java/org/openapitools/db_control/client/JSON.java +++ b/src/main/java/org/openapitools/db_control/client/JSON.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -96,9 +96,12 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_control.client.model.CollectionList.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_control.client.model.CollectionModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_control.client.model.ConfigureIndexRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_control.client.model.ConfigureIndexRequestEmbed.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_control.client.model.ConfigureIndexRequestSpec.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_control.client.model.ConfigureIndexRequestSpecPod.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_control.client.model.CreateCollectionRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_control.client.model.CreateIndexForModelRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_control.client.model.CreateIndexForModelRequestEmbed.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_control.client.model.CreateIndexRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_control.client.model.ErrorResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_control.client.model.ErrorResponseError.CustomTypeAdapterFactory()); @@ -107,6 +110,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_control.client.model.IndexModelSpec.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_control.client.model.IndexModelStatus.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_control.client.model.IndexSpec.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_control.client.model.ModelIndexEmbed.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_control.client.model.PodSpec.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_control.client.model.PodSpecMetadataConfig.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_control.client.model.ServerlessSpec.CustomTypeAdapterFactory()); diff --git a/src/main/java/org/openapitools/db_control/client/Pair.java b/src/main/java/org/openapitools/db_control/client/Pair.java index 8cc5ec2c..86fca965 100644 --- a/src/main/java/org/openapitools/db_control/client/Pair.java +++ b/src/main/java/org/openapitools/db_control/client/Pair.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,7 @@ package org.openapitools.db_control.client; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/org/openapitools/db_control/client/ProgressRequestBody.java b/src/main/java/org/openapitools/db_control/client/ProgressRequestBody.java index 7b1c0703..07002b23 100644 --- a/src/main/java/org/openapitools/db_control/client/ProgressRequestBody.java +++ b/src/main/java/org/openapitools/db_control/client/ProgressRequestBody.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/db_control/client/ProgressResponseBody.java b/src/main/java/org/openapitools/db_control/client/ProgressResponseBody.java index 1dc61234..9e2cb8ab 100644 --- a/src/main/java/org/openapitools/db_control/client/ProgressResponseBody.java +++ b/src/main/java/org/openapitools/db_control/client/ProgressResponseBody.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/db_control/client/StringUtil.java b/src/main/java/org/openapitools/db_control/client/StringUtil.java index bed2d712..2d129fae 100644 --- a/src/main/java/org/openapitools/db_control/client/StringUtil.java +++ b/src/main/java/org/openapitools/db_control/client/StringUtil.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/org/openapitools/db_control/client/api/ManageIndexesApi.java b/src/main/java/org/openapitools/db_control/client/api/ManageIndexesApi.java index 507089c0..75f7b88b 100644 --- a/src/main/java/org/openapitools/db_control/client/api/ManageIndexesApi.java +++ b/src/main/java/org/openapitools/db_control/client/api/ManageIndexesApi.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -31,6 +31,7 @@ import org.openapitools.db_control.client.model.CollectionModel; import org.openapitools.db_control.client.model.ConfigureIndexRequest; import org.openapitools.db_control.client.model.CreateCollectionRequest; +import org.openapitools.db_control.client.model.CreateIndexForModelRequest; import org.openapitools.db_control.client.model.CreateIndexRequest; import org.openapitools.db_control.client.model.ErrorResponse; import org.openapitools.db_control.client.model.IndexList; @@ -163,7 +164,7 @@ private okhttp3.Call configureIndexValidateBeforeCall(String indexName, Configur /** * Configure an index - * This operation configures an existing index. For serverless indexes, you can configure only index deletion protection and tags. For pod-based indexes, you can configure the pod size, number of replicas, tags, and index deletion protection. It is not possible to change the pod type of a pod-based index. However, you can create a collection from a pod-based index and then [create a new pod-based index with a different pod type](http://docs.pinecone.io/guides/indexes/create-an-index#create-an-index-from-a-collection) from the collection. For guidance and examples, see [Configure an index](http://docs.pinecone.io/guides/indexes/configure-an-index). + * This operation configures an existing index. For serverless indexes, you can configure index deletion protection, tags, and integrated inference embedding settings for the index. For pod-based indexes, you can configure the pod size, number of replicas, tags, and index deletion protection. It is not possible to change the pod type of a pod-based index. However, you can create a collection from a pod-based index and then [create a new pod-based index with a different pod type](http://docs.pinecone.io/guides/indexes/pods/create-a-pod-based-index#create-a-pod-index-from-a-collection) from the collection. For guidance and examples, see [Configure an index](http://docs.pinecone.io/guides/indexes/pods/manage-pod-based-indexes). * @param indexName The name of the index to configure. (required) * @param configureIndexRequest The desired pod size and replica configuration for the index. (required) * @return IndexModel @@ -188,7 +189,7 @@ public IndexModel configureIndex(String indexName, ConfigureIndexRequest configu /** * Configure an index - * This operation configures an existing index. For serverless indexes, you can configure only index deletion protection and tags. For pod-based indexes, you can configure the pod size, number of replicas, tags, and index deletion protection. It is not possible to change the pod type of a pod-based index. However, you can create a collection from a pod-based index and then [create a new pod-based index with a different pod type](http://docs.pinecone.io/guides/indexes/create-an-index#create-an-index-from-a-collection) from the collection. For guidance and examples, see [Configure an index](http://docs.pinecone.io/guides/indexes/configure-an-index). + * This operation configures an existing index. For serverless indexes, you can configure index deletion protection, tags, and integrated inference embedding settings for the index. For pod-based indexes, you can configure the pod size, number of replicas, tags, and index deletion protection. It is not possible to change the pod type of a pod-based index. However, you can create a collection from a pod-based index and then [create a new pod-based index with a different pod type](http://docs.pinecone.io/guides/indexes/pods/create-a-pod-based-index#create-a-pod-index-from-a-collection) from the collection. For guidance and examples, see [Configure an index](http://docs.pinecone.io/guides/indexes/pods/manage-pod-based-indexes). * @param indexName The name of the index to configure. (required) * @param configureIndexRequest The desired pod size and replica configuration for the index. (required) * @return ApiResponse<IndexModel> @@ -214,7 +215,7 @@ public ApiResponse configureIndexWithHttpInfo(String indexName, Conf /** * Configure an index (asynchronously) - * This operation configures an existing index. For serverless indexes, you can configure only index deletion protection and tags. For pod-based indexes, you can configure the pod size, number of replicas, tags, and index deletion protection. It is not possible to change the pod type of a pod-based index. However, you can create a collection from a pod-based index and then [create a new pod-based index with a different pod type](http://docs.pinecone.io/guides/indexes/create-an-index#create-an-index-from-a-collection) from the collection. For guidance and examples, see [Configure an index](http://docs.pinecone.io/guides/indexes/configure-an-index). + * This operation configures an existing index. For serverless indexes, you can configure index deletion protection, tags, and integrated inference embedding settings for the index. For pod-based indexes, you can configure the pod size, number of replicas, tags, and index deletion protection. It is not possible to change the pod type of a pod-based index. However, you can create a collection from a pod-based index and then [create a new pod-based index with a different pod type](http://docs.pinecone.io/guides/indexes/pods/create-a-pod-based-index#create-a-pod-index-from-a-collection) from the collection. For guidance and examples, see [Configure an index](http://docs.pinecone.io/guides/indexes/pods/manage-pod-based-indexes). * @param indexName The name of the index to configure. (required) * @param configureIndexRequest The desired pod size and replica configuration for the index. (required) * @param _callback The callback to be executed when the API call finishes @@ -469,7 +470,7 @@ private okhttp3.Call createIndexValidateBeforeCall(CreateIndexRequest createInde /** * Create an index - * This operation deploys a Pinecone index. This is where you specify the measure of similarity, the dimension of vectors to be stored in the index, which cloud provider you would like to deploy with, and more. For guidance and examples, see [Create an index](https://docs.pinecone.io/guides/indexes/create-an-index#create-a-serverless-index). + * This operation deploys a Pinecone index. This is where you specify the measure of similarity, the dimension of vectors to be stored in the index, which cloud provider you would like to deploy with, and more. For guidance and examples, see [Create an index](https://docs.pinecone.io/guides/indexes/create-an-index#create-a-serverless-index). * @param createIndexRequest The desired configuration for the index. (required) * @return IndexModel * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -494,7 +495,7 @@ public IndexModel createIndex(CreateIndexRequest createIndexRequest) throws ApiE /** * Create an index - * This operation deploys a Pinecone index. This is where you specify the measure of similarity, the dimension of vectors to be stored in the index, which cloud provider you would like to deploy with, and more. For guidance and examples, see [Create an index](https://docs.pinecone.io/guides/indexes/create-an-index#create-a-serverless-index). + * This operation deploys a Pinecone index. This is where you specify the measure of similarity, the dimension of vectors to be stored in the index, which cloud provider you would like to deploy with, and more. For guidance and examples, see [Create an index](https://docs.pinecone.io/guides/indexes/create-an-index#create-a-serverless-index). * @param createIndexRequest The desired configuration for the index. (required) * @return ApiResponse<IndexModel> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -520,7 +521,7 @@ public ApiResponse createIndexWithHttpInfo(CreateIndexRequest create /** * Create an index (asynchronously) - * This operation deploys a Pinecone index. This is where you specify the measure of similarity, the dimension of vectors to be stored in the index, which cloud provider you would like to deploy with, and more. For guidance and examples, see [Create an index](https://docs.pinecone.io/guides/indexes/create-an-index#create-a-serverless-index). + * This operation deploys a Pinecone index. This is where you specify the measure of similarity, the dimension of vectors to be stored in the index, which cloud provider you would like to deploy with, and more. For guidance and examples, see [Create an index](https://docs.pinecone.io/guides/indexes/create-an-index#create-a-serverless-index). * @param createIndexRequest The desired configuration for the index. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -546,6 +547,153 @@ public okhttp3.Call createIndexAsync(CreateIndexRequest createIndexRequest, fina localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for createIndexForModel + * @param createIndexForModelRequest The desired configuration for the index and associated embedding model. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Status Code Description Response Headers
201 The index has successfully been created for the embedding model. -
400 Bad request. The request body included invalid request parameters. -
401 Unauthorized. Possible causes: Invalid API key. -
404 Unknown cloud or region when creating a serverless index. -
409 Index of given name already exists. -
422 Unprocessable entity. The request body could not be deserialized. -
500 Internal server error. -
+ */ + public okhttp3.Call createIndexForModelCall(CreateIndexForModelRequest createIndexForModelRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createIndexForModelRequest; + + // create path and map variables + String localVarPath = "/indexes/create-for-model"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createIndexForModelValidateBeforeCall(CreateIndexForModelRequest createIndexForModelRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createIndexForModelRequest' is set + if (createIndexForModelRequest == null) { + throw new ApiException("Missing the required parameter 'createIndexForModelRequest' when calling createIndexForModel(Async)"); + } + + return createIndexForModelCall(createIndexForModelRequest, _callback); + + } + + /** + * Create an index for an embedding model + * This operation creates a serverless integrated inference index for a specific embedding model. Refer to the [model guide](https://docs.pinecone.io/guides/inference/understanding-inference#embedding-models) for available models and model details. + * @param createIndexForModelRequest The desired configuration for the index and associated embedding model. (required) + * @return IndexModel + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Status Code Description Response Headers
201 The index has successfully been created for the embedding model. -
400 Bad request. The request body included invalid request parameters. -
401 Unauthorized. Possible causes: Invalid API key. -
404 Unknown cloud or region when creating a serverless index. -
409 Index of given name already exists. -
422 Unprocessable entity. The request body could not be deserialized. -
500 Internal server error. -
+ */ + public IndexModel createIndexForModel(CreateIndexForModelRequest createIndexForModelRequest) throws ApiException { + ApiResponse localVarResp = createIndexForModelWithHttpInfo(createIndexForModelRequest); + return localVarResp.getData(); + } + + /** + * Create an index for an embedding model + * This operation creates a serverless integrated inference index for a specific embedding model. Refer to the [model guide](https://docs.pinecone.io/guides/inference/understanding-inference#embedding-models) for available models and model details. + * @param createIndexForModelRequest The desired configuration for the index and associated embedding model. (required) + * @return ApiResponse<IndexModel> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Status Code Description Response Headers
201 The index has successfully been created for the embedding model. -
400 Bad request. The request body included invalid request parameters. -
401 Unauthorized. Possible causes: Invalid API key. -
404 Unknown cloud or region when creating a serverless index. -
409 Index of given name already exists. -
422 Unprocessable entity. The request body could not be deserialized. -
500 Internal server error. -
+ */ + public ApiResponse createIndexForModelWithHttpInfo(CreateIndexForModelRequest createIndexForModelRequest) throws ApiException { + okhttp3.Call localVarCall = createIndexForModelValidateBeforeCall(createIndexForModelRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create an index for an embedding model (asynchronously) + * This operation creates a serverless integrated inference index for a specific embedding model. Refer to the [model guide](https://docs.pinecone.io/guides/inference/understanding-inference#embedding-models) for available models and model details. + * @param createIndexForModelRequest The desired configuration for the index and associated embedding model. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Status Code Description Response Headers
201 The index has successfully been created for the embedding model. -
400 Bad request. The request body included invalid request parameters. -
401 Unauthorized. Possible causes: Invalid API key. -
404 Unknown cloud or region when creating a serverless index. -
409 Index of given name already exists. -
422 Unprocessable entity. The request body could not be deserialized. -
500 Internal server error. -
+ */ + public okhttp3.Call createIndexForModelAsync(CreateIndexForModelRequest createIndexForModelRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createIndexForModelValidateBeforeCall(createIndexForModelRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for deleteCollection * @param collectionName The name of the collection. (required) diff --git a/src/main/java/org/openapitools/db_control/client/auth/ApiKeyAuth.java b/src/main/java/org/openapitools/db_control/client/auth/ApiKeyAuth.java index 27eee2da..05644cf9 100644 --- a/src/main/java/org/openapitools/db_control/client/auth/ApiKeyAuth.java +++ b/src/main/java/org/openapitools/db_control/client/auth/ApiKeyAuth.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/org/openapitools/db_control/client/auth/Authentication.java b/src/main/java/org/openapitools/db_control/client/auth/Authentication.java index 26f0f01b..38161489 100644 --- a/src/main/java/org/openapitools/db_control/client/auth/Authentication.java +++ b/src/main/java/org/openapitools/db_control/client/auth/Authentication.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/db_control/client/auth/HttpBasicAuth.java b/src/main/java/org/openapitools/db_control/client/auth/HttpBasicAuth.java index 73b459ad..26ad3637 100644 --- a/src/main/java/org/openapitools/db_control/client/auth/HttpBasicAuth.java +++ b/src/main/java/org/openapitools/db_control/client/auth/HttpBasicAuth.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/db_control/client/auth/HttpBearerAuth.java b/src/main/java/org/openapitools/db_control/client/auth/HttpBearerAuth.java index 5f6e021a..9a3fbef8 100644 --- a/src/main/java/org/openapitools/db_control/client/auth/HttpBearerAuth.java +++ b/src/main/java/org/openapitools/db_control/client/auth/HttpBearerAuth.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private String bearerToken; diff --git a/src/main/java/org/openapitools/db_control/client/model/AbstractOpenApiSchema.java b/src/main/java/org/openapitools/db_control/client/model/AbstractOpenApiSchema.java index df16d288..854b1fde 100644 --- a/src/main/java/org/openapitools/db_control/client/model/AbstractOpenApiSchema.java +++ b/src/main/java/org/openapitools/db_control/client/model/AbstractOpenApiSchema.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,7 +23,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/org/openapitools/db_control/client/model/CollectionList.java b/src/main/java/org/openapitools/db_control/client/model/CollectionList.java index 8d523b91..0b8e2062 100644 --- a/src/main/java/org/openapitools/db_control/client/model/CollectionList.java +++ b/src/main/java/org/openapitools/db_control/client/model/CollectionList.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -52,7 +52,7 @@ /** * The list of collections that exist in the project. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class CollectionList { public static final String SERIALIZED_NAME_COLLECTIONS = "collections"; @SerializedName(SERIALIZED_NAME_COLLECTIONS) diff --git a/src/main/java/org/openapitools/db_control/client/model/CollectionModel.java b/src/main/java/org/openapitools/db_control/client/model/CollectionModel.java index a1a9bd4d..d70cf62a 100644 --- a/src/main/java/org/openapitools/db_control/client/model/CollectionModel.java +++ b/src/main/java/org/openapitools/db_control/client/model/CollectionModel.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,7 +49,7 @@ /** * The CollectionModel describes the configuration and status of a Pinecone collection. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class CollectionModel { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/org/openapitools/db_control/client/model/ConfigureIndexRequest.java b/src/main/java/org/openapitools/db_control/client/model/ConfigureIndexRequest.java index 49935fd8..7c992897 100644 --- a/src/main/java/org/openapitools/db_control/client/model/ConfigureIndexRequest.java +++ b/src/main/java/org/openapitools/db_control/client/model/ConfigureIndexRequest.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,9 +23,9 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; +import org.openapitools.db_control.client.model.ConfigureIndexRequestEmbed; import org.openapitools.db_control.client.model.ConfigureIndexRequestSpec; import org.openapitools.db_control.client.model.DeletionProtection; -import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -54,7 +54,7 @@ /** * Configuration used to scale an index. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class ConfigureIndexRequest { public static final String SERIALIZED_NAME_SPEC = "spec"; @SerializedName(SERIALIZED_NAME_SPEC) @@ -66,7 +66,11 @@ public class ConfigureIndexRequest { public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private Map tags; + private Map tags = new HashMap<>(); + + public static final String SERIALIZED_NAME_EMBED = "embed"; + @SerializedName(SERIALIZED_NAME_EMBED) + private ConfigureIndexRequestEmbed embed; public ConfigureIndexRequest() { } @@ -128,7 +132,7 @@ public ConfigureIndexRequest putTagsItem(String key, String tagsItem) { } /** - * Custom user tags added to an index. Keys must be alphanumeric and 80 characters or less. Values must be 120 characters or less. + * Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '_', or '-'. Values must be alphanumeric, ';', '@', '_', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string. * @return tags **/ @javax.annotation.Nullable @@ -141,6 +145,27 @@ public void setTags(Map tags) { this.tags = tags; } + + public ConfigureIndexRequest embed(ConfigureIndexRequestEmbed embed) { + + this.embed = embed; + return this; + } + + /** + * Get embed + * @return embed + **/ + @javax.annotation.Nullable + public ConfigureIndexRequestEmbed getEmbed() { + return embed; + } + + + public void setEmbed(ConfigureIndexRequestEmbed embed) { + this.embed = embed; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -198,24 +223,14 @@ public boolean equals(Object o) { ConfigureIndexRequest configureIndexRequest = (ConfigureIndexRequest) o; return Objects.equals(this.spec, configureIndexRequest.spec) && Objects.equals(this.deletionProtection, configureIndexRequest.deletionProtection) && - Objects.equals(this.tags, configureIndexRequest.tags)&& + Objects.equals(this.tags, configureIndexRequest.tags) && + Objects.equals(this.embed, configureIndexRequest.embed)&& Objects.equals(this.additionalProperties, configureIndexRequest.additionalProperties); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { - return Objects.hash(spec, deletionProtection, tags, additionalProperties); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(spec, deletionProtection, tags, embed, additionalProperties); } @Override @@ -225,6 +240,7 @@ public String toString() { sb.append(" spec: ").append(toIndentedString(spec)).append("\n"); sb.append(" deletionProtection: ").append(toIndentedString(deletionProtection)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" embed: ").append(toIndentedString(embed)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -251,6 +267,7 @@ private String toIndentedString(Object o) { openapiFields.add("spec"); openapiFields.add("deletion_protection"); openapiFields.add("tags"); + openapiFields.add("embed"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -273,6 +290,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { ConfigureIndexRequestSpec.validateJsonElement(jsonObj.get("spec")); } + // validate the optional field `embed` + if (jsonObj.get("embed") != null && !jsonObj.get("embed").isJsonNull()) { + ConfigureIndexRequestEmbed.validateJsonElement(jsonObj.get("embed")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/org/openapitools/db_control/client/model/ConfigureIndexRequestEmbed.java b/src/main/java/org/openapitools/db_control/client/model/ConfigureIndexRequestEmbed.java new file mode 100644 index 00000000..e7c86410 --- /dev/null +++ b/src/main/java/org/openapitools/db_control/client/model/ConfigureIndexRequestEmbed.java @@ -0,0 +1,368 @@ +/* + * Pinecone Control Plane API + * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. + * + * The version of the OpenAPI document: 2025-01 + * Contact: support@pinecone.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.db_control.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.db_control.client.JSON; + +/** + * Configure the integrated inference embedding settings for this index. You can convert an existing index to an integrated index by specifying the embedding model and field_map. The index vector type and dimension must match the model vector type and dimension, and the index similarity metric must be supported by the model. Refer to the [model guide](https://docs.pinecone.io/guides/inference/understanding-inference#embedding-models) for available models and model details. You can later change the embedding configuration to update the field map, read parameters, or write parameters. Once set, the model cannot be changed. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") +public class ConfigureIndexRequestEmbed { + public static final String SERIALIZED_NAME_MODEL = "model"; + @SerializedName(SERIALIZED_NAME_MODEL) + private String model; + + public static final String SERIALIZED_NAME_FIELD_MAP = "field_map"; + @SerializedName(SERIALIZED_NAME_FIELD_MAP) + private Object fieldMap; + + public static final String SERIALIZED_NAME_READ_PARAMETERS = "read_parameters"; + @SerializedName(SERIALIZED_NAME_READ_PARAMETERS) + private Object readParameters; + + public static final String SERIALIZED_NAME_WRITE_PARAMETERS = "write_parameters"; + @SerializedName(SERIALIZED_NAME_WRITE_PARAMETERS) + private Object writeParameters; + + public ConfigureIndexRequestEmbed() { + } + + public ConfigureIndexRequestEmbed model(String model) { + + this.model = model; + return this; + } + + /** + * The name of the embedding model to use with the index. The index dimension and model dimension must match, and the index similarity metric must be supported by the model. The index embedding model cannot be changed once set. + * @return model + **/ + @javax.annotation.Nullable + public String getModel() { + return model; + } + + + public void setModel(String model) { + this.model = model; + } + + + public ConfigureIndexRequestEmbed fieldMap(Object fieldMap) { + + this.fieldMap = fieldMap; + return this; + } + + /** + * Identifies the name of the text field from your document model that will be embedded. + * @return fieldMap + **/ + @javax.annotation.Nullable + public Object getFieldMap() { + return fieldMap; + } + + + public void setFieldMap(Object fieldMap) { + this.fieldMap = fieldMap; + } + + + public ConfigureIndexRequestEmbed readParameters(Object readParameters) { + + this.readParameters = readParameters; + return this; + } + + /** + * The read parameters for the embedding model. + * @return readParameters + **/ + @javax.annotation.Nullable + public Object getReadParameters() { + return readParameters; + } + + + public void setReadParameters(Object readParameters) { + this.readParameters = readParameters; + } + + + public ConfigureIndexRequestEmbed writeParameters(Object writeParameters) { + + this.writeParameters = writeParameters; + return this; + } + + /** + * The write parameters for the embedding model. + * @return writeParameters + **/ + @javax.annotation.Nullable + public Object getWriteParameters() { + return writeParameters; + } + + + public void setWriteParameters(Object writeParameters) { + this.writeParameters = writeParameters; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ConfigureIndexRequestEmbed instance itself + */ + public ConfigureIndexRequestEmbed putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConfigureIndexRequestEmbed configureIndexRequestEmbed = (ConfigureIndexRequestEmbed) o; + return Objects.equals(this.model, configureIndexRequestEmbed.model) && + Objects.equals(this.fieldMap, configureIndexRequestEmbed.fieldMap) && + Objects.equals(this.readParameters, configureIndexRequestEmbed.readParameters) && + Objects.equals(this.writeParameters, configureIndexRequestEmbed.writeParameters)&& + Objects.equals(this.additionalProperties, configureIndexRequestEmbed.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(model, fieldMap, readParameters, writeParameters, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConfigureIndexRequestEmbed {\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" fieldMap: ").append(toIndentedString(fieldMap)).append("\n"); + sb.append(" readParameters: ").append(toIndentedString(readParameters)).append("\n"); + sb.append(" writeParameters: ").append(toIndentedString(writeParameters)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("model"); + openapiFields.add("field_map"); + openapiFields.add("read_parameters"); + openapiFields.add("write_parameters"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ConfigureIndexRequestEmbed + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConfigureIndexRequestEmbed.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ConfigureIndexRequestEmbed is not found in the empty JSON string", ConfigureIndexRequestEmbed.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("model") != null && !jsonObj.get("model").isJsonNull()) && !jsonObj.get("model").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `model` to be a primitive type in the JSON string but got `%s`", jsonObj.get("model").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ConfigureIndexRequestEmbed.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ConfigureIndexRequestEmbed' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ConfigureIndexRequestEmbed.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ConfigureIndexRequestEmbed value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ConfigureIndexRequestEmbed read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ConfigureIndexRequestEmbed instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ConfigureIndexRequestEmbed given an JSON string + * + * @param jsonString JSON string + * @return An instance of ConfigureIndexRequestEmbed + * @throws IOException if the JSON string is invalid with respect to ConfigureIndexRequestEmbed + */ + public static ConfigureIndexRequestEmbed fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ConfigureIndexRequestEmbed.class); + } + + /** + * Convert an instance of ConfigureIndexRequestEmbed to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/db_control/client/model/ConfigureIndexRequestSpec.java b/src/main/java/org/openapitools/db_control/client/model/ConfigureIndexRequestSpec.java index 37fa0fa1..8e6cc681 100644 --- a/src/main/java/org/openapitools/db_control/client/model/ConfigureIndexRequestSpec.java +++ b/src/main/java/org/openapitools/db_control/client/model/ConfigureIndexRequestSpec.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -50,7 +50,7 @@ /** * ConfigureIndexRequestSpec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class ConfigureIndexRequestSpec { public static final String SERIALIZED_NAME_POD = "pod"; @SerializedName(SERIALIZED_NAME_POD) diff --git a/src/main/java/org/openapitools/db_control/client/model/ConfigureIndexRequestSpecPod.java b/src/main/java/org/openapitools/db_control/client/model/ConfigureIndexRequestSpecPod.java index 26a00dd4..c4f054a7 100644 --- a/src/main/java/org/openapitools/db_control/client/model/ConfigureIndexRequestSpecPod.java +++ b/src/main/java/org/openapitools/db_control/client/model/ConfigureIndexRequestSpecPod.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,7 +49,7 @@ /** * ConfigureIndexRequestSpecPod */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class ConfigureIndexRequestSpecPod { public static final String SERIALIZED_NAME_REPLICAS = "replicas"; @SerializedName(SERIALIZED_NAME_REPLICAS) diff --git a/src/main/java/org/openapitools/db_control/client/model/CreateCollectionRequest.java b/src/main/java/org/openapitools/db_control/client/model/CreateCollectionRequest.java index 62f36c4f..df9c320b 100644 --- a/src/main/java/org/openapitools/db_control/client/model/CreateCollectionRequest.java +++ b/src/main/java/org/openapitools/db_control/client/model/CreateCollectionRequest.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,7 +49,7 @@ /** * The configuration needed to create a Pinecone collection. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class CreateCollectionRequest { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/org/openapitools/db_control/client/model/CreateIndexForModelRequest.java b/src/main/java/org/openapitools/db_control/client/model/CreateIndexForModelRequest.java new file mode 100644 index 00000000..f8a0ef51 --- /dev/null +++ b/src/main/java/org/openapitools/db_control/client/model/CreateIndexForModelRequest.java @@ -0,0 +1,504 @@ +/* + * Pinecone Control Plane API + * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. + * + * The version of the OpenAPI document: 2025-01 + * Contact: support@pinecone.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.db_control.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.db_control.client.model.CreateIndexForModelRequestEmbed; +import org.openapitools.db_control.client.model.DeletionProtection; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.db_control.client.JSON; + +/** + * The desired configuration for the index and associated embedding model. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") +public class CreateIndexForModelRequest { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + /** + * The public cloud where you would like your index hosted. + */ + @JsonAdapter(CloudEnum.Adapter.class) + public enum CloudEnum { + GCP("gcp"), + + AWS("aws"), + + AZURE("azure"); + + private String value; + + CloudEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CloudEnum fromValue(String value) { + for (CloudEnum b : CloudEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final CloudEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CloudEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CloudEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_CLOUD = "cloud"; + @SerializedName(SERIALIZED_NAME_CLOUD) + private CloudEnum cloud; + + public static final String SERIALIZED_NAME_REGION = "region"; + @SerializedName(SERIALIZED_NAME_REGION) + private String region; + + public static final String SERIALIZED_NAME_DELETION_PROTECTION = "deletion_protection"; + @SerializedName(SERIALIZED_NAME_DELETION_PROTECTION) + private DeletionProtection deletionProtection = DeletionProtection.DISABLED; + + public static final String SERIALIZED_NAME_TAGS = "tags"; + @SerializedName(SERIALIZED_NAME_TAGS) + private Map tags = new HashMap<>(); + + public static final String SERIALIZED_NAME_EMBED = "embed"; + @SerializedName(SERIALIZED_NAME_EMBED) + private CreateIndexForModelRequestEmbed embed; + + public CreateIndexForModelRequest() { + } + + public CreateIndexForModelRequest name(String name) { + + this.name = name; + return this; + } + + /** + * The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. + * @return name + **/ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public CreateIndexForModelRequest cloud(CloudEnum cloud) { + + this.cloud = cloud; + return this; + } + + /** + * The public cloud where you would like your index hosted. + * @return cloud + **/ + @javax.annotation.Nonnull + public CloudEnum getCloud() { + return cloud; + } + + + public void setCloud(CloudEnum cloud) { + this.cloud = cloud; + } + + + public CreateIndexForModelRequest region(String region) { + + this.region = region; + return this; + } + + /** + * The region where you would like your index to be created. + * @return region + **/ + @javax.annotation.Nonnull + public String getRegion() { + return region; + } + + + public void setRegion(String region) { + this.region = region; + } + + + public CreateIndexForModelRequest deletionProtection(DeletionProtection deletionProtection) { + + this.deletionProtection = deletionProtection; + return this; + } + + /** + * Get deletionProtection + * @return deletionProtection + **/ + @javax.annotation.Nullable + public DeletionProtection getDeletionProtection() { + return deletionProtection; + } + + + public void setDeletionProtection(DeletionProtection deletionProtection) { + this.deletionProtection = deletionProtection; + } + + + public CreateIndexForModelRequest tags(Map tags) { + + this.tags = tags; + return this; + } + + public CreateIndexForModelRequest putTagsItem(String key, String tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '_', or '-'. Values must be alphanumeric, ';', '@', '_', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string. + * @return tags + **/ + @javax.annotation.Nullable + public Map getTags() { + return tags; + } + + + public void setTags(Map tags) { + this.tags = tags; + } + + + public CreateIndexForModelRequest embed(CreateIndexForModelRequestEmbed embed) { + + this.embed = embed; + return this; + } + + /** + * Get embed + * @return embed + **/ + @javax.annotation.Nonnull + public CreateIndexForModelRequestEmbed getEmbed() { + return embed; + } + + + public void setEmbed(CreateIndexForModelRequestEmbed embed) { + this.embed = embed; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateIndexForModelRequest instance itself + */ + public CreateIndexForModelRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateIndexForModelRequest createIndexForModelRequest = (CreateIndexForModelRequest) o; + return Objects.equals(this.name, createIndexForModelRequest.name) && + Objects.equals(this.cloud, createIndexForModelRequest.cloud) && + Objects.equals(this.region, createIndexForModelRequest.region) && + Objects.equals(this.deletionProtection, createIndexForModelRequest.deletionProtection) && + Objects.equals(this.tags, createIndexForModelRequest.tags) && + Objects.equals(this.embed, createIndexForModelRequest.embed)&& + Objects.equals(this.additionalProperties, createIndexForModelRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, cloud, region, deletionProtection, tags, embed, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateIndexForModelRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" cloud: ").append(toIndentedString(cloud)).append("\n"); + sb.append(" region: ").append(toIndentedString(region)).append("\n"); + sb.append(" deletionProtection: ").append(toIndentedString(deletionProtection)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" embed: ").append(toIndentedString(embed)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("cloud"); + openapiFields.add("region"); + openapiFields.add("deletion_protection"); + openapiFields.add("tags"); + openapiFields.add("embed"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("cloud"); + openapiRequiredFields.add("region"); + openapiRequiredFields.add("embed"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateIndexForModelRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateIndexForModelRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateIndexForModelRequest is not found in the empty JSON string", CreateIndexForModelRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateIndexForModelRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("cloud").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cloud` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cloud").toString())); + } + if (!jsonObj.get("region").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `region` to be a primitive type in the JSON string but got `%s`", jsonObj.get("region").toString())); + } + // validate the required field `embed` + CreateIndexForModelRequestEmbed.validateJsonElement(jsonObj.get("embed")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateIndexForModelRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateIndexForModelRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateIndexForModelRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateIndexForModelRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateIndexForModelRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateIndexForModelRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateIndexForModelRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateIndexForModelRequest + * @throws IOException if the JSON string is invalid with respect to CreateIndexForModelRequest + */ + public static CreateIndexForModelRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateIndexForModelRequest.class); + } + + /** + * Convert an instance of CreateIndexForModelRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/db_control/client/model/CreateIndexForModelRequestEmbed.java b/src/main/java/org/openapitools/db_control/client/model/CreateIndexForModelRequestEmbed.java new file mode 100644 index 00000000..5e13b2ad --- /dev/null +++ b/src/main/java/org/openapitools/db_control/client/model/CreateIndexForModelRequestEmbed.java @@ -0,0 +1,457 @@ +/* + * Pinecone Control Plane API + * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. + * + * The version of the OpenAPI document: 2025-01 + * Contact: support@pinecone.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.db_control.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.db_control.client.JSON; + +/** + * Specify the integrated inference embedding configuration for the index. Once set the model cannot be changed, but you can later update the embedding configuration for an integrated inference index including field map, read parameters, or write parameters. Refer to the [model guide](https://docs.pinecone.io/guides/inference/understanding-inference#embedding-models) for available models and model details. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") +public class CreateIndexForModelRequestEmbed { + public static final String SERIALIZED_NAME_MODEL = "model"; + @SerializedName(SERIALIZED_NAME_MODEL) + private String model; + + /** + * The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If not specified, the metric will be defaulted according to the model. Cannot be updated once set. + */ + @JsonAdapter(MetricEnum.Adapter.class) + public enum MetricEnum { + COSINE("cosine"), + + EUCLIDEAN("euclidean"), + + DOTPRODUCT("dotproduct"); + + private String value; + + MetricEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MetricEnum fromValue(String value) { + for (MetricEnum b : MetricEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetricEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetricEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetricEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_METRIC = "metric"; + @SerializedName(SERIALIZED_NAME_METRIC) + private MetricEnum metric; + + public static final String SERIALIZED_NAME_FIELD_MAP = "field_map"; + @SerializedName(SERIALIZED_NAME_FIELD_MAP) + private Object fieldMap; + + public static final String SERIALIZED_NAME_READ_PARAMETERS = "read_parameters"; + @SerializedName(SERIALIZED_NAME_READ_PARAMETERS) + private Object readParameters; + + public static final String SERIALIZED_NAME_WRITE_PARAMETERS = "write_parameters"; + @SerializedName(SERIALIZED_NAME_WRITE_PARAMETERS) + private Object writeParameters; + + public CreateIndexForModelRequestEmbed() { + } + + public CreateIndexForModelRequestEmbed model(String model) { + + this.model = model; + return this; + } + + /** + * The name of the embedding model to use for the index. + * @return model + **/ + @javax.annotation.Nonnull + public String getModel() { + return model; + } + + + public void setModel(String model) { + this.model = model; + } + + + public CreateIndexForModelRequestEmbed metric(MetricEnum metric) { + + this.metric = metric; + return this; + } + + /** + * The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If not specified, the metric will be defaulted according to the model. Cannot be updated once set. + * @return metric + **/ + @javax.annotation.Nullable + public MetricEnum getMetric() { + return metric; + } + + + public void setMetric(MetricEnum metric) { + this.metric = metric; + } + + + public CreateIndexForModelRequestEmbed fieldMap(Object fieldMap) { + + this.fieldMap = fieldMap; + return this; + } + + /** + * Identifies the name of the text field from your document model that will be embedded. + * @return fieldMap + **/ + @javax.annotation.Nonnull + public Object getFieldMap() { + return fieldMap; + } + + + public void setFieldMap(Object fieldMap) { + this.fieldMap = fieldMap; + } + + + public CreateIndexForModelRequestEmbed readParameters(Object readParameters) { + + this.readParameters = readParameters; + return this; + } + + /** + * The read parameters for the embedding model. + * @return readParameters + **/ + @javax.annotation.Nullable + public Object getReadParameters() { + return readParameters; + } + + + public void setReadParameters(Object readParameters) { + this.readParameters = readParameters; + } + + + public CreateIndexForModelRequestEmbed writeParameters(Object writeParameters) { + + this.writeParameters = writeParameters; + return this; + } + + /** + * The write parameters for the embedding model. + * @return writeParameters + **/ + @javax.annotation.Nullable + public Object getWriteParameters() { + return writeParameters; + } + + + public void setWriteParameters(Object writeParameters) { + this.writeParameters = writeParameters; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateIndexForModelRequestEmbed instance itself + */ + public CreateIndexForModelRequestEmbed putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateIndexForModelRequestEmbed createIndexForModelRequestEmbed = (CreateIndexForModelRequestEmbed) o; + return Objects.equals(this.model, createIndexForModelRequestEmbed.model) && + Objects.equals(this.metric, createIndexForModelRequestEmbed.metric) && + Objects.equals(this.fieldMap, createIndexForModelRequestEmbed.fieldMap) && + Objects.equals(this.readParameters, createIndexForModelRequestEmbed.readParameters) && + Objects.equals(this.writeParameters, createIndexForModelRequestEmbed.writeParameters)&& + Objects.equals(this.additionalProperties, createIndexForModelRequestEmbed.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(model, metric, fieldMap, readParameters, writeParameters, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateIndexForModelRequestEmbed {\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" metric: ").append(toIndentedString(metric)).append("\n"); + sb.append(" fieldMap: ").append(toIndentedString(fieldMap)).append("\n"); + sb.append(" readParameters: ").append(toIndentedString(readParameters)).append("\n"); + sb.append(" writeParameters: ").append(toIndentedString(writeParameters)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("model"); + openapiFields.add("metric"); + openapiFields.add("field_map"); + openapiFields.add("read_parameters"); + openapiFields.add("write_parameters"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("model"); + openapiRequiredFields.add("field_map"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateIndexForModelRequestEmbed + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateIndexForModelRequestEmbed.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateIndexForModelRequestEmbed is not found in the empty JSON string", CreateIndexForModelRequestEmbed.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateIndexForModelRequestEmbed.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("model").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `model` to be a primitive type in the JSON string but got `%s`", jsonObj.get("model").toString())); + } + if ((jsonObj.get("metric") != null && !jsonObj.get("metric").isJsonNull()) && !jsonObj.get("metric").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metric` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metric").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateIndexForModelRequestEmbed.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateIndexForModelRequestEmbed' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateIndexForModelRequestEmbed.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateIndexForModelRequestEmbed value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateIndexForModelRequestEmbed read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateIndexForModelRequestEmbed instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateIndexForModelRequestEmbed given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateIndexForModelRequestEmbed + * @throws IOException if the JSON string is invalid with respect to CreateIndexForModelRequestEmbed + */ + public static CreateIndexForModelRequestEmbed fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateIndexForModelRequestEmbed.class); + } + + /** + * Convert an instance of CreateIndexForModelRequestEmbed to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/db_control/client/model/CreateIndexRequest.java b/src/main/java/org/openapitools/db_control/client/model/CreateIndexRequest.java index 91ce1b07..64e209d4 100644 --- a/src/main/java/org/openapitools/db_control/client/model/CreateIndexRequest.java +++ b/src/main/java/org/openapitools/db_control/client/model/CreateIndexRequest.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,7 +25,6 @@ import java.util.Map; import org.openapitools.db_control.client.model.DeletionProtection; import org.openapitools.db_control.client.model.IndexSpec; -import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -54,7 +53,7 @@ /** * The configuration needed to create a Pinecone index. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class CreateIndexRequest { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -65,7 +64,7 @@ public class CreateIndexRequest { private Integer dimension; /** - * The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. + * The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If the 'vector_type' is 'sparse', the metric must be 'dotproduct'. If the `vector_type` is `dense`, the metric defaults to 'cosine'. */ @JsonAdapter(MetricEnum.Adapter.class) public enum MetricEnum { @@ -115,7 +114,7 @@ public MetricEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_METRIC = "metric"; @SerializedName(SERIALIZED_NAME_METRIC) - private MetricEnum metric = MetricEnum.COSINE; + private MetricEnum metric; public static final String SERIALIZED_NAME_DELETION_PROTECTION = "deletion_protection"; @SerializedName(SERIALIZED_NAME_DELETION_PROTECTION) @@ -123,12 +122,16 @@ public MetricEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private Map tags; + private Map tags = new HashMap<>(); public static final String SERIALIZED_NAME_SPEC = "spec"; @SerializedName(SERIALIZED_NAME_SPEC) private IndexSpec spec; + public static final String SERIALIZED_NAME_VECTOR_TYPE = "vector_type"; + @SerializedName(SERIALIZED_NAME_VECTOR_TYPE) + private String vectorType = "dense"; + public CreateIndexRequest() { } @@ -165,7 +168,7 @@ public CreateIndexRequest dimension(Integer dimension) { * maximum: 20000 * @return dimension **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getDimension() { return dimension; } @@ -183,7 +186,7 @@ public CreateIndexRequest metric(MetricEnum metric) { } /** - * The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. + * The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If the 'vector_type' is 'sparse', the metric must be 'dotproduct'. If the `vector_type` is `dense`, the metric defaults to 'cosine'. * @return metric **/ @javax.annotation.Nullable @@ -233,7 +236,7 @@ public CreateIndexRequest putTagsItem(String key, String tagsItem) { } /** - * Custom user tags added to an index. Keys must be alphanumeric and 80 characters or less. Values must be 120 characters or less. + * Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '_', or '-'. Values must be alphanumeric, ';', '@', '_', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string. * @return tags **/ @javax.annotation.Nullable @@ -267,6 +270,27 @@ public void setSpec(IndexSpec spec) { this.spec = spec; } + + public CreateIndexRequest vectorType(String vectorType) { + + this.vectorType = vectorType; + return this; + } + + /** + * The index vector type. You can use 'dense' or 'sparse'. If 'dense', the vector dimension must be specified. If 'sparse', the vector dimension should not be specified. + * @return vectorType + **/ + @javax.annotation.Nullable + public String getVectorType() { + return vectorType; + } + + + public void setVectorType(String vectorType) { + this.vectorType = vectorType; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -327,24 +351,14 @@ public boolean equals(Object o) { Objects.equals(this.metric, createIndexRequest.metric) && Objects.equals(this.deletionProtection, createIndexRequest.deletionProtection) && Objects.equals(this.tags, createIndexRequest.tags) && - Objects.equals(this.spec, createIndexRequest.spec)&& + Objects.equals(this.spec, createIndexRequest.spec) && + Objects.equals(this.vectorType, createIndexRequest.vectorType)&& Objects.equals(this.additionalProperties, createIndexRequest.additionalProperties); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { - return Objects.hash(name, dimension, metric, deletionProtection, tags, spec, additionalProperties); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(name, dimension, metric, deletionProtection, tags, spec, vectorType, additionalProperties); } @Override @@ -357,6 +371,7 @@ public String toString() { sb.append(" deletionProtection: ").append(toIndentedString(deletionProtection)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" spec: ").append(toIndentedString(spec)).append("\n"); + sb.append(" vectorType: ").append(toIndentedString(vectorType)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -386,11 +401,11 @@ private String toIndentedString(Object o) { openapiFields.add("deletion_protection"); openapiFields.add("tags"); openapiFields.add("spec"); + openapiFields.add("vector_type"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("name"); - openapiRequiredFields.add("dimension"); openapiRequiredFields.add("spec"); } @@ -422,6 +437,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the required field `spec` IndexSpec.validateJsonElement(jsonObj.get("spec")); + if ((jsonObj.get("vector_type") != null && !jsonObj.get("vector_type").isJsonNull()) && !jsonObj.get("vector_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vector_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vector_type").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/org/openapitools/db_control/client/model/DeletionProtection.java b/src/main/java/org/openapitools/db_control/client/model/DeletionProtection.java index 9b58e475..54322460 100644 --- a/src/main/java/org/openapitools/db_control/client/model/DeletionProtection.java +++ b/src/main/java/org/openapitools/db_control/client/model/DeletionProtection.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,7 +23,7 @@ import com.google.gson.stream.JsonWriter; /** - * Whether [deletion protection](http://docs.pinecone.io/guides/indexes/prevent-index-deletion) is enabled/disabled for the index. + * Whether [deletion protection](http://docs.pinecone.io/guides/indexes/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. */ @JsonAdapter(DeletionProtection.Adapter.class) public enum DeletionProtection { diff --git a/src/main/java/org/openapitools/db_control/client/model/ErrorResponse.java b/src/main/java/org/openapitools/db_control/client/model/ErrorResponse.java index 4c253f7d..8a59502e 100644 --- a/src/main/java/org/openapitools/db_control/client/model/ErrorResponse.java +++ b/src/main/java/org/openapitools/db_control/client/model/ErrorResponse.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -50,7 +50,7 @@ /** * The response shape used for all error responses. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class ErrorResponse { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) diff --git a/src/main/java/org/openapitools/db_control/client/model/ErrorResponseError.java b/src/main/java/org/openapitools/db_control/client/model/ErrorResponseError.java index f44bd8ee..8ee6f30d 100644 --- a/src/main/java/org/openapitools/db_control/client/model/ErrorResponseError.java +++ b/src/main/java/org/openapitools/db_control/client/model/ErrorResponseError.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,7 +49,7 @@ /** * Detailed information about the error that occurred. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class ErrorResponseError { /** * Gets or Sets code diff --git a/src/main/java/org/openapitools/db_control/client/model/IndexList.java b/src/main/java/org/openapitools/db_control/client/model/IndexList.java index 152ede26..89e27c1b 100644 --- a/src/main/java/org/openapitools/db_control/client/model/IndexList.java +++ b/src/main/java/org/openapitools/db_control/client/model/IndexList.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -52,7 +52,7 @@ /** * The list of indexes that exist in the project. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class IndexList { public static final String SERIALIZED_NAME_INDEXES = "indexes"; @SerializedName(SERIALIZED_NAME_INDEXES) diff --git a/src/main/java/org/openapitools/db_control/client/model/IndexModel.java b/src/main/java/org/openapitools/db_control/client/model/IndexModel.java index 4765a2d5..2850b44f 100644 --- a/src/main/java/org/openapitools/db_control/client/model/IndexModel.java +++ b/src/main/java/org/openapitools/db_control/client/model/IndexModel.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -26,7 +26,7 @@ import org.openapitools.db_control.client.model.DeletionProtection; import org.openapitools.db_control.client.model.IndexModelSpec; import org.openapitools.db_control.client.model.IndexModelStatus; -import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.db_control.client.model.ModelIndexEmbed; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -55,7 +55,7 @@ /** * The IndexModel describes the configuration and status of a Pinecone index. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class IndexModel { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -66,7 +66,7 @@ public class IndexModel { private Integer dimension; /** - * The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. + * The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If the 'vector_type' is 'sparse', the metric must be 'dotproduct'. If the `vector_type` is `dense`, the metric defaults to 'cosine'. */ @JsonAdapter(MetricEnum.Adapter.class) public enum MetricEnum { @@ -116,7 +116,7 @@ public MetricEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_METRIC = "metric"; @SerializedName(SERIALIZED_NAME_METRIC) - private MetricEnum metric = MetricEnum.COSINE; + private MetricEnum metric; public static final String SERIALIZED_NAME_HOST = "host"; @SerializedName(SERIALIZED_NAME_HOST) @@ -128,7 +128,11 @@ public MetricEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private Map tags; + private Map tags = new HashMap<>(); + + public static final String SERIALIZED_NAME_EMBED = "embed"; + @SerializedName(SERIALIZED_NAME_EMBED) + private ModelIndexEmbed embed; public static final String SERIALIZED_NAME_SPEC = "spec"; @SerializedName(SERIALIZED_NAME_SPEC) @@ -138,6 +142,10 @@ public MetricEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_STATUS) private IndexModelStatus status; + public static final String SERIALIZED_NAME_VECTOR_TYPE = "vector_type"; + @SerializedName(SERIALIZED_NAME_VECTOR_TYPE) + private String vectorType = "dense"; + public IndexModel() { } @@ -174,7 +182,7 @@ public IndexModel dimension(Integer dimension) { * maximum: 20000 * @return dimension **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getDimension() { return dimension; } @@ -192,7 +200,7 @@ public IndexModel metric(MetricEnum metric) { } /** - * The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. + * The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If the 'vector_type' is 'sparse', the metric must be 'dotproduct'. If the `vector_type` is `dense`, the metric defaults to 'cosine'. * @return metric **/ @javax.annotation.Nonnull @@ -263,7 +271,7 @@ public IndexModel putTagsItem(String key, String tagsItem) { } /** - * Custom user tags added to an index. Keys must be alphanumeric and 80 characters or less. Values must be 120 characters or less. + * Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '_', or '-'. Values must be alphanumeric, ';', '@', '_', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string. * @return tags **/ @javax.annotation.Nullable @@ -277,6 +285,27 @@ public void setTags(Map tags) { } + public IndexModel embed(ModelIndexEmbed embed) { + + this.embed = embed; + return this; + } + + /** + * Get embed + * @return embed + **/ + @javax.annotation.Nullable + public ModelIndexEmbed getEmbed() { + return embed; + } + + + public void setEmbed(ModelIndexEmbed embed) { + this.embed = embed; + } + + public IndexModel spec(IndexModelSpec spec) { this.spec = spec; @@ -318,6 +347,27 @@ public void setStatus(IndexModelStatus status) { this.status = status; } + + public IndexModel vectorType(String vectorType) { + + this.vectorType = vectorType; + return this; + } + + /** + * The index vector type. You can use 'dense' or 'sparse'. If 'dense', the vector dimension must be specified. If 'sparse', the vector dimension should not be specified. + * @return vectorType + **/ + @javax.annotation.Nonnull + public String getVectorType() { + return vectorType; + } + + + public void setVectorType(String vectorType) { + this.vectorType = vectorType; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -379,25 +429,16 @@ public boolean equals(Object o) { Objects.equals(this.host, indexModel.host) && Objects.equals(this.deletionProtection, indexModel.deletionProtection) && Objects.equals(this.tags, indexModel.tags) && + Objects.equals(this.embed, indexModel.embed) && Objects.equals(this.spec, indexModel.spec) && - Objects.equals(this.status, indexModel.status)&& + Objects.equals(this.status, indexModel.status) && + Objects.equals(this.vectorType, indexModel.vectorType)&& Objects.equals(this.additionalProperties, indexModel.additionalProperties); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { - return Objects.hash(name, dimension, metric, host, deletionProtection, tags, spec, status, additionalProperties); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(name, dimension, metric, host, deletionProtection, tags, embed, spec, status, vectorType, additionalProperties); } @Override @@ -410,8 +451,10 @@ public String toString() { sb.append(" host: ").append(toIndentedString(host)).append("\n"); sb.append(" deletionProtection: ").append(toIndentedString(deletionProtection)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" embed: ").append(toIndentedString(embed)).append("\n"); sb.append(" spec: ").append(toIndentedString(spec)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" vectorType: ").append(toIndentedString(vectorType)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -441,17 +484,19 @@ private String toIndentedString(Object o) { openapiFields.add("host"); openapiFields.add("deletion_protection"); openapiFields.add("tags"); + openapiFields.add("embed"); openapiFields.add("spec"); openapiFields.add("status"); + openapiFields.add("vector_type"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("name"); - openapiRequiredFields.add("dimension"); openapiRequiredFields.add("metric"); openapiRequiredFields.add("host"); openapiRequiredFields.add("spec"); openapiRequiredFields.add("status"); + openapiRequiredFields.add("vector_type"); } /** @@ -483,10 +528,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("host").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `host` to be a primitive type in the JSON string but got `%s`", jsonObj.get("host").toString())); } + // validate the optional field `embed` + if (jsonObj.get("embed") != null && !jsonObj.get("embed").isJsonNull()) { + ModelIndexEmbed.validateJsonElement(jsonObj.get("embed")); + } // validate the required field `spec` IndexModelSpec.validateJsonElement(jsonObj.get("spec")); // validate the required field `status` IndexModelStatus.validateJsonElement(jsonObj.get("status")); + if (!jsonObj.get("vector_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vector_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vector_type").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/org/openapitools/db_control/client/model/IndexModelSpec.java b/src/main/java/org/openapitools/db_control/client/model/IndexModelSpec.java index 37e64681..df87eb37 100644 --- a/src/main/java/org/openapitools/db_control/client/model/IndexModelSpec.java +++ b/src/main/java/org/openapitools/db_control/client/model/IndexModelSpec.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -51,7 +51,7 @@ /** * IndexModelSpec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class IndexModelSpec { public static final String SERIALIZED_NAME_POD = "pod"; @SerializedName(SERIALIZED_NAME_POD) diff --git a/src/main/java/org/openapitools/db_control/client/model/IndexModelStatus.java b/src/main/java/org/openapitools/db_control/client/model/IndexModelStatus.java index b4871d11..e8e97190 100644 --- a/src/main/java/org/openapitools/db_control/client/model/IndexModelStatus.java +++ b/src/main/java/org/openapitools/db_control/client/model/IndexModelStatus.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,7 +49,7 @@ /** * IndexModelStatus */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class IndexModelStatus { public static final String SERIALIZED_NAME_READY = "ready"; @SerializedName(SERIALIZED_NAME_READY) diff --git a/src/main/java/org/openapitools/db_control/client/model/IndexSpec.java b/src/main/java/org/openapitools/db_control/client/model/IndexSpec.java index 8a967b41..ac1ef9cc 100644 --- a/src/main/java/org/openapitools/db_control/client/model/IndexSpec.java +++ b/src/main/java/org/openapitools/db_control/client/model/IndexSpec.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,9 +49,9 @@ import org.openapitools.db_control.client.JSON; /** - * The spec object defines how the index should be deployed. For serverless indexes, you define only the [cloud and region](http://docs.pinecone.io/guides/indexes/understanding-indexes#cloud-regions) where the index should be hosted. For pod-based indexes, you define the [environment](http://docs.pinecone.io/guides/indexes/understanding-indexes#pod-environments) where the index should be hosted, the [pod type and size](http://docs.pinecone.io/guides/indexes/understanding-indexes#pod-types) to use, and other index characteristics. + * The spec object defines how the index should be deployed. For serverless indexes, you define only the [cloud and region](http://docs.pinecone.io/guides/indexes/understanding-indexes#cloud-regions) where the index should be hosted. For pod-based indexes, you define the [environment](http://docs.pinecone.io/guides/indexes/pods/understanding-pod-based-indexes#pod-environments) where the index should be hosted, the [pod type and size](http://docs.pinecone.io/guides/indexes/pods/understanding-pod-based-indexes#pod-types) to use, and other index characteristics. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class IndexSpec { public static final String SERIALIZED_NAME_SERVERLESS = "serverless"; @SerializedName(SERIALIZED_NAME_SERVERLESS) diff --git a/src/main/java/org/openapitools/db_control/client/model/ModelIndexEmbed.java b/src/main/java/org/openapitools/db_control/client/model/ModelIndexEmbed.java new file mode 100644 index 00000000..d358f313 --- /dev/null +++ b/src/main/java/org/openapitools/db_control/client/model/ModelIndexEmbed.java @@ -0,0 +1,517 @@ +/* + * Pinecone Control Plane API + * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. + * + * The version of the OpenAPI document: 2025-01 + * Contact: support@pinecone.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.db_control.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.db_control.client.JSON; + +/** + * The embedding model and document fields mapped to embedding inputs. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") +public class ModelIndexEmbed { + public static final String SERIALIZED_NAME_MODEL = "model"; + @SerializedName(SERIALIZED_NAME_MODEL) + private String model; + + /** + * The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If not specified, the metric will be defaulted according to the model. Cannot be updated once set. + */ + @JsonAdapter(MetricEnum.Adapter.class) + public enum MetricEnum { + COSINE("cosine"), + + EUCLIDEAN("euclidean"), + + DOTPRODUCT("dotproduct"); + + private String value; + + MetricEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MetricEnum fromValue(String value) { + for (MetricEnum b : MetricEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetricEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetricEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetricEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_METRIC = "metric"; + @SerializedName(SERIALIZED_NAME_METRIC) + private MetricEnum metric; + + public static final String SERIALIZED_NAME_DIMENSION = "dimension"; + @SerializedName(SERIALIZED_NAME_DIMENSION) + private Integer dimension; + + public static final String SERIALIZED_NAME_VECTOR_TYPE = "vector_type"; + @SerializedName(SERIALIZED_NAME_VECTOR_TYPE) + private String vectorType = "dense"; + + public static final String SERIALIZED_NAME_FIELD_MAP = "field_map"; + @SerializedName(SERIALIZED_NAME_FIELD_MAP) + private Object fieldMap; + + public static final String SERIALIZED_NAME_READ_PARAMETERS = "read_parameters"; + @SerializedName(SERIALIZED_NAME_READ_PARAMETERS) + private Object readParameters; + + public static final String SERIALIZED_NAME_WRITE_PARAMETERS = "write_parameters"; + @SerializedName(SERIALIZED_NAME_WRITE_PARAMETERS) + private Object writeParameters; + + public ModelIndexEmbed() { + } + + public ModelIndexEmbed model(String model) { + + this.model = model; + return this; + } + + /** + * The name of the embedding model used to create the index. + * @return model + **/ + @javax.annotation.Nonnull + public String getModel() { + return model; + } + + + public void setModel(String model) { + this.model = model; + } + + + public ModelIndexEmbed metric(MetricEnum metric) { + + this.metric = metric; + return this; + } + + /** + * The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If not specified, the metric will be defaulted according to the model. Cannot be updated once set. + * @return metric + **/ + @javax.annotation.Nullable + public MetricEnum getMetric() { + return metric; + } + + + public void setMetric(MetricEnum metric) { + this.metric = metric; + } + + + public ModelIndexEmbed dimension(Integer dimension) { + + this.dimension = dimension; + return this; + } + + /** + * The dimensions of the vectors to be inserted in the index. + * minimum: 1 + * maximum: 20000 + * @return dimension + **/ + @javax.annotation.Nullable + public Integer getDimension() { + return dimension; + } + + + public void setDimension(Integer dimension) { + this.dimension = dimension; + } + + + public ModelIndexEmbed vectorType(String vectorType) { + + this.vectorType = vectorType; + return this; + } + + /** + * The index vector type. You can use 'dense' or 'sparse'. If 'dense', the vector dimension must be specified. If 'sparse', the vector dimension should not be specified. + * @return vectorType + **/ + @javax.annotation.Nullable + public String getVectorType() { + return vectorType; + } + + + public void setVectorType(String vectorType) { + this.vectorType = vectorType; + } + + + public ModelIndexEmbed fieldMap(Object fieldMap) { + + this.fieldMap = fieldMap; + return this; + } + + /** + * Identifies the name of the text field from your document model that is embedded. + * @return fieldMap + **/ + @javax.annotation.Nullable + public Object getFieldMap() { + return fieldMap; + } + + + public void setFieldMap(Object fieldMap) { + this.fieldMap = fieldMap; + } + + + public ModelIndexEmbed readParameters(Object readParameters) { + + this.readParameters = readParameters; + return this; + } + + /** + * The read parameters for the embedding model. + * @return readParameters + **/ + @javax.annotation.Nullable + public Object getReadParameters() { + return readParameters; + } + + + public void setReadParameters(Object readParameters) { + this.readParameters = readParameters; + } + + + public ModelIndexEmbed writeParameters(Object writeParameters) { + + this.writeParameters = writeParameters; + return this; + } + + /** + * The write parameters for the embedding model. + * @return writeParameters + **/ + @javax.annotation.Nullable + public Object getWriteParameters() { + return writeParameters; + } + + + public void setWriteParameters(Object writeParameters) { + this.writeParameters = writeParameters; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ModelIndexEmbed instance itself + */ + public ModelIndexEmbed putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelIndexEmbed modelIndexEmbed = (ModelIndexEmbed) o; + return Objects.equals(this.model, modelIndexEmbed.model) && + Objects.equals(this.metric, modelIndexEmbed.metric) && + Objects.equals(this.dimension, modelIndexEmbed.dimension) && + Objects.equals(this.vectorType, modelIndexEmbed.vectorType) && + Objects.equals(this.fieldMap, modelIndexEmbed.fieldMap) && + Objects.equals(this.readParameters, modelIndexEmbed.readParameters) && + Objects.equals(this.writeParameters, modelIndexEmbed.writeParameters)&& + Objects.equals(this.additionalProperties, modelIndexEmbed.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(model, metric, dimension, vectorType, fieldMap, readParameters, writeParameters, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelIndexEmbed {\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" metric: ").append(toIndentedString(metric)).append("\n"); + sb.append(" dimension: ").append(toIndentedString(dimension)).append("\n"); + sb.append(" vectorType: ").append(toIndentedString(vectorType)).append("\n"); + sb.append(" fieldMap: ").append(toIndentedString(fieldMap)).append("\n"); + sb.append(" readParameters: ").append(toIndentedString(readParameters)).append("\n"); + sb.append(" writeParameters: ").append(toIndentedString(writeParameters)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("model"); + openapiFields.add("metric"); + openapiFields.add("dimension"); + openapiFields.add("vector_type"); + openapiFields.add("field_map"); + openapiFields.add("read_parameters"); + openapiFields.add("write_parameters"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("model"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ModelIndexEmbed + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ModelIndexEmbed.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ModelIndexEmbed is not found in the empty JSON string", ModelIndexEmbed.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ModelIndexEmbed.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("model").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `model` to be a primitive type in the JSON string but got `%s`", jsonObj.get("model").toString())); + } + if ((jsonObj.get("metric") != null && !jsonObj.get("metric").isJsonNull()) && !jsonObj.get("metric").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metric` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metric").toString())); + } + if ((jsonObj.get("vector_type") != null && !jsonObj.get("vector_type").isJsonNull()) && !jsonObj.get("vector_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vector_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vector_type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ModelIndexEmbed.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ModelIndexEmbed' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ModelIndexEmbed.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ModelIndexEmbed value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ModelIndexEmbed read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ModelIndexEmbed instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ModelIndexEmbed given an JSON string + * + * @param jsonString JSON string + * @return An instance of ModelIndexEmbed + * @throws IOException if the JSON string is invalid with respect to ModelIndexEmbed + */ + public static ModelIndexEmbed fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ModelIndexEmbed.class); + } + + /** + * Convert an instance of ModelIndexEmbed to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/db_control/client/model/PodSpec.java b/src/main/java/org/openapitools/db_control/client/model/PodSpec.java index 7a8d1638..c9a7f56d 100644 --- a/src/main/java/org/openapitools/db_control/client/model/PodSpec.java +++ b/src/main/java/org/openapitools/db_control/client/model/PodSpec.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -50,7 +50,7 @@ /** * Configuration needed to deploy a pod-based index. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class PodSpec { public static final String SERIALIZED_NAME_ENVIRONMENT = "environment"; @SerializedName(SERIALIZED_NAME_ENVIRONMENT) diff --git a/src/main/java/org/openapitools/db_control/client/model/PodSpecMetadataConfig.java b/src/main/java/org/openapitools/db_control/client/model/PodSpecMetadataConfig.java index 08fc15c9..4455b093 100644 --- a/src/main/java/org/openapitools/db_control/client/model/PodSpecMetadataConfig.java +++ b/src/main/java/org/openapitools/db_control/client/model/PodSpecMetadataConfig.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -51,7 +51,7 @@ /** * Configuration for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; when `metadata_config` is present, only specified metadata fields are indexed. These configurations are only valid for use with pod-based indexes. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class PodSpecMetadataConfig { public static final String SERIALIZED_NAME_INDEXED = "indexed"; @SerializedName(SERIALIZED_NAME_INDEXED) diff --git a/src/main/java/org/openapitools/db_control/client/model/ServerlessSpec.java b/src/main/java/org/openapitools/db_control/client/model/ServerlessSpec.java index e8ad7c33..efb01c03 100644 --- a/src/main/java/org/openapitools/db_control/client/model/ServerlessSpec.java +++ b/src/main/java/org/openapitools/db_control/client/model/ServerlessSpec.java @@ -2,7 +2,7 @@ * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,7 +49,7 @@ /** * Configuration needed to deploy a serverless index. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]") public class ServerlessSpec { /** * The public cloud where you would like your index hosted. @@ -139,7 +139,7 @@ public ServerlessSpec region(String region) { } /** - * The region where you would like your index to be created. + * The region where you would like your index to be created. * @return region **/ @javax.annotation.Nonnull diff --git a/src/main/java/org/openapitools/db_data/client/ApiCallback.java b/src/main/java/org/openapitools/db_data/client/ApiCallback.java index 2fc57d7c..9cc00479 100644 --- a/src/main/java/org/openapitools/db_data/client/ApiCallback.java +++ b/src/main/java/org/openapitools/db_data/client/ApiCallback.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/db_data/client/ApiClient.java b/src/main/java/org/openapitools/db_data/client/ApiClient.java index 61121f9b..67632fb3 100644 --- a/src/main/java/org/openapitools/db_data/client/ApiClient.java +++ b/src/main/java/org/openapitools/db_data/client/ApiClient.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -147,7 +147,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2024-10/java"); + setUserAgent("OpenAPI-Generator/2025-01/java"); authentications = new HashMap(); } diff --git a/src/main/java/org/openapitools/db_data/client/ApiException.java b/src/main/java/org/openapitools/db_data/client/ApiException.java index 5d7b0d75..ab6e38e0 100644 --- a/src/main/java/org/openapitools/db_data/client/ApiException.java +++ b/src/main/java/org/openapitools/db_data/client/ApiException.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/org/openapitools/db_data/client/ApiResponse.java b/src/main/java/org/openapitools/db_data/client/ApiResponse.java index 70d11f6f..818729b6 100644 --- a/src/main/java/org/openapitools/db_data/client/ApiResponse.java +++ b/src/main/java/org/openapitools/db_data/client/ApiResponse.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/db_data/client/Configuration.java b/src/main/java/org/openapitools/db_data/client/Configuration.java index d0d524d4..03afa1d6 100644 --- a/src/main/java/org/openapitools/db_data/client/Configuration.java +++ b/src/main/java/org/openapitools/db_data/client/Configuration.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,9 +13,9 @@ package org.openapitools.db_data.client; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class Configuration { - public static final String VERSION = "2024-10"; + public static final String VERSION = "2025-01"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/org/openapitools/db_data/client/GzipRequestInterceptor.java b/src/main/java/org/openapitools/db_data/client/GzipRequestInterceptor.java index 65d12982..1cdc68b5 100644 --- a/src/main/java/org/openapitools/db_data/client/GzipRequestInterceptor.java +++ b/src/main/java/org/openapitools/db_data/client/GzipRequestInterceptor.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/db_data/client/JSON.java b/src/main/java/org/openapitools/db_data/client/JSON.java index c180d7c9..3adbeadb 100644 --- a/src/main/java/org/openapitools/db_data/client/JSON.java +++ b/src/main/java/org/openapitools/db_data/client/JSON.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -96,6 +96,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.DeleteRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.DescribeIndexStatsRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.FetchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.Hit.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.ImportErrorMode.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.ImportModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.IndexDescription.CustomTypeAdapterFactory()); @@ -110,11 +111,20 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.QueryVector.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.RpcStatus.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.ScoredVector.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.SearchRecordsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.SearchRecordsRequestQuery.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.SearchRecordsRequestRerank.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.SearchRecordsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.SearchRecordsResponseResult.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.SearchRecordsVector.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.SearchUsage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.SearchVector.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.SingleQueryResults.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.SparseValues.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.StartImportRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.StartImportResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.UpdateRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.UpsertRecord.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.UpsertRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.UpsertResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.db_data.client.model.Usage.CustomTypeAdapterFactory()); diff --git a/src/main/java/org/openapitools/db_data/client/Pair.java b/src/main/java/org/openapitools/db_data/client/Pair.java index 4f9e98e4..902e03fb 100644 --- a/src/main/java/org/openapitools/db_data/client/Pair.java +++ b/src/main/java/org/openapitools/db_data/client/Pair.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,7 @@ package org.openapitools.db_data.client; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/org/openapitools/db_data/client/ProgressRequestBody.java b/src/main/java/org/openapitools/db_data/client/ProgressRequestBody.java index 1e2f1b86..6c29bbd0 100644 --- a/src/main/java/org/openapitools/db_data/client/ProgressRequestBody.java +++ b/src/main/java/org/openapitools/db_data/client/ProgressRequestBody.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/db_data/client/ProgressResponseBody.java b/src/main/java/org/openapitools/db_data/client/ProgressResponseBody.java index 8ae7270a..23010a8f 100644 --- a/src/main/java/org/openapitools/db_data/client/ProgressResponseBody.java +++ b/src/main/java/org/openapitools/db_data/client/ProgressResponseBody.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/db_data/client/StringUtil.java b/src/main/java/org/openapitools/db_data/client/StringUtil.java index 68c71a7e..2073f569 100644 --- a/src/main/java/org/openapitools/db_data/client/StringUtil.java +++ b/src/main/java/org/openapitools/db_data/client/StringUtil.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/org/openapitools/db_data/client/api/BulkOperationsApi.java b/src/main/java/org/openapitools/db_data/client/api/BulkOperationsApi.java index d98d7314..da713ea4 100644 --- a/src/main/java/org/openapitools/db_data/client/api/BulkOperationsApi.java +++ b/src/main/java/org/openapitools/db_data/client/api/BulkOperationsApi.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -78,7 +78,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for cancelBulkImport - * @param id (required) + * @param id Unique identifier for the import operation. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -149,8 +149,8 @@ private okhttp3.Call cancelBulkImportValidateBeforeCall(String id, final ApiCall /** * Cancel an import - * The `cancel_import` operation cancels an import operation if it is not yet finished. It has no effect if the operation is already finished. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). - * @param id (required) + * Cancel an import operation if it is not yet finished. It has no effect if the operation is already finished. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). + * @param id Unique identifier for the import operation. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -169,8 +169,8 @@ public Object cancelBulkImport(String id) throws ApiException { /** * Cancel an import - * The `cancel_import` operation cancels an import operation if it is not yet finished. It has no effect if the operation is already finished. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). - * @param id (required) + * Cancel an import operation if it is not yet finished. It has no effect if the operation is already finished. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). + * @param id Unique identifier for the import operation. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -190,8 +190,8 @@ public ApiResponse cancelBulkImportWithHttpInfo(String id) throws ApiExc /** * Cancel an import (asynchronously) - * The `cancel_import` operation cancels an import operation if it is not yet finished. It has no effect if the operation is already finished. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). - * @param id (required) + * Cancel an import operation if it is not yet finished. It has no effect if the operation is already finished. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). + * @param id Unique identifier for the import operation. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -213,14 +213,14 @@ public okhttp3.Call cancelBulkImportAsync(String id, final ApiCallback _ } /** * Build call for describeBulkImport - * @param id (required) + * @param id Unique identifier for the import operation. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + @@ -284,14 +284,14 @@ private okhttp3.Call describeBulkImportValidateBeforeCall(String id, final ApiCa /** * Describe an import - * The `describe_import` operation returns details of a specific import operation. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). - * @param id (required) + * Return details of a specific import operation. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). + * @param id Unique identifier for the import operation. (required) * @return ImportModel * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Details of the import operation -
200 Details of the import operation. -
400 Bad request. The request body included invalid request parameters. -
4XX An unexpected error response. -
5XX An unexpected error response. -
- + @@ -304,14 +304,14 @@ public ImportModel describeBulkImport(String id) throws ApiException { /** * Describe an import - * The `describe_import` operation returns details of a specific import operation. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). - * @param id (required) + * Return details of a specific import operation. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). + * @param id Unique identifier for the import operation. (required) * @return ApiResponse<ImportModel> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Details of the import operation -
200 Details of the import operation. -
400 Bad request. The request body included invalid request parameters. -
4XX An unexpected error response. -
5XX An unexpected error response. -
- + @@ -325,15 +325,15 @@ public ApiResponse describeBulkImportWithHttpInfo(String id) throws /** * Describe an import (asynchronously) - * The `describe_import` operation returns details of a specific import operation. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). - * @param id (required) + * Return details of a specific import operation. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). + * @param id Unique identifier for the import operation. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Details of the import operation -
200 Details of the import operation. -
400 Bad request. The request body included invalid request parameters. -
4XX An unexpected error response. -
5XX An unexpected error response. -
- + @@ -422,7 +422,7 @@ private okhttp3.Call listBulkImportsValidateBeforeCall(Integer limit, String pag /** * List imports - * The `list_imports` operation lists all recent and ongoing import operations. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). + * List all recent and ongoing import operations. By default, this returns up to 100 imports per page. If the `limit` parameter is set, `list` returns up to that number of imports instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of imports. When the response does not include a `pagination_token`, there are no more imports to return. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). * @param limit Max number of operations to return per page. (optional) * @param paginationToken Pagination token to continue a previous listing operation. (optional) * @return ListImportsResponse @@ -443,7 +443,7 @@ public ListImportsResponse listBulkImports(Integer limit, String paginationToken /** * List imports - * The `list_imports` operation lists all recent and ongoing import operations. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). + * List all recent and ongoing import operations. By default, this returns up to 100 imports per page. If the `limit` parameter is set, `list` returns up to that number of imports instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of imports. When the response does not include a `pagination_token`, there are no more imports to return. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). * @param limit Max number of operations to return per page. (optional) * @param paginationToken Pagination token to continue a previous listing operation. (optional) * @return ApiResponse<ListImportsResponse> @@ -465,7 +465,7 @@ public ApiResponse listBulkImportsWithHttpInfo(Integer limi /** * List imports (asynchronously) - * The `list_imports` operation lists all recent and ongoing import operations. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). + * List all recent and ongoing import operations. By default, this returns up to 100 imports per page. If the `limit` parameter is set, `list` returns up to that number of imports instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of imports. When the response does not include a `pagination_token`, there are no more imports to return. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). * @param limit Max number of operations to return per page. (optional) * @param paginationToken Pagination token to continue a previous listing operation. (optional) * @param _callback The callback to be executed when the API call finishes @@ -560,7 +560,7 @@ private okhttp3.Call startBulkImportValidateBeforeCall(StartImportRequest startI /** * Start import - * The `start_import` operation starts an asynchronous import of vectors from object storage into an index. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). + * Start an asynchronous import of vectors from object storage into an index. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). * @param startImportRequest (required) * @return StartImportResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -580,7 +580,7 @@ public StartImportResponse startBulkImport(StartImportRequest startImportRequest /** * Start import - * The `start_import` operation starts an asynchronous import of vectors from object storage into an index. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). + * Start an asynchronous import of vectors from object storage into an index. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). * @param startImportRequest (required) * @return ApiResponse<StartImportResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -601,7 +601,7 @@ public ApiResponse startBulkImportWithHttpInfo(StartImportR /** * Start import (asynchronously) - * The `start_import` operation starts an asynchronous import of vectors from object storage into an index. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). + * Start an asynchronous import of vectors from object storage into an index. For guidance and examples, see [Import data](https://docs.pinecone.io/guides/data/import-data). * @param startImportRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call diff --git a/src/main/java/org/openapitools/db_data/client/api/VectorOperationsApi.java b/src/main/java/org/openapitools/db_data/client/api/VectorOperationsApi.java index 9b779163..0f64974f 100644 --- a/src/main/java/org/openapitools/db_data/client/api/VectorOperationsApi.java +++ b/src/main/java/org/openapitools/db_data/client/api/VectorOperationsApi.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -35,7 +35,10 @@ import org.openapitools.db_data.client.model.QueryRequest; import org.openapitools.db_data.client.model.QueryResponse; import org.openapitools.db_data.client.model.RpcStatus; +import org.openapitools.db_data.client.model.SearchRecordsRequest; +import org.openapitools.db_data.client.model.SearchRecordsResponse; import org.openapitools.db_data.client.model.UpdateRequest; +import org.openapitools.db_data.client.model.UpsertRecord; import org.openapitools.db_data.client.model.UpsertRequest; import org.openapitools.db_data.client.model.UpsertResponse; @@ -155,7 +158,7 @@ private okhttp3.Call deleteVectorsValidateBeforeCall(DeleteRequest deleteRequest /** * Delete vectors - * The `delete` operation deletes vectors, by id, from a single namespace. For guidance and examples, see [Delete data](https://docs.pinecone.io/guides/data/delete-data). + * Delete vectors, by id, from a single namespace. For guidance and examples, see [Delete data](https://docs.pinecone.io/guides/data/delete-data). * @param deleteRequest (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -175,7 +178,7 @@ public Object deleteVectors(DeleteRequest deleteRequest) throws ApiException { /** * Delete vectors - * The `delete` operation deletes vectors, by id, from a single namespace. For guidance and examples, see [Delete data](https://docs.pinecone.io/guides/data/delete-data). + * Delete vectors, by id, from a single namespace. For guidance and examples, see [Delete data](https://docs.pinecone.io/guides/data/delete-data). * @param deleteRequest (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -196,7 +199,7 @@ public ApiResponse deleteVectorsWithHttpInfo(DeleteRequest deleteRequest /** * Delete vectors (asynchronously) - * The `delete` operation deletes vectors, by id, from a single namespace. For guidance and examples, see [Delete data](https://docs.pinecone.io/guides/data/delete-data). + * Delete vectors, by id, from a single namespace. For guidance and examples, see [Delete data](https://docs.pinecone.io/guides/data/delete-data). * @param deleteRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -290,7 +293,7 @@ private okhttp3.Call describeIndexStatsValidateBeforeCall(DescribeIndexStatsRequ /** * Get index stats - * The `describe_index_stats` operation returns statistics about the contents of an index, including the vector count per namespace, the number of dimensions, and the index fullness. Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes. For pod-based indexes, the index fullness result may be inaccurate during pod resizing; to get the status of a pod resizing process, use [`describe_index`](https://docs.pinecone.io/reference/api/control-plane/describe_index). + * Return statistics about the contents of an index, including the vector count per namespace, the number of dimensions, and the index fullness. Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes. * @param describeIndexStatsRequest (required) * @return IndexDescription * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -310,7 +313,7 @@ public IndexDescription describeIndexStats(DescribeIndexStatsRequest describeInd /** * Get index stats - * The `describe_index_stats` operation returns statistics about the contents of an index, including the vector count per namespace, the number of dimensions, and the index fullness. Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes. For pod-based indexes, the index fullness result may be inaccurate during pod resizing; to get the status of a pod resizing process, use [`describe_index`](https://docs.pinecone.io/reference/api/control-plane/describe_index). + * Return statistics about the contents of an index, including the vector count per namespace, the number of dimensions, and the index fullness. Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes. * @param describeIndexStatsRequest (required) * @return ApiResponse<IndexDescription> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -331,7 +334,7 @@ public ApiResponse describeIndexStatsWithHttpInfo(DescribeInde /** * Get index stats (asynchronously) - * The `describe_index_stats` operation returns statistics about the contents of an index, including the vector count per namespace, the number of dimensions, and the index fullness. Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes. For pod-based indexes, the index fullness result may be inaccurate during pod resizing; to get the status of a pod resizing process, use [`describe_index`](https://docs.pinecone.io/reference/api/control-plane/describe_index). + * Return statistics about the contents of an index, including the vector count per namespace, the number of dimensions, and the index fullness. Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes. * @param describeIndexStatsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -433,7 +436,7 @@ private okhttp3.Call fetchVectorsValidateBeforeCall(List ids, String nam /** * Fetch vectors - * The `fetch` operation looks up and returns vectors, by ID, from a single namespace. The returned vectors include the vector data and/or metadata. For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/data/fetch-data). + * Look up and return vectors, by ID, from a single namespace. The returned vectors include the vector data and/or metadata. For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/data/fetch-data). * @param ids The vector IDs to fetch. Does not accept values containing spaces. (required) * @param namespace (optional) * @return FetchResponse @@ -454,7 +457,7 @@ public FetchResponse fetchVectors(List ids, String namespace) throws Api /** * Fetch vectors - * The `fetch` operation looks up and returns vectors, by ID, from a single namespace. The returned vectors include the vector data and/or metadata. For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/data/fetch-data). + * Look up and return vectors, by ID, from a single namespace. The returned vectors include the vector data and/or metadata. For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/data/fetch-data). * @param ids The vector IDs to fetch. Does not accept values containing spaces. (required) * @param namespace (optional) * @return ApiResponse<FetchResponse> @@ -476,7 +479,7 @@ public ApiResponse fetchVectorsWithHttpInfo(List ids, Str /** * Fetch vectors (asynchronously) - * The `fetch` operation looks up and returns vectors, by ID, from a single namespace. The returned vectors include the vector data and/or metadata. For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/data/fetch-data). + * Look up and return vectors, by ID, from a single namespace. The returned vectors include the vector data and/or metadata. For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/data/fetch-data). * @param ids The vector IDs to fetch. Does not accept values containing spaces. (required) * @param namespace (optional) * @param _callback The callback to be executed when the API call finishes @@ -584,7 +587,7 @@ private okhttp3.Call listVectorsValidateBeforeCall(String prefix, Long limit, St /** * List vector IDs - * The `list` operation lists the IDs of vectors in a single namespace of a serverless index. An optional prefix can be passed to limit the results to IDs with a common prefix. `list` returns up to 100 IDs at a time by default in sorted order (bitwise \"C\" collation). If the `limit` parameter is set, `list` returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of IDs. When the response does not include a `pagination_token`, there are no more IDs to return. For guidance and examples, see [List record IDs](https://docs.pinecone.io/guides/data/list-record-ids). **Note:** `list_vectors` is supported only for serverless indexes. + * List the IDs of vectors in a single namespace of a serverless index. An optional prefix can be passed to limit the results to IDs with a common prefix. This returns up to 100 IDs at a time by default in sorted order (bitwise \"C\" collation). If the `limit` parameter is set, `list` returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of IDs. When the response does not include a `pagination_token`, there are no more IDs to return. For guidance and examples, see [List record IDs](https://docs.pinecone.io/guides/data/list-record-ids). **Note:** `list` is supported only for serverless indexes. * @param prefix The vector IDs to fetch. Does not accept values containing spaces. (optional) * @param limit Max number of IDs to return per page. (optional) * @param paginationToken Pagination token to continue a previous listing operation. (optional) @@ -607,7 +610,7 @@ public ListResponse listVectors(String prefix, Long limit, String paginationToke /** * List vector IDs - * The `list` operation lists the IDs of vectors in a single namespace of a serverless index. An optional prefix can be passed to limit the results to IDs with a common prefix. `list` returns up to 100 IDs at a time by default in sorted order (bitwise \"C\" collation). If the `limit` parameter is set, `list` returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of IDs. When the response does not include a `pagination_token`, there are no more IDs to return. For guidance and examples, see [List record IDs](https://docs.pinecone.io/guides/data/list-record-ids). **Note:** `list_vectors` is supported only for serverless indexes. + * List the IDs of vectors in a single namespace of a serverless index. An optional prefix can be passed to limit the results to IDs with a common prefix. This returns up to 100 IDs at a time by default in sorted order (bitwise \"C\" collation). If the `limit` parameter is set, `list` returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of IDs. When the response does not include a `pagination_token`, there are no more IDs to return. For guidance and examples, see [List record IDs](https://docs.pinecone.io/guides/data/list-record-ids). **Note:** `list` is supported only for serverless indexes. * @param prefix The vector IDs to fetch. Does not accept values containing spaces. (optional) * @param limit Max number of IDs to return per page. (optional) * @param paginationToken Pagination token to continue a previous listing operation. (optional) @@ -631,7 +634,7 @@ public ApiResponse listVectorsWithHttpInfo(String prefix, Long lim /** * List vector IDs (asynchronously) - * The `list` operation lists the IDs of vectors in a single namespace of a serverless index. An optional prefix can be passed to limit the results to IDs with a common prefix. `list` returns up to 100 IDs at a time by default in sorted order (bitwise \"C\" collation). If the `limit` parameter is set, `list` returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of IDs. When the response does not include a `pagination_token`, there are no more IDs to return. For guidance and examples, see [List record IDs](https://docs.pinecone.io/guides/data/list-record-ids). **Note:** `list_vectors` is supported only for serverless indexes. + * List the IDs of vectors in a single namespace of a serverless index. An optional prefix can be passed to limit the results to IDs with a common prefix. This returns up to 100 IDs at a time by default in sorted order (bitwise \"C\" collation). If the `limit` parameter is set, `list` returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of IDs. When the response does not include a `pagination_token`, there are no more IDs to return. For guidance and examples, see [List record IDs](https://docs.pinecone.io/guides/data/list-record-ids). **Note:** `list` is supported only for serverless indexes. * @param prefix The vector IDs to fetch. Does not accept values containing spaces. (optional) * @param limit Max number of IDs to return per page. (optional) * @param paginationToken Pagination token to continue a previous listing operation. (optional) @@ -728,7 +731,7 @@ private okhttp3.Call queryVectorsValidateBeforeCall(QueryRequest queryRequest, f /** * Query vectors - * The `query` operation searches a namespace, using a query vector. It retrieves the ids of the most similar items in a namespace, along with their similarity scores. For guidance and examples, see [Query data](https://docs.pinecone.io/guides/data/query-data). + * Search a namespace, using a query vector. It retrieves the ids of the most similar items in a namespace, along with their similarity scores. For guidance and examples, see [Query data](https://docs.pinecone.io/guides/data/query-data). * @param queryRequest (required) * @return QueryResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -748,7 +751,7 @@ public QueryResponse queryVectors(QueryRequest queryRequest) throws ApiException /** * Query vectors - * The `query` operation searches a namespace, using a query vector. It retrieves the ids of the most similar items in a namespace, along with their similarity scores. For guidance and examples, see [Query data](https://docs.pinecone.io/guides/data/query-data). + * Search a namespace, using a query vector. It retrieves the ids of the most similar items in a namespace, along with their similarity scores. For guidance and examples, see [Query data](https://docs.pinecone.io/guides/data/query-data). * @param queryRequest (required) * @return ApiResponse<QueryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -769,7 +772,7 @@ public ApiResponse queryVectorsWithHttpInfo(QueryRequest queryReq /** * Query vectors (asynchronously) - * The `query` operation searches a namespace, using a query vector. It retrieves the ids of the most similar items in a namespace, along with their similarity scores. For guidance and examples, see [Query data](https://docs.pinecone.io/guides/data/query-data). + * Search a namespace, using a query vector. It retrieves the ids of the most similar items in a namespace, along with their similarity scores. For guidance and examples, see [Query data](https://docs.pinecone.io/guides/data/query-data). * @param queryRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -790,6 +793,151 @@ public okhttp3.Call queryVectorsAsync(QueryRequest queryRequest, final ApiCallba localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for searchRecordsNamespace + * @param namespace The namespace to search. (required) + * @param searchRecordsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details +
Status Code Description Response Headers
200 Details of the import operation -
200 Details of the import operation. -
400 Bad request. The request body included invalid request parameters. -
4XX An unexpected error response. -
5XX An unexpected error response. -
+ + + + + +
Status Code Description Response Headers
200 A successful search namespace response. -
400 Bad request. The request body included invalid request parameters. -
4XX An unexpected error response. -
5XX An unexpected error response. -
+ */ + public okhttp3.Call searchRecordsNamespaceCall(String namespace, SearchRecordsRequest searchRecordsRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchRecordsRequest; + + // create path and map variables + String localVarPath = "/records/namespaces/{namespace}/search" + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchRecordsNamespaceValidateBeforeCall(String namespace, SearchRecordsRequest searchRecordsRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'namespace' is set + if (namespace == null) { + throw new ApiException("Missing the required parameter 'namespace' when calling searchRecordsNamespace(Async)"); + } + + // verify the required parameter 'searchRecordsRequest' is set + if (searchRecordsRequest == null) { + throw new ApiException("Missing the required parameter 'searchRecordsRequest' when calling searchRecordsNamespace(Async)"); + } + + return searchRecordsNamespaceCall(namespace, searchRecordsRequest, _callback); + + } + + /** + * Search a namespace + * This operation converts a query to a vector embedding and then searches a namespace using the embedding. It returns the most similar records in the namespace, along with their similarity scores. + * @param namespace The namespace to search. (required) + * @param searchRecordsRequest (required) + * @return SearchRecordsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 A successful search namespace response. -
400 Bad request. The request body included invalid request parameters. -
4XX An unexpected error response. -
5XX An unexpected error response. -
+ */ + public SearchRecordsResponse searchRecordsNamespace(String namespace, SearchRecordsRequest searchRecordsRequest) throws ApiException { + ApiResponse localVarResp = searchRecordsNamespaceWithHttpInfo(namespace, searchRecordsRequest); + return localVarResp.getData(); + } + + /** + * Search a namespace + * This operation converts a query to a vector embedding and then searches a namespace using the embedding. It returns the most similar records in the namespace, along with their similarity scores. + * @param namespace The namespace to search. (required) + * @param searchRecordsRequest (required) + * @return ApiResponse<SearchRecordsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 A successful search namespace response. -
400 Bad request. The request body included invalid request parameters. -
4XX An unexpected error response. -
5XX An unexpected error response. -
+ */ + public ApiResponse searchRecordsNamespaceWithHttpInfo(String namespace, SearchRecordsRequest searchRecordsRequest) throws ApiException { + okhttp3.Call localVarCall = searchRecordsNamespaceValidateBeforeCall(namespace, searchRecordsRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search a namespace (asynchronously) + * This operation converts a query to a vector embedding and then searches a namespace using the embedding. It returns the most similar records in the namespace, along with their similarity scores. + * @param namespace The namespace to search. (required) + * @param searchRecordsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 A successful search namespace response. -
400 Bad request. The request body included invalid request parameters. -
4XX An unexpected error response. -
5XX An unexpected error response. -
+ */ + public okhttp3.Call searchRecordsNamespaceAsync(String namespace, SearchRecordsRequest searchRecordsRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchRecordsNamespaceValidateBeforeCall(namespace, searchRecordsRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for updateVector * @param updateRequest (required) @@ -863,7 +1011,7 @@ private okhttp3.Call updateVectorValidateBeforeCall(UpdateRequest updateRequest, /** * Update a vector - * The `update` operation updates a vector in a namespace. If a value is included, it will overwrite the previous value. If a `set_metadata` is included, the values of the fields specified in it will be added or overwrite the previous value. For guidance and examples, see [Update data](https://docs.pinecone.io/guides/data/update-data). + * Update a vector in a namespace. If a value is included, it will overwrite the previous value. If a `set_metadata` is included, the values of the fields specified in it will be added or overwrite the previous value. For guidance and examples, see [Update data](https://docs.pinecone.io/guides/data/update-data). * @param updateRequest (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -883,7 +1031,7 @@ public Object updateVector(UpdateRequest updateRequest) throws ApiException { /** * Update a vector - * The `update` operation updates a vector in a namespace. If a value is included, it will overwrite the previous value. If a `set_metadata` is included, the values of the fields specified in it will be added or overwrite the previous value. For guidance and examples, see [Update data](https://docs.pinecone.io/guides/data/update-data). + * Update a vector in a namespace. If a value is included, it will overwrite the previous value. If a `set_metadata` is included, the values of the fields specified in it will be added or overwrite the previous value. For guidance and examples, see [Update data](https://docs.pinecone.io/guides/data/update-data). * @param updateRequest (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -904,7 +1052,7 @@ public ApiResponse updateVectorWithHttpInfo(UpdateRequest updateRequest) /** * Update a vector (asynchronously) - * The `update` operation updates a vector in a namespace. If a value is included, it will overwrite the previous value. If a `set_metadata` is included, the values of the fields specified in it will be added or overwrite the previous value. For guidance and examples, see [Update data](https://docs.pinecone.io/guides/data/update-data). + * Update a vector in a namespace. If a value is included, it will overwrite the previous value. If a `set_metadata` is included, the values of the fields specified in it will be added or overwrite the previous value. For guidance and examples, see [Update data](https://docs.pinecone.io/guides/data/update-data). * @param updateRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -925,6 +1073,147 @@ public okhttp3.Call updateVectorAsync(UpdateRequest updateRequest, final ApiCall localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for upsertRecordsNamespace + * @param namespace The namespace to upsert records into. (required) + * @param upsertRecord (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 A successful response. -
400 Bad request. The request body included invalid request parameters. -
4XX An unexpected error response. -
5XX An unexpected error response. -
+ */ + public okhttp3.Call upsertRecordsNamespaceCall(String namespace, List upsertRecord, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = upsertRecord; + + // create path and map variables + String localVarPath = "/records/namespaces/{namespace}/upsert" + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/x-ndjson" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call upsertRecordsNamespaceValidateBeforeCall(String namespace, List upsertRecord, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'namespace' is set + if (namespace == null) { + throw new ApiException("Missing the required parameter 'namespace' when calling upsertRecordsNamespace(Async)"); + } + + // verify the required parameter 'upsertRecord' is set + if (upsertRecord == null) { + throw new ApiException("Missing the required parameter 'upsertRecord' when calling upsertRecordsNamespace(Async)"); + } + + return upsertRecordsNamespaceCall(namespace, upsertRecord, _callback); + + } + + /** + * Upsert records into a namespace + * This operation converts input data to vector embeddings and then upserts the embeddings into a namespace. + * @param namespace The namespace to upsert records into. (required) + * @param upsertRecord (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 A successful response. -
400 Bad request. The request body included invalid request parameters. -
4XX An unexpected error response. -
5XX An unexpected error response. -
+ */ + public void upsertRecordsNamespace(String namespace, List upsertRecord) throws ApiException { + upsertRecordsNamespaceWithHttpInfo(namespace, upsertRecord); + } + + /** + * Upsert records into a namespace + * This operation converts input data to vector embeddings and then upserts the embeddings into a namespace. + * @param namespace The namespace to upsert records into. (required) + * @param upsertRecord (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 A successful response. -
400 Bad request. The request body included invalid request parameters. -
4XX An unexpected error response. -
5XX An unexpected error response. -
+ */ + public ApiResponse upsertRecordsNamespaceWithHttpInfo(String namespace, List upsertRecord) throws ApiException { + okhttp3.Call localVarCall = upsertRecordsNamespaceValidateBeforeCall(namespace, upsertRecord, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Upsert records into a namespace (asynchronously) + * This operation converts input data to vector embeddings and then upserts the embeddings into a namespace. + * @param namespace The namespace to upsert records into. (required) + * @param upsertRecord (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 A successful response. -
400 Bad request. The request body included invalid request parameters. -
4XX An unexpected error response. -
5XX An unexpected error response. -
+ */ + public okhttp3.Call upsertRecordsNamespaceAsync(String namespace, List upsertRecord, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = upsertRecordsNamespaceValidateBeforeCall(namespace, upsertRecord, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } /** * Build call for upsertVectors * @param upsertRequest (required) @@ -998,7 +1287,7 @@ private okhttp3.Call upsertVectorsValidateBeforeCall(UpsertRequest upsertRequest /** * Upsert vectors - * The `upsert` operation writes vectors into a namespace. If a new value is upserted for an existing vector ID, it will overwrite the previous value. For guidance and examples, see [Upsert data](https://docs.pinecone.io/guides/data/upsert-data). + * Write vectors into a namespace. If a new value is upserted for an existing vector ID, it will overwrite the previous value. For guidance and examples, see [Upsert data](https://docs.pinecone.io/guides/data/upsert-data). * @param upsertRequest (required) * @return UpsertResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1018,7 +1307,7 @@ public UpsertResponse upsertVectors(UpsertRequest upsertRequest) throws ApiExcep /** * Upsert vectors - * The `upsert` operation writes vectors into a namespace. If a new value is upserted for an existing vector ID, it will overwrite the previous value. For guidance and examples, see [Upsert data](https://docs.pinecone.io/guides/data/upsert-data). + * Write vectors into a namespace. If a new value is upserted for an existing vector ID, it will overwrite the previous value. For guidance and examples, see [Upsert data](https://docs.pinecone.io/guides/data/upsert-data). * @param upsertRequest (required) * @return ApiResponse<UpsertResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1039,7 +1328,7 @@ public ApiResponse upsertVectorsWithHttpInfo(UpsertRequest upser /** * Upsert vectors (asynchronously) - * The `upsert` operation writes vectors into a namespace. If a new value is upserted for an existing vector ID, it will overwrite the previous value. For guidance and examples, see [Upsert data](https://docs.pinecone.io/guides/data/upsert-data). + * Write vectors into a namespace. If a new value is upserted for an existing vector ID, it will overwrite the previous value. For guidance and examples, see [Upsert data](https://docs.pinecone.io/guides/data/upsert-data). * @param upsertRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call diff --git a/src/main/java/org/openapitools/db_data/client/auth/ApiKeyAuth.java b/src/main/java/org/openapitools/db_data/client/auth/ApiKeyAuth.java index fd83c119..2060fe53 100644 --- a/src/main/java/org/openapitools/db_data/client/auth/ApiKeyAuth.java +++ b/src/main/java/org/openapitools/db_data/client/auth/ApiKeyAuth.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/org/openapitools/db_data/client/auth/Authentication.java b/src/main/java/org/openapitools/db_data/client/auth/Authentication.java index 21567b36..501d69e6 100644 --- a/src/main/java/org/openapitools/db_data/client/auth/Authentication.java +++ b/src/main/java/org/openapitools/db_data/client/auth/Authentication.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/db_data/client/auth/HttpBasicAuth.java b/src/main/java/org/openapitools/db_data/client/auth/HttpBasicAuth.java index a422af32..ef761ef8 100644 --- a/src/main/java/org/openapitools/db_data/client/auth/HttpBasicAuth.java +++ b/src/main/java/org/openapitools/db_data/client/auth/HttpBasicAuth.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/db_data/client/auth/HttpBearerAuth.java b/src/main/java/org/openapitools/db_data/client/auth/HttpBearerAuth.java index 1cef876a..7878e42b 100644 --- a/src/main/java/org/openapitools/db_data/client/auth/HttpBearerAuth.java +++ b/src/main/java/org/openapitools/db_data/client/auth/HttpBearerAuth.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private String bearerToken; diff --git a/src/main/java/org/openapitools/db_data/client/model/AbstractOpenApiSchema.java b/src/main/java/org/openapitools/db_data/client/model/AbstractOpenApiSchema.java index 77fd8763..16a34e3d 100644 --- a/src/main/java/org/openapitools/db_data/client/model/AbstractOpenApiSchema.java +++ b/src/main/java/org/openapitools/db_data/client/model/AbstractOpenApiSchema.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,7 +23,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/org/openapitools/db_data/client/model/DeleteRequest.java b/src/main/java/org/openapitools/db_data/client/model/DeleteRequest.java index 12769dc3..87b9de72 100644 --- a/src/main/java/org/openapitools/db_data/client/model/DeleteRequest.java +++ b/src/main/java/org/openapitools/db_data/client/model/DeleteRequest.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -51,7 +51,7 @@ /** * The request for the `delete` operation. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class DeleteRequest { public static final String SERIALIZED_NAME_IDS = "ids"; @SerializedName(SERIALIZED_NAME_IDS) @@ -150,7 +150,7 @@ public DeleteRequest filter(Object filter) { } /** - * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive with specifying ids to delete in the ids param or using delete_all=True. See [Filter with metadata](https://docs.pinecone.io/guides/data/filter-with-metadata). Serverless indexes do not support delete by metadata. Instead, you can use the `list` operation to fetch the vector IDs based on their common ID prefix and then delete the records by ID. + * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive with specifying ids to delete in the ids param or using delete_all=True. See [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata). Serverless indexes do not support delete by metadata. Instead, you can use the `list` operation to fetch the vector IDs based on their common ID prefix and then delete the records by ID. * @return filter **/ @javax.annotation.Nullable diff --git a/src/main/java/org/openapitools/db_data/client/model/DescribeIndexStatsRequest.java b/src/main/java/org/openapitools/db_data/client/model/DescribeIndexStatsRequest.java index 20fb8859..0a922597 100644 --- a/src/main/java/org/openapitools/db_data/client/model/DescribeIndexStatsRequest.java +++ b/src/main/java/org/openapitools/db_data/client/model/DescribeIndexStatsRequest.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,7 +49,7 @@ /** * The request for the `describe_index_stats` operation. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class DescribeIndexStatsRequest { public static final String SERIALIZED_NAME_FILTER = "filter"; @SerializedName(SERIALIZED_NAME_FILTER) @@ -65,7 +65,7 @@ public DescribeIndexStatsRequest filter(Object filter) { } /** - * If this parameter is present, the operation only returns statistics for vectors that satisfy the filter. See [Filter with metadata](https://docs.pinecone.io/guides/data/filter-with-metadata). Serverless indexes do not support filtering `describe_index_stats` by metadata. + * If this parameter is present, the operation only returns statistics for vectors that satisfy the filter. See [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata). Serverless indexes do not support filtering `describe_index_stats` by metadata. * @return filter **/ @javax.annotation.Nullable diff --git a/src/main/java/org/openapitools/db_data/client/model/FetchResponse.java b/src/main/java/org/openapitools/db_data/client/model/FetchResponse.java index 1b04417f..d4fabf5e 100644 --- a/src/main/java/org/openapitools/db_data/client/model/FetchResponse.java +++ b/src/main/java/org/openapitools/db_data/client/model/FetchResponse.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -53,7 +53,7 @@ /** * The response for the `fetch` operation. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class FetchResponse { public static final String SERIALIZED_NAME_VECTORS = "vectors"; @SerializedName(SERIALIZED_NAME_VECTORS) diff --git a/src/main/java/org/openapitools/db_data/client/model/Hit.java b/src/main/java/org/openapitools/db_data/client/model/Hit.java new file mode 100644 index 00000000..b8187846 --- /dev/null +++ b/src/main/java/org/openapitools/db_data/client/model/Hit.java @@ -0,0 +1,350 @@ +/* + * Pinecone Data Plane API + * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. + * + * The version of the OpenAPI document: 2025-01 + * Contact: support@pinecone.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.db_data.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.db_data.client.JSON; + +/** + * A record whose vector values are similar to the provided search query. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") +public class Hit { + public static final String SERIALIZED_NAME_ID = "_id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_SCORE = "_score"; + @SerializedName(SERIALIZED_NAME_SCORE) + private Float score; + + public static final String SERIALIZED_NAME_FIELDS = "fields"; + @SerializedName(SERIALIZED_NAME_FIELDS) + private Object fields; + + public Hit() { + } + + public Hit id(String id) { + + this.id = id; + return this; + } + + /** + * The record id of the search hit. + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public Hit score(Float score) { + + this.score = score; + return this; + } + + /** + * The similarity score of the returned record. + * @return score + **/ + @javax.annotation.Nonnull + public Float getScore() { + return score; + } + + + public void setScore(Float score) { + this.score = score; + } + + + public Hit fields(Object fields) { + + this.fields = fields; + return this; + } + + /** + * The selected record fields associated with the search hit. + * @return fields + **/ + @javax.annotation.Nonnull + public Object getFields() { + return fields; + } + + + public void setFields(Object fields) { + this.fields = fields; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Hit instance itself + */ + public Hit putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Hit hit = (Hit) o; + return Objects.equals(this.id, hit.id) && + Objects.equals(this.score, hit.score) && + Objects.equals(this.fields, hit.fields)&& + Objects.equals(this.additionalProperties, hit.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, score, fields, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Hit {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" score: ").append(toIndentedString(score)).append("\n"); + sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("_id"); + openapiFields.add("_score"); + openapiFields.add("fields"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("_id"); + openapiRequiredFields.add("_score"); + openapiRequiredFields.add("fields"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Hit + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Hit.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Hit is not found in the empty JSON string", Hit.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Hit.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Hit.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Hit' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Hit.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Hit value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Hit read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Hit instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Hit given an JSON string + * + * @param jsonString JSON string + * @return An instance of Hit + * @throws IOException if the JSON string is invalid with respect to Hit + */ + public static Hit fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Hit.class); + } + + /** + * Convert an instance of Hit to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/db_data/client/model/ImportErrorMode.java b/src/main/java/org/openapitools/db_data/client/model/ImportErrorMode.java index 8a849fc7..88dc0844 100644 --- a/src/main/java/org/openapitools/db_data/client/model/ImportErrorMode.java +++ b/src/main/java/org/openapitools/db_data/client/model/ImportErrorMode.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,7 +49,7 @@ /** * Indicates how to respond to errors during the import process. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class ImportErrorMode { /** * Indicates how to respond to errors during the import process. diff --git a/src/main/java/org/openapitools/db_data/client/model/ImportModel.java b/src/main/java/org/openapitools/db_data/client/model/ImportModel.java index fee47648..5a9e41a9 100644 --- a/src/main/java/org/openapitools/db_data/client/model/ImportModel.java +++ b/src/main/java/org/openapitools/db_data/client/model/ImportModel.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -50,7 +50,7 @@ /** * The model for an import operation. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class ImportModel { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -252,7 +252,7 @@ public ImportModel percentComplete(Float percentComplete) { } /** - * The progress made by the operation out of 100 + * The progress made by the operation, as a percentage. * minimum: 0.0 * maximum: 100.0 * @return percentComplete diff --git a/src/main/java/org/openapitools/db_data/client/model/IndexDescription.java b/src/main/java/org/openapitools/db_data/client/model/IndexDescription.java index ce82686f..e1672294 100644 --- a/src/main/java/org/openapitools/db_data/client/model/IndexDescription.java +++ b/src/main/java/org/openapitools/db_data/client/model/IndexDescription.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -52,7 +52,7 @@ /** * The response for the `describe_index_stats` operation. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class IndexDescription { public static final String SERIALIZED_NAME_NAMESPACES = "namespaces"; @SerializedName(SERIALIZED_NAME_NAMESPACES) @@ -70,6 +70,14 @@ public class IndexDescription { @SerializedName(SERIALIZED_NAME_TOTAL_VECTOR_COUNT) private Long totalVectorCount; + public static final String SERIALIZED_NAME_METRIC = "metric"; + @SerializedName(SERIALIZED_NAME_METRIC) + private String metric; + + public static final String SERIALIZED_NAME_VECTOR_TYPE = "vectorType"; + @SerializedName(SERIALIZED_NAME_VECTOR_TYPE) + private String vectorType; + public IndexDescription() { } @@ -109,7 +117,7 @@ public IndexDescription dimension(Long dimension) { } /** - * The dimension of the indexed vectors. + * The dimension of the indexed vectors. Not specified if `sparse` index. * @return dimension **/ @javax.annotation.Nullable @@ -130,7 +138,7 @@ public IndexDescription indexFullness(Float indexFullness) { } /** - * The fullness of the index, regardless of whether a metadata filter expression was passed. The granularity of this metric is 10%. Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes. The index fullness result may be inaccurate during pod resizing; to get the status of a pod resizing process, use [`describe_index`](https://docs.pinecone.io/reference/api/control-plane/describe_index). + * The fullness of the index, regardless of whether a metadata filter expression was passed. The granularity of this metric is 10%. Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes. The index fullness result may be inaccurate during pod resizing; to get the status of a pod resizing process, use [`describe_index`](https://docs.pinecone.io/reference/api/2024-10/control-plane/describe_index). * @return indexFullness **/ @javax.annotation.Nullable @@ -164,6 +172,48 @@ public void setTotalVectorCount(Long totalVectorCount) { this.totalVectorCount = totalVectorCount; } + + public IndexDescription metric(String metric) { + + this.metric = metric; + return this; + } + + /** + * The metric used to measure similarity. + * @return metric + **/ + @javax.annotation.Nullable + public String getMetric() { + return metric; + } + + + public void setMetric(String metric) { + this.metric = metric; + } + + + public IndexDescription vectorType(String vectorType) { + + this.vectorType = vectorType; + return this; + } + + /** + * The type of vectors stored in the index. + * @return vectorType + **/ + @javax.annotation.Nullable + public String getVectorType() { + return vectorType; + } + + + public void setVectorType(String vectorType) { + this.vectorType = vectorType; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -222,13 +272,15 @@ public boolean equals(Object o) { return Objects.equals(this.namespaces, indexDescription.namespaces) && Objects.equals(this.dimension, indexDescription.dimension) && Objects.equals(this.indexFullness, indexDescription.indexFullness) && - Objects.equals(this.totalVectorCount, indexDescription.totalVectorCount)&& + Objects.equals(this.totalVectorCount, indexDescription.totalVectorCount) && + Objects.equals(this.metric, indexDescription.metric) && + Objects.equals(this.vectorType, indexDescription.vectorType)&& Objects.equals(this.additionalProperties, indexDescription.additionalProperties); } @Override public int hashCode() { - return Objects.hash(namespaces, dimension, indexFullness, totalVectorCount, additionalProperties); + return Objects.hash(namespaces, dimension, indexFullness, totalVectorCount, metric, vectorType, additionalProperties); } @Override @@ -239,6 +291,8 @@ public String toString() { sb.append(" dimension: ").append(toIndentedString(dimension)).append("\n"); sb.append(" indexFullness: ").append(toIndentedString(indexFullness)).append("\n"); sb.append(" totalVectorCount: ").append(toIndentedString(totalVectorCount)).append("\n"); + sb.append(" metric: ").append(toIndentedString(metric)).append("\n"); + sb.append(" vectorType: ").append(toIndentedString(vectorType)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -266,6 +320,8 @@ private String toIndentedString(Object o) { openapiFields.add("dimension"); openapiFields.add("indexFullness"); openapiFields.add("totalVectorCount"); + openapiFields.add("metric"); + openapiFields.add("vectorType"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -284,6 +340,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("metric") != null && !jsonObj.get("metric").isJsonNull()) && !jsonObj.get("metric").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metric` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metric").toString())); + } + if ((jsonObj.get("vectorType") != null && !jsonObj.get("vectorType").isJsonNull()) && !jsonObj.get("vectorType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vectorType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vectorType").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/org/openapitools/db_data/client/model/ListImportsResponse.java b/src/main/java/org/openapitools/db_data/client/model/ListImportsResponse.java index df7348b6..93b6871c 100644 --- a/src/main/java/org/openapitools/db_data/client/model/ListImportsResponse.java +++ b/src/main/java/org/openapitools/db_data/client/model/ListImportsResponse.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -53,7 +53,7 @@ /** * The response for the `list_imports` operation. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class ListImportsResponse { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) diff --git a/src/main/java/org/openapitools/db_data/client/model/ListItem.java b/src/main/java/org/openapitools/db_data/client/model/ListItem.java index 6d21c60d..b770d956 100644 --- a/src/main/java/org/openapitools/db_data/client/model/ListItem.java +++ b/src/main/java/org/openapitools/db_data/client/model/ListItem.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,7 +49,7 @@ /** * ListItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class ListItem { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/org/openapitools/db_data/client/model/ListResponse.java b/src/main/java/org/openapitools/db_data/client/model/ListResponse.java index 309039dc..2ef20337 100644 --- a/src/main/java/org/openapitools/db_data/client/model/ListResponse.java +++ b/src/main/java/org/openapitools/db_data/client/model/ListResponse.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -54,7 +54,7 @@ /** * The response for the `list` operation. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class ListResponse { public static final String SERIALIZED_NAME_VECTORS = "vectors"; @SerializedName(SERIALIZED_NAME_VECTORS) diff --git a/src/main/java/org/openapitools/db_data/client/model/NamespaceSummary.java b/src/main/java/org/openapitools/db_data/client/model/NamespaceSummary.java index a0ce407e..027afd1d 100644 --- a/src/main/java/org/openapitools/db_data/client/model/NamespaceSummary.java +++ b/src/main/java/org/openapitools/db_data/client/model/NamespaceSummary.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,7 +49,7 @@ /** * A summary of the contents of a namespace. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class NamespaceSummary { public static final String SERIALIZED_NAME_VECTOR_COUNT = "vectorCount"; @SerializedName(SERIALIZED_NAME_VECTOR_COUNT) diff --git a/src/main/java/org/openapitools/db_data/client/model/Pagination.java b/src/main/java/org/openapitools/db_data/client/model/Pagination.java index d7372f3d..d73e826e 100644 --- a/src/main/java/org/openapitools/db_data/client/model/Pagination.java +++ b/src/main/java/org/openapitools/db_data/client/model/Pagination.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,7 +49,7 @@ /** * Pagination */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class Pagination { public static final String SERIALIZED_NAME_NEXT = "next"; @SerializedName(SERIALIZED_NAME_NEXT) diff --git a/src/main/java/org/openapitools/db_data/client/model/ProtobufAny.java b/src/main/java/org/openapitools/db_data/client/model/ProtobufAny.java index 9124df58..bb7b04d6 100644 --- a/src/main/java/org/openapitools/db_data/client/model/ProtobufAny.java +++ b/src/main/java/org/openapitools/db_data/client/model/ProtobufAny.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,7 +49,7 @@ /** * ProtobufAny */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class ProtobufAny { public static final String SERIALIZED_NAME_TYPE_URL = "typeUrl"; @SerializedName(SERIALIZED_NAME_TYPE_URL) diff --git a/src/main/java/org/openapitools/db_data/client/model/ProtobufNullValue.java b/src/main/java/org/openapitools/db_data/client/model/ProtobufNullValue.java index e0a709b3..128e67f1 100644 --- a/src/main/java/org/openapitools/db_data/client/model/ProtobufNullValue.java +++ b/src/main/java/org/openapitools/db_data/client/model/ProtobufNullValue.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/db_data/client/model/QueryRequest.java b/src/main/java/org/openapitools/db_data/client/model/QueryRequest.java index 261856b9..b3b649ae 100644 --- a/src/main/java/org/openapitools/db_data/client/model/QueryRequest.java +++ b/src/main/java/org/openapitools/db_data/client/model/QueryRequest.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -53,7 +53,7 @@ /** * The request for the `query` operation. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class QueryRequest { public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) @@ -146,7 +146,7 @@ public QueryRequest filter(Object filter) { } /** - * The filter to apply. You can use vector metadata to limit your search. See [Filter with metadata](https://docs.pinecone.io/guides/data/filter-with-metadata). + * The filter to apply. You can use vector metadata to limit your search. See [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata). * @return filter **/ @javax.annotation.Nullable diff --git a/src/main/java/org/openapitools/db_data/client/model/QueryResponse.java b/src/main/java/org/openapitools/db_data/client/model/QueryResponse.java index 49183922..df0c92e5 100644 --- a/src/main/java/org/openapitools/db_data/client/model/QueryResponse.java +++ b/src/main/java/org/openapitools/db_data/client/model/QueryResponse.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -54,7 +54,7 @@ /** * The response for the `query` operation. These are the matches found for a particular query vector. The matches are ordered from most similar to least similar. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class QueryResponse { public static final String SERIALIZED_NAME_RESULTS = "results"; @Deprecated diff --git a/src/main/java/org/openapitools/db_data/client/model/QueryVector.java b/src/main/java/org/openapitools/db_data/client/model/QueryVector.java index ee2b777b..35d72069 100644 --- a/src/main/java/org/openapitools/db_data/client/model/QueryVector.java +++ b/src/main/java/org/openapitools/db_data/client/model/QueryVector.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -54,7 +54,7 @@ * @deprecated */ @Deprecated -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class QueryVector { public static final String SERIALIZED_NAME_VALUES = "values"; @SerializedName(SERIALIZED_NAME_VALUES) diff --git a/src/main/java/org/openapitools/db_data/client/model/RpcStatus.java b/src/main/java/org/openapitools/db_data/client/model/RpcStatus.java index 81d7dde7..e57fd4cc 100644 --- a/src/main/java/org/openapitools/db_data/client/model/RpcStatus.java +++ b/src/main/java/org/openapitools/db_data/client/model/RpcStatus.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -52,7 +52,7 @@ /** * RpcStatus */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class RpcStatus { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) diff --git a/src/main/java/org/openapitools/db_data/client/model/ScoredVector.java b/src/main/java/org/openapitools/db_data/client/model/ScoredVector.java index 7d553748..0c0441d5 100644 --- a/src/main/java/org/openapitools/db_data/client/model/ScoredVector.java +++ b/src/main/java/org/openapitools/db_data/client/model/ScoredVector.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -52,7 +52,7 @@ /** * ScoredVector */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class ScoredVector { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/org/openapitools/db_data/client/model/SearchRecordsRequest.java b/src/main/java/org/openapitools/db_data/client/model/SearchRecordsRequest.java new file mode 100644 index 00000000..bb5ba63d --- /dev/null +++ b/src/main/java/org/openapitools/db_data/client/model/SearchRecordsRequest.java @@ -0,0 +1,367 @@ +/* + * Pinecone Data Plane API + * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. + * + * The version of the OpenAPI document: 2025-01 + * Contact: support@pinecone.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.db_data.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.db_data.client.model.SearchRecordsRequestQuery; +import org.openapitools.db_data.client.model.SearchRecordsRequestRerank; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.db_data.client.JSON; + +/** + * A search request for records in a specific namespace. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") +public class SearchRecordsRequest { + public static final String SERIALIZED_NAME_QUERY = "query"; + @SerializedName(SERIALIZED_NAME_QUERY) + private SearchRecordsRequestQuery query; + + public static final String SERIALIZED_NAME_FIELDS = "fields"; + @SerializedName(SERIALIZED_NAME_FIELDS) + private List fields; + + public static final String SERIALIZED_NAME_RERANK = "rerank"; + @SerializedName(SERIALIZED_NAME_RERANK) + private SearchRecordsRequestRerank rerank; + + public SearchRecordsRequest() { + } + + public SearchRecordsRequest query(SearchRecordsRequestQuery query) { + + this.query = query; + return this; + } + + /** + * Get query + * @return query + **/ + @javax.annotation.Nonnull + public SearchRecordsRequestQuery getQuery() { + return query; + } + + + public void setQuery(SearchRecordsRequestQuery query) { + this.query = query; + } + + + public SearchRecordsRequest fields(List fields) { + + this.fields = fields; + return this; + } + + public SearchRecordsRequest addFieldsItem(String fieldsItem) { + if (this.fields == null) { + this.fields = new ArrayList<>(); + } + this.fields.add(fieldsItem); + return this; + } + + /** + * The fields to return in the search results. + * @return fields + **/ + @javax.annotation.Nullable + public List getFields() { + return fields; + } + + + public void setFields(List fields) { + this.fields = fields; + } + + + public SearchRecordsRequest rerank(SearchRecordsRequestRerank rerank) { + + this.rerank = rerank; + return this; + } + + /** + * Get rerank + * @return rerank + **/ + @javax.annotation.Nullable + public SearchRecordsRequestRerank getRerank() { + return rerank; + } + + + public void setRerank(SearchRecordsRequestRerank rerank) { + this.rerank = rerank; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchRecordsRequest instance itself + */ + public SearchRecordsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchRecordsRequest searchRecordsRequest = (SearchRecordsRequest) o; + return Objects.equals(this.query, searchRecordsRequest.query) && + Objects.equals(this.fields, searchRecordsRequest.fields) && + Objects.equals(this.rerank, searchRecordsRequest.rerank)&& + Objects.equals(this.additionalProperties, searchRecordsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(query, fields, rerank, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchRecordsRequest {\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); + sb.append(" rerank: ").append(toIndentedString(rerank)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("query"); + openapiFields.add("fields"); + openapiFields.add("rerank"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("query"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchRecordsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchRecordsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchRecordsRequest is not found in the empty JSON string", SearchRecordsRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SearchRecordsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `query` + SearchRecordsRequestQuery.validateJsonElement(jsonObj.get("query")); + // ensure the optional json data is an array if present + if (jsonObj.get("fields") != null && !jsonObj.get("fields").isJsonNull() && !jsonObj.get("fields").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `fields` to be an array in the JSON string but got `%s`", jsonObj.get("fields").toString())); + } + // validate the optional field `rerank` + if (jsonObj.get("rerank") != null && !jsonObj.get("rerank").isJsonNull()) { + SearchRecordsRequestRerank.validateJsonElement(jsonObj.get("rerank")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchRecordsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchRecordsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchRecordsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchRecordsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchRecordsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchRecordsRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SearchRecordsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchRecordsRequest + * @throws IOException if the JSON string is invalid with respect to SearchRecordsRequest + */ + public static SearchRecordsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchRecordsRequest.class); + } + + /** + * Convert an instance of SearchRecordsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/db_data/client/model/SearchRecordsRequestQuery.java b/src/main/java/org/openapitools/db_data/client/model/SearchRecordsRequestQuery.java new file mode 100644 index 00000000..9c0e8407 --- /dev/null +++ b/src/main/java/org/openapitools/db_data/client/model/SearchRecordsRequestQuery.java @@ -0,0 +1,409 @@ +/* + * Pinecone Data Plane API + * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. + * + * The version of the OpenAPI document: 2025-01 + * Contact: support@pinecone.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.db_data.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.db_data.client.model.SearchRecordsVector; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.db_data.client.JSON; + +/** + * The query inputs to search with. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") +public class SearchRecordsRequestQuery { + public static final String SERIALIZED_NAME_TOP_K = "top_k"; + @SerializedName(SERIALIZED_NAME_TOP_K) + private Integer topK; + + public static final String SERIALIZED_NAME_FILTER = "filter"; + @SerializedName(SERIALIZED_NAME_FILTER) + private Object filter; + + public static final String SERIALIZED_NAME_INPUTS = "inputs"; + @SerializedName(SERIALIZED_NAME_INPUTS) + private Object inputs; + + public static final String SERIALIZED_NAME_VECTOR = "vector"; + @SerializedName(SERIALIZED_NAME_VECTOR) + private SearchRecordsVector vector; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public SearchRecordsRequestQuery() { + } + + public SearchRecordsRequestQuery topK(Integer topK) { + + this.topK = topK; + return this; + } + + /** + * The number of results to return for each search. + * @return topK + **/ + @javax.annotation.Nonnull + public Integer getTopK() { + return topK; + } + + + public void setTopK(Integer topK) { + this.topK = topK; + } + + + public SearchRecordsRequestQuery filter(Object filter) { + + this.filter = filter; + return this; + } + + /** + * The filter to apply. + * @return filter + **/ + @javax.annotation.Nullable + public Object getFilter() { + return filter; + } + + + public void setFilter(Object filter) { + this.filter = filter; + } + + + public SearchRecordsRequestQuery inputs(Object inputs) { + + this.inputs = inputs; + return this; + } + + /** + * Get inputs + * @return inputs + **/ + @javax.annotation.Nullable + public Object getInputs() { + return inputs; + } + + + public void setInputs(Object inputs) { + this.inputs = inputs; + } + + + public SearchRecordsRequestQuery vector(SearchRecordsVector vector) { + + this.vector = vector; + return this; + } + + /** + * Get vector + * @return vector + **/ + @javax.annotation.Nullable + public SearchRecordsVector getVector() { + return vector; + } + + + public void setVector(SearchRecordsVector vector) { + this.vector = vector; + } + + + public SearchRecordsRequestQuery id(String id) { + + this.id = id; + return this; + } + + /** + * The unique ID of the vector to be used as a query vector. + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchRecordsRequestQuery instance itself + */ + public SearchRecordsRequestQuery putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchRecordsRequestQuery searchRecordsRequestQuery = (SearchRecordsRequestQuery) o; + return Objects.equals(this.topK, searchRecordsRequestQuery.topK) && + Objects.equals(this.filter, searchRecordsRequestQuery.filter) && + Objects.equals(this.inputs, searchRecordsRequestQuery.inputs) && + Objects.equals(this.vector, searchRecordsRequestQuery.vector) && + Objects.equals(this.id, searchRecordsRequestQuery.id)&& + Objects.equals(this.additionalProperties, searchRecordsRequestQuery.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(topK, filter, inputs, vector, id, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchRecordsRequestQuery {\n"); + sb.append(" topK: ").append(toIndentedString(topK)).append("\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" inputs: ").append(toIndentedString(inputs)).append("\n"); + sb.append(" vector: ").append(toIndentedString(vector)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("top_k"); + openapiFields.add("filter"); + openapiFields.add("inputs"); + openapiFields.add("vector"); + openapiFields.add("id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("top_k"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchRecordsRequestQuery + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchRecordsRequestQuery.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchRecordsRequestQuery is not found in the empty JSON string", SearchRecordsRequestQuery.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SearchRecordsRequestQuery.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `vector` + if (jsonObj.get("vector") != null && !jsonObj.get("vector").isJsonNull()) { + SearchRecordsVector.validateJsonElement(jsonObj.get("vector")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchRecordsRequestQuery.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchRecordsRequestQuery' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchRecordsRequestQuery.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchRecordsRequestQuery value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchRecordsRequestQuery read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchRecordsRequestQuery instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SearchRecordsRequestQuery given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchRecordsRequestQuery + * @throws IOException if the JSON string is invalid with respect to SearchRecordsRequestQuery + */ + public static SearchRecordsRequestQuery fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchRecordsRequestQuery.class); + } + + /** + * Convert an instance of SearchRecordsRequestQuery to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/db_data/client/model/SearchRecordsRequestRerank.java b/src/main/java/org/openapitools/db_data/client/model/SearchRecordsRequestRerank.java new file mode 100644 index 00000000..0c37a17a --- /dev/null +++ b/src/main/java/org/openapitools/db_data/client/model/SearchRecordsRequestRerank.java @@ -0,0 +1,434 @@ +/* + * Pinecone Data Plane API + * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. + * + * The version of the OpenAPI document: 2025-01 + * Contact: support@pinecone.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.db_data.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.db_data.client.JSON; + +/** + * Parameters for reranking the initial search results. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") +public class SearchRecordsRequestRerank { + public static final String SERIALIZED_NAME_MODEL = "model"; + @SerializedName(SERIALIZED_NAME_MODEL) + private String model; + + public static final String SERIALIZED_NAME_RANK_FIELDS = "rank_fields"; + @SerializedName(SERIALIZED_NAME_RANK_FIELDS) + private List rankFields = new ArrayList<>(); + + public static final String SERIALIZED_NAME_TOP_N = "top_n"; + @SerializedName(SERIALIZED_NAME_TOP_N) + private Integer topN; + + public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; + @SerializedName(SERIALIZED_NAME_PARAMETERS) + private Map parameters = new HashMap<>(); + + public static final String SERIALIZED_NAME_QUERY = "query"; + @SerializedName(SERIALIZED_NAME_QUERY) + private String query; + + public SearchRecordsRequestRerank() { + } + + public SearchRecordsRequestRerank model(String model) { + + this.model = model; + return this; + } + + /** + * The name of the [reranking model](https://docs.pinecone.io/guides/inference/understanding-inference#reranking-models) to use. + * @return model + **/ + @javax.annotation.Nonnull + public String getModel() { + return model; + } + + + public void setModel(String model) { + this.model = model; + } + + + public SearchRecordsRequestRerank rankFields(List rankFields) { + + this.rankFields = rankFields; + return this; + } + + public SearchRecordsRequestRerank addRankFieldsItem(String rankFieldsItem) { + if (this.rankFields == null) { + this.rankFields = new ArrayList<>(); + } + this.rankFields.add(rankFieldsItem); + return this; + } + + /** + * The fields to use for reranking. + * @return rankFields + **/ + @javax.annotation.Nonnull + public List getRankFields() { + return rankFields; + } + + + public void setRankFields(List rankFields) { + this.rankFields = rankFields; + } + + + public SearchRecordsRequestRerank topN(Integer topN) { + + this.topN = topN; + return this; + } + + /** + * The number of top results to return after reranking. Defaults to top_k. + * @return topN + **/ + @javax.annotation.Nullable + public Integer getTopN() { + return topN; + } + + + public void setTopN(Integer topN) { + this.topN = topN; + } + + + public SearchRecordsRequestRerank parameters(Map parameters) { + + this.parameters = parameters; + return this; + } + + public SearchRecordsRequestRerank putParametersItem(String key, Object parametersItem) { + if (this.parameters == null) { + this.parameters = new HashMap<>(); + } + this.parameters.put(key, parametersItem); + return this; + } + + /** + * Additional model-specific parameters. Refer to the [model guide](https://docs.pinecone.io/guides/inference/understanding-inference#reranking-models) for available model parameters. + * @return parameters + **/ + @javax.annotation.Nullable + public Map getParameters() { + return parameters; + } + + + public void setParameters(Map parameters) { + this.parameters = parameters; + } + + + public SearchRecordsRequestRerank query(String query) { + + this.query = query; + return this; + } + + /** + * The query to rerank documents against. If a specific rerank query is specified, it overwrites the query input that was provided at the top level. + * @return query + **/ + @javax.annotation.Nullable + public String getQuery() { + return query; + } + + + public void setQuery(String query) { + this.query = query; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchRecordsRequestRerank instance itself + */ + public SearchRecordsRequestRerank putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchRecordsRequestRerank searchRecordsRequestRerank = (SearchRecordsRequestRerank) o; + return Objects.equals(this.model, searchRecordsRequestRerank.model) && + Objects.equals(this.rankFields, searchRecordsRequestRerank.rankFields) && + Objects.equals(this.topN, searchRecordsRequestRerank.topN) && + Objects.equals(this.parameters, searchRecordsRequestRerank.parameters) && + Objects.equals(this.query, searchRecordsRequestRerank.query)&& + Objects.equals(this.additionalProperties, searchRecordsRequestRerank.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(model, rankFields, topN, parameters, query, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchRecordsRequestRerank {\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" rankFields: ").append(toIndentedString(rankFields)).append("\n"); + sb.append(" topN: ").append(toIndentedString(topN)).append("\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("model"); + openapiFields.add("rank_fields"); + openapiFields.add("top_n"); + openapiFields.add("parameters"); + openapiFields.add("query"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("model"); + openapiRequiredFields.add("rank_fields"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchRecordsRequestRerank + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchRecordsRequestRerank.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchRecordsRequestRerank is not found in the empty JSON string", SearchRecordsRequestRerank.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SearchRecordsRequestRerank.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("model").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `model` to be a primitive type in the JSON string but got `%s`", jsonObj.get("model").toString())); + } + // ensure the required json array is present + if (jsonObj.get("rank_fields") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("rank_fields").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `rank_fields` to be an array in the JSON string but got `%s`", jsonObj.get("rank_fields").toString())); + } + if ((jsonObj.get("query") != null && !jsonObj.get("query").isJsonNull()) && !jsonObj.get("query").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `query` to be a primitive type in the JSON string but got `%s`", jsonObj.get("query").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchRecordsRequestRerank.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchRecordsRequestRerank' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchRecordsRequestRerank.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchRecordsRequestRerank value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchRecordsRequestRerank read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchRecordsRequestRerank instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SearchRecordsRequestRerank given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchRecordsRequestRerank + * @throws IOException if the JSON string is invalid with respect to SearchRecordsRequestRerank + */ + public static SearchRecordsRequestRerank fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchRecordsRequestRerank.class); + } + + /** + * Convert an instance of SearchRecordsRequestRerank to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/db_data/client/model/SearchRecordsResponse.java b/src/main/java/org/openapitools/db_data/client/model/SearchRecordsResponse.java new file mode 100644 index 00000000..ece92142 --- /dev/null +++ b/src/main/java/org/openapitools/db_data/client/model/SearchRecordsResponse.java @@ -0,0 +1,324 @@ +/* + * Pinecone Data Plane API + * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. + * + * The version of the OpenAPI document: 2025-01 + * Contact: support@pinecone.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.db_data.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.db_data.client.model.SearchRecordsResponseResult; +import org.openapitools.db_data.client.model.SearchUsage; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.db_data.client.JSON; + +/** + * The records search response. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") +public class SearchRecordsResponse { + public static final String SERIALIZED_NAME_RESULT = "result"; + @SerializedName(SERIALIZED_NAME_RESULT) + private SearchRecordsResponseResult result; + + public static final String SERIALIZED_NAME_USAGE = "usage"; + @SerializedName(SERIALIZED_NAME_USAGE) + private SearchUsage usage; + + public SearchRecordsResponse() { + } + + public SearchRecordsResponse result(SearchRecordsResponseResult result) { + + this.result = result; + return this; + } + + /** + * Get result + * @return result + **/ + @javax.annotation.Nonnull + public SearchRecordsResponseResult getResult() { + return result; + } + + + public void setResult(SearchRecordsResponseResult result) { + this.result = result; + } + + + public SearchRecordsResponse usage(SearchUsage usage) { + + this.usage = usage; + return this; + } + + /** + * Get usage + * @return usage + **/ + @javax.annotation.Nonnull + public SearchUsage getUsage() { + return usage; + } + + + public void setUsage(SearchUsage usage) { + this.usage = usage; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchRecordsResponse instance itself + */ + public SearchRecordsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchRecordsResponse searchRecordsResponse = (SearchRecordsResponse) o; + return Objects.equals(this.result, searchRecordsResponse.result) && + Objects.equals(this.usage, searchRecordsResponse.usage)&& + Objects.equals(this.additionalProperties, searchRecordsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(result, usage, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchRecordsResponse {\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" usage: ").append(toIndentedString(usage)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("result"); + openapiFields.add("usage"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("result"); + openapiRequiredFields.add("usage"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchRecordsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchRecordsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchRecordsResponse is not found in the empty JSON string", SearchRecordsResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SearchRecordsResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `result` + SearchRecordsResponseResult.validateJsonElement(jsonObj.get("result")); + // validate the required field `usage` + SearchUsage.validateJsonElement(jsonObj.get("usage")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchRecordsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchRecordsResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchRecordsResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchRecordsResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchRecordsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchRecordsResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SearchRecordsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchRecordsResponse + * @throws IOException if the JSON string is invalid with respect to SearchRecordsResponse + */ + public static SearchRecordsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchRecordsResponse.class); + } + + /** + * Convert an instance of SearchRecordsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/db_data/client/model/SearchRecordsResponseResult.java b/src/main/java/org/openapitools/db_data/client/model/SearchRecordsResponseResult.java new file mode 100644 index 00000000..75b40d21 --- /dev/null +++ b/src/main/java/org/openapitools/db_data/client/model/SearchRecordsResponseResult.java @@ -0,0 +1,310 @@ +/* + * Pinecone Data Plane API + * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. + * + * The version of the OpenAPI document: 2025-01 + * Contact: support@pinecone.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.db_data.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.db_data.client.model.Hit; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.db_data.client.JSON; + +/** + * SearchRecordsResponseResult + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") +public class SearchRecordsResponseResult { + public static final String SERIALIZED_NAME_HITS = "hits"; + @SerializedName(SERIALIZED_NAME_HITS) + private List hits = new ArrayList<>(); + + public SearchRecordsResponseResult() { + } + + public SearchRecordsResponseResult hits(List hits) { + + this.hits = hits; + return this; + } + + public SearchRecordsResponseResult addHitsItem(Hit hitsItem) { + if (this.hits == null) { + this.hits = new ArrayList<>(); + } + this.hits.add(hitsItem); + return this; + } + + /** + * The hits for the search document request. + * @return hits + **/ + @javax.annotation.Nonnull + public List getHits() { + return hits; + } + + + public void setHits(List hits) { + this.hits = hits; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchRecordsResponseResult instance itself + */ + public SearchRecordsResponseResult putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchRecordsResponseResult searchRecordsResponseResult = (SearchRecordsResponseResult) o; + return Objects.equals(this.hits, searchRecordsResponseResult.hits)&& + Objects.equals(this.additionalProperties, searchRecordsResponseResult.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(hits, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchRecordsResponseResult {\n"); + sb.append(" hits: ").append(toIndentedString(hits)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("hits"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("hits"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchRecordsResponseResult + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchRecordsResponseResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchRecordsResponseResult is not found in the empty JSON string", SearchRecordsResponseResult.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SearchRecordsResponseResult.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("hits").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `hits` to be an array in the JSON string but got `%s`", jsonObj.get("hits").toString())); + } + + JsonArray jsonArrayhits = jsonObj.getAsJsonArray("hits"); + // validate the required field `hits` (array) + for (int i = 0; i < jsonArrayhits.size(); i++) { + Hit.validateJsonElement(jsonArrayhits.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchRecordsResponseResult.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchRecordsResponseResult' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchRecordsResponseResult.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchRecordsResponseResult value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchRecordsResponseResult read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchRecordsResponseResult instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SearchRecordsResponseResult given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchRecordsResponseResult + * @throws IOException if the JSON string is invalid with respect to SearchRecordsResponseResult + */ + public static SearchRecordsResponseResult fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchRecordsResponseResult.class); + } + + /** + * Convert an instance of SearchRecordsResponseResult to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/db_data/client/model/SearchRecordsVector.java b/src/main/java/org/openapitools/db_data/client/model/SearchRecordsVector.java new file mode 100644 index 00000000..f86bbdb6 --- /dev/null +++ b/src/main/java/org/openapitools/db_data/client/model/SearchRecordsVector.java @@ -0,0 +1,375 @@ +/* + * Pinecone Data Plane API + * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. + * + * The version of the OpenAPI document: 2025-01 + * Contact: support@pinecone.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.db_data.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.db_data.client.JSON; + +/** + * SearchRecordsVector + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") +public class SearchRecordsVector { + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + private List values; + + public static final String SERIALIZED_NAME_SPARSE_VALUES = "sparse_values"; + @SerializedName(SERIALIZED_NAME_SPARSE_VALUES) + private List sparseValues; + + public static final String SERIALIZED_NAME_SPARSE_INDICES = "sparse_indices"; + @SerializedName(SERIALIZED_NAME_SPARSE_INDICES) + private List sparseIndices; + + public SearchRecordsVector() { + } + + public SearchRecordsVector values(List values) { + + this.values = values; + return this; + } + + public SearchRecordsVector addValuesItem(Float valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * This is the vector data included in the request. + * @return values + **/ + @javax.annotation.Nullable + public List getValues() { + return values; + } + + + public void setValues(List values) { + this.values = values; + } + + + public SearchRecordsVector sparseValues(List sparseValues) { + + this.sparseValues = sparseValues; + return this; + } + + public SearchRecordsVector addSparseValuesItem(Float sparseValuesItem) { + if (this.sparseValues == null) { + this.sparseValues = new ArrayList<>(); + } + this.sparseValues.add(sparseValuesItem); + return this; + } + + /** + * The sparse embedding values. + * @return sparseValues + **/ + @javax.annotation.Nullable + public List getSparseValues() { + return sparseValues; + } + + + public void setSparseValues(List sparseValues) { + this.sparseValues = sparseValues; + } + + + public SearchRecordsVector sparseIndices(List sparseIndices) { + + this.sparseIndices = sparseIndices; + return this; + } + + public SearchRecordsVector addSparseIndicesItem(Integer sparseIndicesItem) { + if (this.sparseIndices == null) { + this.sparseIndices = new ArrayList<>(); + } + this.sparseIndices.add(sparseIndicesItem); + return this; + } + + /** + * The sparse embedding indices. + * @return sparseIndices + **/ + @javax.annotation.Nullable + public List getSparseIndices() { + return sparseIndices; + } + + + public void setSparseIndices(List sparseIndices) { + this.sparseIndices = sparseIndices; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchRecordsVector instance itself + */ + public SearchRecordsVector putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchRecordsVector searchRecordsVector = (SearchRecordsVector) o; + return Objects.equals(this.values, searchRecordsVector.values) && + Objects.equals(this.sparseValues, searchRecordsVector.sparseValues) && + Objects.equals(this.sparseIndices, searchRecordsVector.sparseIndices)&& + Objects.equals(this.additionalProperties, searchRecordsVector.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(values, sparseValues, sparseIndices, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchRecordsVector {\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" sparseValues: ").append(toIndentedString(sparseValues)).append("\n"); + sb.append(" sparseIndices: ").append(toIndentedString(sparseIndices)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("values"); + openapiFields.add("sparse_values"); + openapiFields.add("sparse_indices"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchRecordsVector + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchRecordsVector.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchRecordsVector is not found in the empty JSON string", SearchRecordsVector.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("sparse_values") != null && !jsonObj.get("sparse_values").isJsonNull() && !jsonObj.get("sparse_values").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `sparse_values` to be an array in the JSON string but got `%s`", jsonObj.get("sparse_values").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("sparse_indices") != null && !jsonObj.get("sparse_indices").isJsonNull() && !jsonObj.get("sparse_indices").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `sparse_indices` to be an array in the JSON string but got `%s`", jsonObj.get("sparse_indices").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchRecordsVector.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchRecordsVector' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchRecordsVector.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchRecordsVector value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchRecordsVector read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchRecordsVector instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SearchRecordsVector given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchRecordsVector + * @throws IOException if the JSON string is invalid with respect to SearchRecordsVector + */ + public static SearchRecordsVector fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchRecordsVector.class); + } + + /** + * Convert an instance of SearchRecordsVector to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/db_data/client/model/SearchUsage.java b/src/main/java/org/openapitools/db_data/client/model/SearchUsage.java new file mode 100644 index 00000000..c1284630 --- /dev/null +++ b/src/main/java/org/openapitools/db_data/client/model/SearchUsage.java @@ -0,0 +1,348 @@ +/* + * Pinecone Data Plane API + * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. + * + * The version of the OpenAPI document: 2025-01 + * Contact: support@pinecone.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.db_data.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.db_data.client.JSON; + +/** + * SearchUsage + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") +public class SearchUsage { + public static final String SERIALIZED_NAME_READ_UNITS = "read_units"; + @SerializedName(SERIALIZED_NAME_READ_UNITS) + private Integer readUnits; + + public static final String SERIALIZED_NAME_EMBED_TOTAL_TOKENS = "embed_total_tokens"; + @SerializedName(SERIALIZED_NAME_EMBED_TOTAL_TOKENS) + private Integer embedTotalTokens; + + public static final String SERIALIZED_NAME_RERANK_UNITS = "rerank_units"; + @SerializedName(SERIALIZED_NAME_RERANK_UNITS) + private Integer rerankUnits; + + public SearchUsage() { + } + + public SearchUsage readUnits(Integer readUnits) { + + this.readUnits = readUnits; + return this; + } + + /** + * The number of read units consumed by this operation. + * minimum: 0 + * @return readUnits + **/ + @javax.annotation.Nonnull + public Integer getReadUnits() { + return readUnits; + } + + + public void setReadUnits(Integer readUnits) { + this.readUnits = readUnits; + } + + + public SearchUsage embedTotalTokens(Integer embedTotalTokens) { + + this.embedTotalTokens = embedTotalTokens; + return this; + } + + /** + * The number of embedding tokens consumed by this operation. + * minimum: 0 + * @return embedTotalTokens + **/ + @javax.annotation.Nullable + public Integer getEmbedTotalTokens() { + return embedTotalTokens; + } + + + public void setEmbedTotalTokens(Integer embedTotalTokens) { + this.embedTotalTokens = embedTotalTokens; + } + + + public SearchUsage rerankUnits(Integer rerankUnits) { + + this.rerankUnits = rerankUnits; + return this; + } + + /** + * The number of rerank units consumed by this operation. + * minimum: 0 + * @return rerankUnits + **/ + @javax.annotation.Nullable + public Integer getRerankUnits() { + return rerankUnits; + } + + + public void setRerankUnits(Integer rerankUnits) { + this.rerankUnits = rerankUnits; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchUsage instance itself + */ + public SearchUsage putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchUsage searchUsage = (SearchUsage) o; + return Objects.equals(this.readUnits, searchUsage.readUnits) && + Objects.equals(this.embedTotalTokens, searchUsage.embedTotalTokens) && + Objects.equals(this.rerankUnits, searchUsage.rerankUnits)&& + Objects.equals(this.additionalProperties, searchUsage.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(readUnits, embedTotalTokens, rerankUnits, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchUsage {\n"); + sb.append(" readUnits: ").append(toIndentedString(readUnits)).append("\n"); + sb.append(" embedTotalTokens: ").append(toIndentedString(embedTotalTokens)).append("\n"); + sb.append(" rerankUnits: ").append(toIndentedString(rerankUnits)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("read_units"); + openapiFields.add("embed_total_tokens"); + openapiFields.add("rerank_units"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("read_units"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchUsage + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchUsage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchUsage is not found in the empty JSON string", SearchUsage.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SearchUsage.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchUsage.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchUsage' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchUsage.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchUsage value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchUsage read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchUsage instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SearchUsage given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchUsage + * @throws IOException if the JSON string is invalid with respect to SearchUsage + */ + public static SearchUsage fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchUsage.class); + } + + /** + * Convert an instance of SearchUsage to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/db_data/client/model/SearchVector.java b/src/main/java/org/openapitools/db_data/client/model/SearchVector.java new file mode 100644 index 00000000..622302a0 --- /dev/null +++ b/src/main/java/org/openapitools/db_data/client/model/SearchVector.java @@ -0,0 +1,295 @@ +/* + * Pinecone Data Plane API + * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. + * + * The version of the OpenAPI document: 2025-01 + * Contact: support@pinecone.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.db_data.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.db_data.client.JSON; + +/** + * SearchVector + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") +public class SearchVector { + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + private List values; + + public SearchVector() { + } + + public SearchVector values(List values) { + + this.values = values; + return this; + } + + public SearchVector addValuesItem(Float valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * This is the vector data included in the request. + * @return values + **/ + @javax.annotation.Nullable + public List getValues() { + return values; + } + + + public void setValues(List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchVector instance itself + */ + public SearchVector putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchVector searchVector = (SearchVector) o; + return Objects.equals(this.values, searchVector.values)&& + Objects.equals(this.additionalProperties, searchVector.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchVector {\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("values"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchVector + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchVector.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchVector is not found in the empty JSON string", SearchVector.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchVector.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchVector' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchVector.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchVector value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchVector read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchVector instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SearchVector given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchVector + * @throws IOException if the JSON string is invalid with respect to SearchVector + */ + public static SearchVector fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchVector.class); + } + + /** + * Convert an instance of SearchVector to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/db_data/client/model/SingleQueryResults.java b/src/main/java/org/openapitools/db_data/client/model/SingleQueryResults.java index a3aeb918..4356dfb5 100644 --- a/src/main/java/org/openapitools/db_data/client/model/SingleQueryResults.java +++ b/src/main/java/org/openapitools/db_data/client/model/SingleQueryResults.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -52,7 +52,7 @@ /** * SingleQueryResults */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class SingleQueryResults { public static final String SERIALIZED_NAME_MATCHES = "matches"; @SerializedName(SERIALIZED_NAME_MATCHES) diff --git a/src/main/java/org/openapitools/db_data/client/model/SparseValues.java b/src/main/java/org/openapitools/db_data/client/model/SparseValues.java index 21dba26d..2e9938c8 100644 --- a/src/main/java/org/openapitools/db_data/client/model/SparseValues.java +++ b/src/main/java/org/openapitools/db_data/client/model/SparseValues.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -51,7 +51,7 @@ /** * Vector sparse data. Represented as a list of indices and a list of corresponded values, which must be with the same length. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class SparseValues { public static final String SERIALIZED_NAME_INDICES = "indices"; @SerializedName(SERIALIZED_NAME_INDICES) diff --git a/src/main/java/org/openapitools/db_data/client/model/StartImportRequest.java b/src/main/java/org/openapitools/db_data/client/model/StartImportRequest.java index 24f87f5e..ec41b91e 100644 --- a/src/main/java/org/openapitools/db_data/client/model/StartImportRequest.java +++ b/src/main/java/org/openapitools/db_data/client/model/StartImportRequest.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -50,7 +50,7 @@ /** * The request for the `start_import` operation. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class StartImportRequest { public static final String SERIALIZED_NAME_INTEGRATION_ID = "integrationId"; @SerializedName(SERIALIZED_NAME_INTEGRATION_ID) @@ -74,7 +74,7 @@ public StartImportRequest integrationId(String integrationId) { } /** - * The id of the storage integration that should be used to access the data. + * The id of the [storage integration](https://docs.pinecone.io/guides/operations/integrations/manage-storage-integrations) that should be used to access the data. * @return integrationId **/ @javax.annotation.Nullable @@ -95,7 +95,7 @@ public StartImportRequest uri(String uri) { } /** - * The URI prefix under which the data to import is available. All data within this prefix will be listed then imported into the target index. Currently only `s3://` URIs are supported. + * The [URI prefix](https://docs.pinecone.io/guides/data/understanding-imports#directory-structure) under which the data to import is available. All data within this prefix will be listed then imported into the target index. Currently only `s3://` URIs are supported. * @return uri **/ @javax.annotation.Nonnull diff --git a/src/main/java/org/openapitools/db_data/client/model/StartImportResponse.java b/src/main/java/org/openapitools/db_data/client/model/StartImportResponse.java index 78e4fc4f..2361c245 100644 --- a/src/main/java/org/openapitools/db_data/client/model/StartImportResponse.java +++ b/src/main/java/org/openapitools/db_data/client/model/StartImportResponse.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,7 +49,7 @@ /** * The response for the `start_import` operation. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class StartImportResponse { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -65,7 +65,7 @@ public StartImportResponse id(String id) { } /** - * Unique identifier for the import operations. + * Unique identifier for the import operation. * @return id **/ @javax.annotation.Nullable diff --git a/src/main/java/org/openapitools/db_data/client/model/UpdateRequest.java b/src/main/java/org/openapitools/db_data/client/model/UpdateRequest.java index 189b6276..63662cfb 100644 --- a/src/main/java/org/openapitools/db_data/client/model/UpdateRequest.java +++ b/src/main/java/org/openapitools/db_data/client/model/UpdateRequest.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -52,7 +52,7 @@ /** * The request for the `update` operation. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class UpdateRequest { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/org/openapitools/db_data/client/model/UpsertRecord.java b/src/main/java/org/openapitools/db_data/client/model/UpsertRecord.java new file mode 100644 index 00000000..d544d241 --- /dev/null +++ b/src/main/java/org/openapitools/db_data/client/model/UpsertRecord.java @@ -0,0 +1,292 @@ +/* + * Pinecone Data Plane API + * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. + * + * The version of the OpenAPI document: 2025-01 + * Contact: support@pinecone.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.db_data.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.db_data.client.JSON; + +/** + * The request for the `upsert` operation. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") +public class UpsertRecord { + public static final String SERIALIZED_NAME_ID = "_id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public UpsertRecord() { + } + + public UpsertRecord id(String id) { + + this.id = id; + return this; + } + + /** + * The unique ID of the record to upsert. Note that `id` can be used as an alias for `_id`. + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpsertRecord instance itself + */ + public UpsertRecord putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpsertRecord upsertRecord = (UpsertRecord) o; + return Objects.equals(this.id, upsertRecord.id)&& + Objects.equals(this.additionalProperties, upsertRecord.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpsertRecord {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("_id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpsertRecord + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpsertRecord.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpsertRecord is not found in the empty JSON string", UpsertRecord.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpsertRecord.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpsertRecord.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpsertRecord' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpsertRecord.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpsertRecord value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpsertRecord read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpsertRecord instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpsertRecord given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpsertRecord + * @throws IOException if the JSON string is invalid with respect to UpsertRecord + */ + public static UpsertRecord fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpsertRecord.class); + } + + /** + * Convert an instance of UpsertRecord to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/db_data/client/model/UpsertRequest.java b/src/main/java/org/openapitools/db_data/client/model/UpsertRequest.java index 18ead1c3..558312f2 100644 --- a/src/main/java/org/openapitools/db_data/client/model/UpsertRequest.java +++ b/src/main/java/org/openapitools/db_data/client/model/UpsertRequest.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -52,7 +52,7 @@ /** * The request for the `upsert` operation. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class UpsertRequest { public static final String SERIALIZED_NAME_VECTORS = "vectors"; @SerializedName(SERIALIZED_NAME_VECTORS) diff --git a/src/main/java/org/openapitools/db_data/client/model/UpsertResponse.java b/src/main/java/org/openapitools/db_data/client/model/UpsertResponse.java index e1896ce5..f5e5f095 100644 --- a/src/main/java/org/openapitools/db_data/client/model/UpsertResponse.java +++ b/src/main/java/org/openapitools/db_data/client/model/UpsertResponse.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,7 +49,7 @@ /** * The response for the `upsert` operation. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class UpsertResponse { public static final String SERIALIZED_NAME_UPSERTED_COUNT = "upsertedCount"; @SerializedName(SERIALIZED_NAME_UPSERTED_COUNT) diff --git a/src/main/java/org/openapitools/db_data/client/model/Usage.java b/src/main/java/org/openapitools/db_data/client/model/Usage.java index bdcc7525..1adaeea9 100644 --- a/src/main/java/org/openapitools/db_data/client/model/Usage.java +++ b/src/main/java/org/openapitools/db_data/client/model/Usage.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,7 +49,7 @@ /** * Usage */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class Usage { public static final String SERIALIZED_NAME_READ_UNITS = "readUnits"; @SerializedName(SERIALIZED_NAME_READ_UNITS) diff --git a/src/main/java/org/openapitools/db_data/client/model/Vector.java b/src/main/java/org/openapitools/db_data/client/model/Vector.java index 36e718c6..31a7b740 100644 --- a/src/main/java/org/openapitools/db_data/client/model/Vector.java +++ b/src/main/java/org/openapitools/db_data/client/model/Vector.java @@ -2,7 +2,7 @@ * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -52,7 +52,7 @@ /** * Vector */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:12.659110Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:20.514422Z[Etc/UTC]") public class Vector { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/org/openapitools/inference/client/ApiCallback.java b/src/main/java/org/openapitools/inference/client/ApiCallback.java index 93b61a7f..080a3160 100644 --- a/src/main/java/org/openapitools/inference/client/ApiCallback.java +++ b/src/main/java/org/openapitools/inference/client/ApiCallback.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/inference/client/ApiClient.java b/src/main/java/org/openapitools/inference/client/ApiClient.java index 6f5ff5df..04ecd65e 100644 --- a/src/main/java/org/openapitools/inference/client/ApiClient.java +++ b/src/main/java/org/openapitools/inference/client/ApiClient.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -140,7 +140,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2024-10/java"); + setUserAgent("OpenAPI-Generator/2025-01/java"); authentications = new HashMap(); } diff --git a/src/main/java/org/openapitools/inference/client/ApiException.java b/src/main/java/org/openapitools/inference/client/ApiException.java index 3097e34e..3c64b892 100644 --- a/src/main/java/org/openapitools/inference/client/ApiException.java +++ b/src/main/java/org/openapitools/inference/client/ApiException.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:14.512003Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:22.280429Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/org/openapitools/inference/client/ApiResponse.java b/src/main/java/org/openapitools/inference/client/ApiResponse.java index a4acf8c5..f244e60c 100644 --- a/src/main/java/org/openapitools/inference/client/ApiResponse.java +++ b/src/main/java/org/openapitools/inference/client/ApiResponse.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/inference/client/Configuration.java b/src/main/java/org/openapitools/inference/client/Configuration.java index 3eb50371..e02463bc 100644 --- a/src/main/java/org/openapitools/inference/client/Configuration.java +++ b/src/main/java/org/openapitools/inference/client/Configuration.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,9 +13,9 @@ package org.openapitools.inference.client; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:14.512003Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:22.280429Z[Etc/UTC]") public class Configuration { - public static final String VERSION = "2024-10"; + public static final String VERSION = "2025-01"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/org/openapitools/inference/client/GzipRequestInterceptor.java b/src/main/java/org/openapitools/inference/client/GzipRequestInterceptor.java index a72ee6c1..202ae52e 100644 --- a/src/main/java/org/openapitools/inference/client/GzipRequestInterceptor.java +++ b/src/main/java/org/openapitools/inference/client/GzipRequestInterceptor.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/inference/client/JSON.java b/src/main/java/org/openapitools/inference/client/JSON.java index 15fdbc69..7b8a6c51 100644 --- a/src/main/java/org/openapitools/inference/client/JSON.java +++ b/src/main/java/org/openapitools/inference/client/JSON.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -58,6 +58,19 @@ public class JSON { @SuppressWarnings("unchecked") public static GsonBuilder createGson() { GsonFireBuilder fireBuilder = new GsonFireBuilder() + .registerTypeSelector(org.openapitools.inference.client.model.Embedding.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("DenseEmbedding", org.openapitools.inference.client.model.DenseEmbedding.class); + classByDiscriminatorValue.put("SparseEmbedding", org.openapitools.inference.client.model.SparseEmbedding.class); + classByDiscriminatorValue.put("dense", org.openapitools.inference.client.model.DenseEmbedding.class); + classByDiscriminatorValue.put("sparse", org.openapitools.inference.client.model.SparseEmbedding.class); + classByDiscriminatorValue.put("Embedding", org.openapitools.inference.client.model.Embedding.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "vector_type")); + } + }) ; GsonBuilder builder = fireBuilder.createGsonBuilder(); return builder; @@ -93,9 +106,9 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.inference.client.model.DenseEmbedding.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.inference.client.model.EmbedRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.inference.client.model.EmbedRequestInputsInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.inference.client.model.EmbedRequestParameters.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.inference.client.model.Embedding.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.inference.client.model.EmbeddingsList.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.inference.client.model.EmbeddingsListUsage.CustomTypeAdapterFactory()); @@ -105,6 +118,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.inference.client.model.RerankRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.inference.client.model.RerankResult.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.inference.client.model.RerankResultUsage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.inference.client.model.SparseEmbedding.CustomTypeAdapterFactory()); gson = gsonBuilder.create(); } diff --git a/src/main/java/org/openapitools/inference/client/Pair.java b/src/main/java/org/openapitools/inference/client/Pair.java index cadff10d..b0be8a72 100644 --- a/src/main/java/org/openapitools/inference/client/Pair.java +++ b/src/main/java/org/openapitools/inference/client/Pair.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,7 @@ package org.openapitools.inference.client; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:14.512003Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:22.280429Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/org/openapitools/inference/client/ProgressRequestBody.java b/src/main/java/org/openapitools/inference/client/ProgressRequestBody.java index b74786bf..3e601627 100644 --- a/src/main/java/org/openapitools/inference/client/ProgressRequestBody.java +++ b/src/main/java/org/openapitools/inference/client/ProgressRequestBody.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/inference/client/ProgressResponseBody.java b/src/main/java/org/openapitools/inference/client/ProgressResponseBody.java index a0456d0d..d3b6b62a 100644 --- a/src/main/java/org/openapitools/inference/client/ProgressResponseBody.java +++ b/src/main/java/org/openapitools/inference/client/ProgressResponseBody.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/inference/client/StringUtil.java b/src/main/java/org/openapitools/inference/client/StringUtil.java index 29d252de..e9191e6a 100644 --- a/src/main/java/org/openapitools/inference/client/StringUtil.java +++ b/src/main/java/org/openapitools/inference/client/StringUtil.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:14.512003Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:22.280429Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/org/openapitools/inference/client/api/InferenceApi.java b/src/main/java/org/openapitools/inference/client/api/InferenceApi.java index 22d796eb..03e37b6d 100644 --- a/src/main/java/org/openapitools/inference/client/api/InferenceApi.java +++ b/src/main/java/org/openapitools/inference/client/api/InferenceApi.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/inference/client/auth/ApiKeyAuth.java b/src/main/java/org/openapitools/inference/client/auth/ApiKeyAuth.java index 9aa87476..11e166b7 100644 --- a/src/main/java/org/openapitools/inference/client/auth/ApiKeyAuth.java +++ b/src/main/java/org/openapitools/inference/client/auth/ApiKeyAuth.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:14.512003Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:22.280429Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/org/openapitools/inference/client/auth/Authentication.java b/src/main/java/org/openapitools/inference/client/auth/Authentication.java index 684ecb51..2090a895 100644 --- a/src/main/java/org/openapitools/inference/client/auth/Authentication.java +++ b/src/main/java/org/openapitools/inference/client/auth/Authentication.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/inference/client/auth/HttpBasicAuth.java b/src/main/java/org/openapitools/inference/client/auth/HttpBasicAuth.java index e492e849..815b68f0 100644 --- a/src/main/java/org/openapitools/inference/client/auth/HttpBasicAuth.java +++ b/src/main/java/org/openapitools/inference/client/auth/HttpBasicAuth.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/inference/client/auth/HttpBearerAuth.java b/src/main/java/org/openapitools/inference/client/auth/HttpBearerAuth.java index 6f63b7c1..b5c001f1 100644 --- a/src/main/java/org/openapitools/inference/client/auth/HttpBearerAuth.java +++ b/src/main/java/org/openapitools/inference/client/auth/HttpBearerAuth.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:14.512003Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:22.280429Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private String bearerToken; diff --git a/src/main/java/org/openapitools/inference/client/model/AbstractOpenApiSchema.java b/src/main/java/org/openapitools/inference/client/model/AbstractOpenApiSchema.java index 936231f3..4affa012 100644 --- a/src/main/java/org/openapitools/inference/client/model/AbstractOpenApiSchema.java +++ b/src/main/java/org/openapitools/inference/client/model/AbstractOpenApiSchema.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,7 +23,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:14.512003Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:22.280429Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/org/openapitools/inference/client/model/EmbedRequestParameters.java b/src/main/java/org/openapitools/inference/client/model/DenseEmbedding.java similarity index 65% rename from src/main/java/org/openapitools/inference/client/model/EmbedRequestParameters.java rename to src/main/java/org/openapitools/inference/client/model/DenseEmbedding.java index ac7fa1d1..946c46b0 100644 --- a/src/main/java/org/openapitools/inference/client/model/EmbedRequestParameters.java +++ b/src/main/java/org/openapitools/inference/client/model/DenseEmbedding.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -20,7 +20,10 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; +import org.openapitools.inference.client.model.VectorType; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -47,60 +50,68 @@ import org.openapitools.inference.client.JSON; /** - * Model-specific parameters. + * A dense embedding of a single input */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:14.512003Z[Etc/UTC]") -public class EmbedRequestParameters { - public static final String SERIALIZED_NAME_INPUT_TYPE = "input_type"; - @SerializedName(SERIALIZED_NAME_INPUT_TYPE) - private String inputType; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:22.280429Z[Etc/UTC]") +public class DenseEmbedding { + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + private List values = new ArrayList<>(); - public static final String SERIALIZED_NAME_TRUNCATE = "truncate"; - @SerializedName(SERIALIZED_NAME_TRUNCATE) - private String truncate = "END"; + public static final String SERIALIZED_NAME_VECTOR_TYPE = "vector_type"; + @SerializedName(SERIALIZED_NAME_VECTOR_TYPE) + private VectorType vectorType; - public EmbedRequestParameters() { + public DenseEmbedding() { } - public EmbedRequestParameters inputType(String inputType) { + public DenseEmbedding values(List values) { - this.inputType = inputType; + this.values = values; + return this; + } + + public DenseEmbedding addValuesItem(Float valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); return this; } /** - * Common property used to distinguish between types of data. - * @return inputType + * The dense embedding values. + * @return values **/ - @javax.annotation.Nullable - public String getInputType() { - return inputType; + @javax.annotation.Nonnull + public List getValues() { + return values; } - public void setInputType(String inputType) { - this.inputType = inputType; + public void setValues(List values) { + this.values = values; } - public EmbedRequestParameters truncate(String truncate) { + public DenseEmbedding vectorType(VectorType vectorType) { - this.truncate = truncate; + this.vectorType = vectorType; return this; } /** - * How to handle inputs longer than those supported by the model. If `\"END\"`, truncate the input sequence at the token limit. If `\"NONE\"`, return an error when the input exceeds the token limit. - * @return truncate + * Get vectorType + * @return vectorType **/ - @javax.annotation.Nullable - public String getTruncate() { - return truncate; + @javax.annotation.Nonnull + public VectorType getVectorType() { + return vectorType; } - public void setTruncate(String truncate) { - this.truncate = truncate; + public void setVectorType(VectorType vectorType) { + this.vectorType = vectorType; } /** @@ -116,9 +127,9 @@ public void setTruncate(String truncate) { * * @param key name of the property * @param value value of the property - * @return the EmbedRequestParameters instance itself + * @return the DenseEmbedding instance itself */ - public EmbedRequestParameters putAdditionalProperty(String key, Object value) { + public DenseEmbedding putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -157,23 +168,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - EmbedRequestParameters embedRequestParameters = (EmbedRequestParameters) o; - return Objects.equals(this.inputType, embedRequestParameters.inputType) && - Objects.equals(this.truncate, embedRequestParameters.truncate)&& - Objects.equals(this.additionalProperties, embedRequestParameters.additionalProperties); + DenseEmbedding denseEmbedding = (DenseEmbedding) o; + return Objects.equals(this.values, denseEmbedding.values) && + Objects.equals(this.vectorType, denseEmbedding.vectorType)&& + Objects.equals(this.additionalProperties, denseEmbedding.additionalProperties); } @Override public int hashCode() { - return Objects.hash(inputType, truncate, additionalProperties); + return Objects.hash(values, vectorType, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class EmbedRequestParameters {\n"); - sb.append(" inputType: ").append(toIndentedString(inputType)).append("\n"); - sb.append(" truncate: ").append(toIndentedString(truncate)).append("\n"); + sb.append("class DenseEmbedding {\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" vectorType: ").append(toIndentedString(vectorType)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -197,31 +208,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("input_type"); - openapiFields.add("truncate"); + openapiFields.add("values"); + openapiFields.add("vector_type"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("values"); + openapiRequiredFields.add("vector_type"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to EmbedRequestParameters + * @throws IOException if the JSON Element is invalid with respect to DenseEmbedding */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!EmbedRequestParameters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in EmbedRequestParameters is not found in the empty JSON string", EmbedRequestParameters.openapiRequiredFields.toString())); + if (!DenseEmbedding.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DenseEmbedding is not found in the empty JSON string", DenseEmbedding.openapiRequiredFields.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("input_type") != null && !jsonObj.get("input_type").isJsonNull()) && !jsonObj.get("input_type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `input_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("input_type").toString())); + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DenseEmbedding.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } } - if ((jsonObj.get("truncate") != null && !jsonObj.get("truncate").isJsonNull()) && !jsonObj.get("truncate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `truncate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("truncate").toString())); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("values") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); } } @@ -229,16 +249,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!EmbedRequestParameters.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'EmbedRequestParameters' and its subtypes + if (!DenseEmbedding.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DenseEmbedding' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(EmbedRequestParameters.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DenseEmbedding.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, EmbedRequestParameters value) throws IOException { + public void write(JsonWriter out, DenseEmbedding value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -261,12 +281,12 @@ else if (entry.getValue() instanceof Character) } @Override - public EmbedRequestParameters read(JsonReader in) throws IOException { + public DenseEmbedding read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - EmbedRequestParameters instance = thisAdapter.fromJsonTree(jsonObj); + DenseEmbedding instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -293,18 +313,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of EmbedRequestParameters given an JSON string + * Create an instance of DenseEmbedding given an JSON string * * @param jsonString JSON string - * @return An instance of EmbedRequestParameters - * @throws IOException if the JSON string is invalid with respect to EmbedRequestParameters + * @return An instance of DenseEmbedding + * @throws IOException if the JSON string is invalid with respect to DenseEmbedding */ - public static EmbedRequestParameters fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, EmbedRequestParameters.class); + public static DenseEmbedding fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DenseEmbedding.class); } /** - * Convert an instance of EmbedRequestParameters to an JSON string + * Convert an instance of DenseEmbedding to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/inference/client/model/EmbedRequest.java b/src/main/java/org/openapitools/inference/client/model/EmbedRequest.java index 65ef7a94..577b454b 100644 --- a/src/main/java/org/openapitools/inference/client/model/EmbedRequest.java +++ b/src/main/java/org/openapitools/inference/client/model/EmbedRequest.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -22,9 +22,10 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; +import java.util.Map; import org.openapitools.inference.client.model.EmbedRequestInputsInner; -import org.openapitools.inference.client.model.EmbedRequestParameters; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -53,7 +54,7 @@ /** * EmbedRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:14.512003Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:22.280429Z[Etc/UTC]") public class EmbedRequest { public static final String SERIALIZED_NAME_MODEL = "model"; @SerializedName(SERIALIZED_NAME_MODEL) @@ -61,7 +62,7 @@ public class EmbedRequest { public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; @SerializedName(SERIALIZED_NAME_PARAMETERS) - private EmbedRequestParameters parameters; + private Map parameters = new HashMap<>(); public static final String SERIALIZED_NAME_INPUTS = "inputs"; @SerializedName(SERIALIZED_NAME_INPUTS) @@ -77,7 +78,7 @@ public EmbedRequest model(String model) { } /** - * The [model](https://docs.pinecone.io/guides/inference/understanding-inference#models) to use for embedding generation. + * The [model](https://docs.pinecone.io/guides/inference/understanding-inference#embedding-models) to use for embedding generation. * @return model **/ @javax.annotation.Nonnull @@ -91,23 +92,31 @@ public void setModel(String model) { } - public EmbedRequest parameters(EmbedRequestParameters parameters) { + public EmbedRequest parameters(Map parameters) { this.parameters = parameters; return this; } + public EmbedRequest putParametersItem(String key, Object parametersItem) { + if (this.parameters == null) { + this.parameters = new HashMap<>(); + } + this.parameters.put(key, parametersItem); + return this; + } + /** - * Get parameters + * Additional model-specific parameters. Refer to the [model guide](https://docs.pinecone.io/guides/inference/understanding-inference#embedding-models) for available model parameters. * @return parameters **/ @javax.annotation.Nullable - public EmbedRequestParameters getParameters() { + public Map getParameters() { return parameters; } - public void setParameters(EmbedRequestParameters parameters) { + public void setParameters(Map parameters) { this.parameters = parameters; } @@ -269,10 +278,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("model").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `model` to be a primitive type in the JSON string but got `%s`", jsonObj.get("model").toString())); } - // validate the optional field `parameters` - if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) { - EmbedRequestParameters.validateJsonElement(jsonObj.get("parameters")); - } // ensure the json data is an array if (!jsonObj.get("inputs").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `inputs` to be an array in the JSON string but got `%s`", jsonObj.get("inputs").toString())); diff --git a/src/main/java/org/openapitools/inference/client/model/EmbedRequestInputsInner.java b/src/main/java/org/openapitools/inference/client/model/EmbedRequestInputsInner.java index dbf75620..187b3437 100644 --- a/src/main/java/org/openapitools/inference/client/model/EmbedRequestInputsInner.java +++ b/src/main/java/org/openapitools/inference/client/model/EmbedRequestInputsInner.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,7 +49,7 @@ /** * EmbedRequestInputsInner */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:14.512003Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:22.280429Z[Etc/UTC]") public class EmbedRequestInputsInner { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) diff --git a/src/main/java/org/openapitools/inference/client/model/Embedding.java b/src/main/java/org/openapitools/inference/client/model/Embedding.java index 1201f62a..6f2a6107 100644 --- a/src/main/java/org/openapitools/inference/client/model/Embedding.java +++ b/src/main/java/org/openapitools/inference/client/model/Embedding.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -20,172 +20,212 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.math.BigDecimal; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.openapitools.inference.client.model.DenseEmbedding; +import org.openapitools.inference.client.model.SparseEmbedding; +import org.openapitools.inference.client.model.VectorType; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; import org.openapitools.inference.client.JSON; -/** - * Embedding of a single input - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:14.512003Z[Etc/UTC]") -public class Embedding { - public static final String SERIALIZED_NAME_VALUES = "values"; - @SerializedName(SERIALIZED_NAME_VALUES) - private List values; - - public Embedding() { - } - - public Embedding values(List values) { - - this.values = values; - return this; - } - - public Embedding addValuesItem(BigDecimal valuesItem) { - if (this.values == null) { - this.values = new ArrayList<>(); +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:22.280429Z[Etc/UTC]") +public class Embedding extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(Embedding.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Embedding.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Embedding' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterDenseEmbedding = gson.getDelegateAdapter(this, TypeToken.get(DenseEmbedding.class)); + final TypeAdapter adapterSparseEmbedding = gson.getDelegateAdapter(this, TypeToken.get(SparseEmbedding.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Embedding value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `DenseEmbedding` + if (value.getActualInstance() instanceof DenseEmbedding) { + JsonElement element = adapterDenseEmbedding.toJsonTree((DenseEmbedding)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `SparseEmbedding` + if (value.getActualInstance() instanceof SparseEmbedding) { + JsonElement element = adapterSparseEmbedding.toJsonTree((SparseEmbedding)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: DenseEmbedding, SparseEmbedding"); + } + + @Override + public Embedding read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize DenseEmbedding + try { + // validate the JSON object to see if any exception is thrown + DenseEmbedding.validateJsonElement(jsonElement); + actualAdapter = adapterDenseEmbedding; + match++; + log.log(Level.FINER, "Input data matches schema 'DenseEmbedding'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for DenseEmbedding failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'DenseEmbedding'", e); + } + // deserialize SparseEmbedding + try { + // validate the JSON object to see if any exception is thrown + SparseEmbedding.validateJsonElement(jsonElement); + actualAdapter = adapterSparseEmbedding; + match++; + log.log(Level.FINER, "Input data matches schema 'SparseEmbedding'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for SparseEmbedding failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'SparseEmbedding'", e); + } + + if (match == 1) { + Embedding ret = new Embedding(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException(String.format("Failed deserialization for Embedding: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } } - this.values.add(valuesItem); - return this; - } - /** - * The embedding values. - * @return values - **/ - @javax.annotation.Nullable - public List getValues() { - return values; - } + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); - - public void setValues(List values) { - this.values = values; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Embedding instance itself - */ - public Embedding putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); + public Embedding() { + super("oneOf", Boolean.FALSE); } - this.additionalProperties.put(key, value); - return this; - } - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; + public Embedding(DenseEmbedding o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - return this.additionalProperties.get(key); - } + public Embedding(SparseEmbedding o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + static { + schemas.put("DenseEmbedding", DenseEmbedding.class); + schemas.put("SparseEmbedding", SparseEmbedding.class); } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public Map> getSchemas() { + return Embedding.schemas; } - Embedding embedding = (Embedding) o; - return Objects.equals(this.values, embedding.values)&& - Objects.equals(this.additionalProperties, embedding.additionalProperties); - } - @Override - public int hashCode() { - return Objects.hash(values, additionalProperties); - } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * DenseEmbedding, SparseEmbedding + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof DenseEmbedding) { + super.setActualInstance(instance); + return; + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Embedding {\n"); - sb.append(" values: ").append(toIndentedString(values)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } + if (instance instanceof SparseEmbedding) { + super.setActualInstance(instance); + return; + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + throw new RuntimeException("Invalid instance type. Must be DenseEmbedding, SparseEmbedding"); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("values"); + /** + * Get the actual instance, which can be the following: + * DenseEmbedding, SparseEmbedding + * + * @return The actual instance (DenseEmbedding, SparseEmbedding) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } + /** + * Get the actual instance of `DenseEmbedding`. If the actual instance is not `DenseEmbedding`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `DenseEmbedding` + * @throws ClassCastException if the instance is not `DenseEmbedding` + */ + public DenseEmbedding getDenseEmbedding() throws ClassCastException { + return (DenseEmbedding)super.getActualInstance(); + } + /** + * Get the actual instance of `SparseEmbedding`. If the actual instance is not `SparseEmbedding`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SparseEmbedding` + * @throws ClassCastException if the instance is not `SparseEmbedding` + */ + public SparseEmbedding getSparseEmbedding() throws ClassCastException { + return (SparseEmbedding)super.getActualInstance(); + } /** * Validates the JSON Element and throws an exception if issues found @@ -194,82 +234,27 @@ private String toIndentedString(Object o) { * @throws IOException if the JSON Element is invalid with respect to Embedding */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Embedding.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Embedding is not found in the empty JSON string", Embedding.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Embedding.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Embedding' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Embedding.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Embedding value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Embedding read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Embedding instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with DenseEmbedding + try { + DenseEmbedding.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for DenseEmbedding failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with SparseEmbedding + try { + SparseEmbedding.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for SparseEmbedding failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException(String.format("The JSON string is invalid for Embedding with oneOf schemas: DenseEmbedding, SparseEmbedding. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } diff --git a/src/main/java/org/openapitools/inference/client/model/EmbeddingsList.java b/src/main/java/org/openapitools/inference/client/model/EmbeddingsList.java index 2f571706..bc861c0a 100644 --- a/src/main/java/org/openapitools/inference/client/model/EmbeddingsList.java +++ b/src/main/java/org/openapitools/inference/client/model/EmbeddingsList.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -51,14 +51,18 @@ import org.openapitools.inference.client.JSON; /** - * Embeddings generated for the input + * Embeddings generated for the input. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:14.512003Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:22.280429Z[Etc/UTC]") public class EmbeddingsList { public static final String SERIALIZED_NAME_MODEL = "model"; @SerializedName(SERIALIZED_NAME_MODEL) private String model; + public static final String SERIALIZED_NAME_VECTOR_TYPE = "vector_type"; + @SerializedName(SERIALIZED_NAME_VECTOR_TYPE) + private String vectorType; + public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) private List data = new ArrayList<>(); @@ -91,6 +95,27 @@ public void setModel(String model) { } + public EmbeddingsList vectorType(String vectorType) { + + this.vectorType = vectorType; + return this; + } + + /** + * Indicates whether the response data contains 'dense' or 'sparse' embeddings. + * @return vectorType + **/ + @javax.annotation.Nonnull + public String getVectorType() { + return vectorType; + } + + + public void setVectorType(String vectorType) { + this.vectorType = vectorType; + } + + public EmbeddingsList data(List data) { this.data = data; @@ -196,6 +221,7 @@ public boolean equals(Object o) { } EmbeddingsList embeddingsList = (EmbeddingsList) o; return Objects.equals(this.model, embeddingsList.model) && + Objects.equals(this.vectorType, embeddingsList.vectorType) && Objects.equals(this.data, embeddingsList.data) && Objects.equals(this.usage, embeddingsList.usage)&& Objects.equals(this.additionalProperties, embeddingsList.additionalProperties); @@ -203,7 +229,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(model, data, usage, additionalProperties); + return Objects.hash(model, vectorType, data, usage, additionalProperties); } @Override @@ -211,6 +237,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EmbeddingsList {\n"); sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" vectorType: ").append(toIndentedString(vectorType)).append("\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" usage: ").append(toIndentedString(usage)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); @@ -237,12 +264,14 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("model"); + openapiFields.add("vector_type"); openapiFields.add("data"); openapiFields.add("usage"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("model"); + openapiRequiredFields.add("vector_type"); openapiRequiredFields.add("data"); openapiRequiredFields.add("usage"); } @@ -270,6 +299,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("model").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `model` to be a primitive type in the JSON string but got `%s`", jsonObj.get("model").toString())); } + if (!jsonObj.get("vector_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vector_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vector_type").toString())); + } // ensure the json data is an array if (!jsonObj.get("data").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); diff --git a/src/main/java/org/openapitools/inference/client/model/EmbeddingsListUsage.java b/src/main/java/org/openapitools/inference/client/model/EmbeddingsListUsage.java index a103e0cb..54128e44 100644 --- a/src/main/java/org/openapitools/inference/client/model/EmbeddingsListUsage.java +++ b/src/main/java/org/openapitools/inference/client/model/EmbeddingsListUsage.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,7 +49,7 @@ /** * Usage statistics for the model inference. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:14.512003Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:22.280429Z[Etc/UTC]") public class EmbeddingsListUsage { public static final String SERIALIZED_NAME_TOTAL_TOKENS = "total_tokens"; @SerializedName(SERIALIZED_NAME_TOTAL_TOKENS) @@ -66,6 +66,7 @@ public EmbeddingsListUsage totalTokens(Integer totalTokens) { /** * Total number of tokens consumed across all inputs. + * minimum: 0 * @return totalTokens **/ @javax.annotation.Nullable diff --git a/src/main/java/org/openapitools/inference/client/model/ErrorResponse.java b/src/main/java/org/openapitools/inference/client/model/ErrorResponse.java index 89ed44df..5cd55da2 100644 --- a/src/main/java/org/openapitools/inference/client/model/ErrorResponse.java +++ b/src/main/java/org/openapitools/inference/client/model/ErrorResponse.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -50,7 +50,7 @@ /** * The response shape used for all error responses. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:14.512003Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:22.280429Z[Etc/UTC]") public class ErrorResponse { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) diff --git a/src/main/java/org/openapitools/inference/client/model/ErrorResponseError.java b/src/main/java/org/openapitools/inference/client/model/ErrorResponseError.java index 096204ec..29c52f3b 100644 --- a/src/main/java/org/openapitools/inference/client/model/ErrorResponseError.java +++ b/src/main/java/org/openapitools/inference/client/model/ErrorResponseError.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,7 +49,7 @@ /** * Detailed information about the error that occurred. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:14.512003Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:22.280429Z[Etc/UTC]") public class ErrorResponseError { /** * Gets or Sets code diff --git a/src/main/java/org/openapitools/inference/client/model/RankedDocument.java b/src/main/java/org/openapitools/inference/client/model/RankedDocument.java index 3a34d348..8a7c463e 100644 --- a/src/main/java/org/openapitools/inference/client/model/RankedDocument.java +++ b/src/main/java/org/openapitools/inference/client/model/RankedDocument.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -52,7 +52,7 @@ /** * A ranked document with a relevance score and an index position. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:14.512003Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:22.280429Z[Etc/UTC]") public class RankedDocument { public static final String SERIALIZED_NAME_INDEX = "index"; @SerializedName(SERIALIZED_NAME_INDEX) @@ -64,7 +64,7 @@ public class RankedDocument { public static final String SERIALIZED_NAME_DOCUMENT = "document"; @SerializedName(SERIALIZED_NAME_DOCUMENT) - private Map document = new HashMap<>(); + private Map document = new HashMap<>(); public RankedDocument() { } @@ -76,7 +76,7 @@ public RankedDocument index(Integer index) { } /** - * The index of the document + * The index position of the document from the original request. * @return index **/ @javax.annotation.Nonnull @@ -97,7 +97,7 @@ public RankedDocument score(BigDecimal score) { } /** - * The relevance score of the document normalized between 0 and 1. + * The relevance of the document to the query, normalized between 0 and 1, with scores closer to 1 indicating higher relevance. * @return score **/ @javax.annotation.Nonnull @@ -111,13 +111,13 @@ public void setScore(BigDecimal score) { } - public RankedDocument document(Map document) { + public RankedDocument document(Map document) { this.document = document; return this; } - public RankedDocument putDocumentItem(String key, String documentItem) { + public RankedDocument putDocumentItem(String key, Object documentItem) { if (this.document == null) { this.document = new HashMap<>(); } @@ -130,12 +130,12 @@ public RankedDocument putDocumentItem(String key, String documentItem) { * @return document **/ @javax.annotation.Nullable - public Map getDocument() { + public Map getDocument() { return document; } - public void setDocument(Map document) { + public void setDocument(Map document) { this.document = document; } diff --git a/src/main/java/org/openapitools/inference/client/model/RerankRequest.java b/src/main/java/org/openapitools/inference/client/model/RerankRequest.java index 2469d83e..f3ca4acc 100644 --- a/src/main/java/org/openapitools/inference/client/model/RerankRequest.java +++ b/src/main/java/org/openapitools/inference/client/model/RerankRequest.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -53,7 +53,7 @@ /** * RerankRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:14.512003Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:22.280429Z[Etc/UTC]") public class RerankRequest { public static final String SERIALIZED_NAME_MODEL = "model"; @SerializedName(SERIALIZED_NAME_MODEL) @@ -77,11 +77,11 @@ public class RerankRequest { public static final String SERIALIZED_NAME_DOCUMENTS = "documents"; @SerializedName(SERIALIZED_NAME_DOCUMENTS) - private List> documents = new ArrayList<>(); + private List> documents = new ArrayList<>(); public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; @SerializedName(SERIALIZED_NAME_PARAMETERS) - private Map parameters = new HashMap<>(); + private Map parameters = new HashMap<>(); public RerankRequest() { } @@ -93,7 +93,7 @@ public RerankRequest model(String model) { } /** - * The [model](https://docs.pinecone.io/guides/inference/understanding-inference#models) to use for reranking. + * The [model](https://docs.pinecone.io/guides/inference/understanding-inference#reranking-models) to use for reranking. * @return model **/ @javax.annotation.Nonnull @@ -185,7 +185,7 @@ public RerankRequest addRankFieldsItem(String rankFieldsItem) { } /** - * The fields to rank the documents by. If not provided, the default is `\"text\"`. + * The fields to rank the documents by. If not provided, the default is `\"text\"`. * @return rankFields **/ @javax.annotation.Nullable @@ -199,13 +199,13 @@ public void setRankFields(List rankFields) { } - public RerankRequest documents(List> documents) { + public RerankRequest documents(List> documents) { this.documents = documents; return this; } - public RerankRequest addDocumentsItem(Map documentsItem) { + public RerankRequest addDocumentsItem(Map documentsItem) { if (this.documents == null) { this.documents = new ArrayList<>(); } @@ -218,23 +218,23 @@ public RerankRequest addDocumentsItem(Map documentsItem) { * @return documents **/ @javax.annotation.Nonnull - public List> getDocuments() { + public List> getDocuments() { return documents; } - public void setDocuments(List> documents) { + public void setDocuments(List> documents) { this.documents = documents; } - public RerankRequest parameters(Map parameters) { + public RerankRequest parameters(Map parameters) { this.parameters = parameters; return this; } - public RerankRequest putParametersItem(String key, String parametersItem) { + public RerankRequest putParametersItem(String key, Object parametersItem) { if (this.parameters == null) { this.parameters = new HashMap<>(); } @@ -243,16 +243,16 @@ public RerankRequest putParametersItem(String key, String parametersItem) { } /** - * Additional model-specific parameters for the reranker. + * Additional model-specific parameters. Refer to the [model guide](https://docs.pinecone.io/guides/inference/understanding-inference#reranking-models) for available model parameters. * @return parameters **/ @javax.annotation.Nullable - public Map getParameters() { + public Map getParameters() { return parameters; } - public void setParameters(Map parameters) { + public void setParameters(Map parameters) { this.parameters = parameters; } diff --git a/src/main/java/org/openapitools/inference/client/model/RerankResult.java b/src/main/java/org/openapitools/inference/client/model/RerankResult.java index da27053c..0d7398af 100644 --- a/src/main/java/org/openapitools/inference/client/model/RerankResult.java +++ b/src/main/java/org/openapitools/inference/client/model/RerankResult.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -53,7 +53,7 @@ /** * The result of a reranking request. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:14.512003Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:22.280429Z[Etc/UTC]") public class RerankResult { public static final String SERIALIZED_NAME_MODEL = "model"; @SerializedName(SERIALIZED_NAME_MODEL) diff --git a/src/main/java/org/openapitools/inference/client/model/RerankResultUsage.java b/src/main/java/org/openapitools/inference/client/model/RerankResultUsage.java index df2e5f3e..462ca798 100644 --- a/src/main/java/org/openapitools/inference/client/model/RerankResultUsage.java +++ b/src/main/java/org/openapitools/inference/client/model/RerankResultUsage.java @@ -2,7 +2,7 @@ * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * - * The version of the OpenAPI document: 2024-10 + * The version of the OpenAPI document: 2025-01 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,7 +49,7 @@ /** * Usage statistics for the model inference. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:14.512003Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:22.280429Z[Etc/UTC]") public class RerankResultUsage { public static final String SERIALIZED_NAME_RERANK_UNITS = "rerank_units"; @SerializedName(SERIALIZED_NAME_RERANK_UNITS) @@ -65,7 +65,8 @@ public RerankResultUsage rerankUnits(Integer rerankUnits) { } /** - * Get rerankUnits + * The number of rerank units consumed by this operation. + * minimum: 0 * @return rerankUnits **/ @javax.annotation.Nullable diff --git a/src/main/java/org/openapitools/inference/client/model/SparseEmbedding.java b/src/main/java/org/openapitools/inference/client/model/SparseEmbedding.java new file mode 100644 index 00000000..b1252975 --- /dev/null +++ b/src/main/java/org/openapitools/inference/client/model/SparseEmbedding.java @@ -0,0 +1,418 @@ +/* + * Pinecone Inference API + * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. + * + * The version of the OpenAPI document: 2025-01 + * Contact: support@pinecone.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.inference.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.inference.client.model.VectorType; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.inference.client.JSON; + +/** + * A sparse embedding of a single input + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:22.280429Z[Etc/UTC]") +public class SparseEmbedding { + public static final String SERIALIZED_NAME_SPARSE_VALUES = "sparse_values"; + @SerializedName(SERIALIZED_NAME_SPARSE_VALUES) + private List sparseValues = new ArrayList<>(); + + public static final String SERIALIZED_NAME_SPARSE_INDICES = "sparse_indices"; + @SerializedName(SERIALIZED_NAME_SPARSE_INDICES) + private List sparseIndices = new ArrayList<>(); + + public static final String SERIALIZED_NAME_SPARSE_TOKENS = "sparse_tokens"; + @SerializedName(SERIALIZED_NAME_SPARSE_TOKENS) + private List sparseTokens; + + public static final String SERIALIZED_NAME_VECTOR_TYPE = "vector_type"; + @SerializedName(SERIALIZED_NAME_VECTOR_TYPE) + private VectorType vectorType; + + public SparseEmbedding() { + } + + public SparseEmbedding sparseValues(List sparseValues) { + + this.sparseValues = sparseValues; + return this; + } + + public SparseEmbedding addSparseValuesItem(Float sparseValuesItem) { + if (this.sparseValues == null) { + this.sparseValues = new ArrayList<>(); + } + this.sparseValues.add(sparseValuesItem); + return this; + } + + /** + * The sparse embedding values. + * @return sparseValues + **/ + @javax.annotation.Nonnull + public List getSparseValues() { + return sparseValues; + } + + + public void setSparseValues(List sparseValues) { + this.sparseValues = sparseValues; + } + + + public SparseEmbedding sparseIndices(List sparseIndices) { + + this.sparseIndices = sparseIndices; + return this; + } + + public SparseEmbedding addSparseIndicesItem(Integer sparseIndicesItem) { + if (this.sparseIndices == null) { + this.sparseIndices = new ArrayList<>(); + } + this.sparseIndices.add(sparseIndicesItem); + return this; + } + + /** + * The sparse embedding indices. + * @return sparseIndices + **/ + @javax.annotation.Nonnull + public List getSparseIndices() { + return sparseIndices; + } + + + public void setSparseIndices(List sparseIndices) { + this.sparseIndices = sparseIndices; + } + + + public SparseEmbedding sparseTokens(List sparseTokens) { + + this.sparseTokens = sparseTokens; + return this; + } + + public SparseEmbedding addSparseTokensItem(String sparseTokensItem) { + if (this.sparseTokens == null) { + this.sparseTokens = new ArrayList<>(); + } + this.sparseTokens.add(sparseTokensItem); + return this; + } + + /** + * The normalized tokens used to create the sparse embedding. + * @return sparseTokens + **/ + @javax.annotation.Nullable + public List getSparseTokens() { + return sparseTokens; + } + + + public void setSparseTokens(List sparseTokens) { + this.sparseTokens = sparseTokens; + } + + + public SparseEmbedding vectorType(VectorType vectorType) { + + this.vectorType = vectorType; + return this; + } + + /** + * Get vectorType + * @return vectorType + **/ + @javax.annotation.Nonnull + public VectorType getVectorType() { + return vectorType; + } + + + public void setVectorType(VectorType vectorType) { + this.vectorType = vectorType; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SparseEmbedding instance itself + */ + public SparseEmbedding putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SparseEmbedding sparseEmbedding = (SparseEmbedding) o; + return Objects.equals(this.sparseValues, sparseEmbedding.sparseValues) && + Objects.equals(this.sparseIndices, sparseEmbedding.sparseIndices) && + Objects.equals(this.sparseTokens, sparseEmbedding.sparseTokens) && + Objects.equals(this.vectorType, sparseEmbedding.vectorType)&& + Objects.equals(this.additionalProperties, sparseEmbedding.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(sparseValues, sparseIndices, sparseTokens, vectorType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SparseEmbedding {\n"); + sb.append(" sparseValues: ").append(toIndentedString(sparseValues)).append("\n"); + sb.append(" sparseIndices: ").append(toIndentedString(sparseIndices)).append("\n"); + sb.append(" sparseTokens: ").append(toIndentedString(sparseTokens)).append("\n"); + sb.append(" vectorType: ").append(toIndentedString(vectorType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("sparse_values"); + openapiFields.add("sparse_indices"); + openapiFields.add("sparse_tokens"); + openapiFields.add("vector_type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("sparse_values"); + openapiRequiredFields.add("sparse_indices"); + openapiRequiredFields.add("vector_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SparseEmbedding + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SparseEmbedding.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SparseEmbedding is not found in the empty JSON string", SparseEmbedding.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SparseEmbedding.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("sparse_values") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("sparse_values").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `sparse_values` to be an array in the JSON string but got `%s`", jsonObj.get("sparse_values").toString())); + } + // ensure the required json array is present + if (jsonObj.get("sparse_indices") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("sparse_indices").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `sparse_indices` to be an array in the JSON string but got `%s`", jsonObj.get("sparse_indices").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("sparse_tokens") != null && !jsonObj.get("sparse_tokens").isJsonNull() && !jsonObj.get("sparse_tokens").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `sparse_tokens` to be an array in the JSON string but got `%s`", jsonObj.get("sparse_tokens").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SparseEmbedding.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SparseEmbedding' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SparseEmbedding.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SparseEmbedding value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SparseEmbedding read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SparseEmbedding instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SparseEmbedding given an JSON string + * + * @param jsonString JSON string + * @return An instance of SparseEmbedding + * @throws IOException if the JSON string is invalid with respect to SparseEmbedding + */ + public static SparseEmbedding fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SparseEmbedding.class); + } + + /** + * Convert an instance of SparseEmbedding to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/inference/client/model/VectorType.java b/src/main/java/org/openapitools/inference/client/model/VectorType.java new file mode 100644 index 00000000..f0efa5c8 --- /dev/null +++ b/src/main/java/org/openapitools/inference/client/model/VectorType.java @@ -0,0 +1,72 @@ +/* + * Pinecone Inference API + * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. + * + * The version of the OpenAPI document: 2025-01 + * Contact: support@pinecone.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.inference.client.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Indicates whether this is a 'dense' or 'sparse' embedding. + */ +@JsonAdapter(VectorType.Adapter.class) +public enum VectorType { + + DENSE("dense"), + + SPARSE("sparse"); + + private String value; + + VectorType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static VectorType fromValue(String value) { + for (VectorType b : VectorType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VectorType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VectorType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VectorType.fromValue(value); + } + } +} + diff --git a/src/test/resources/createIndexResponse.valid.json b/src/test/resources/createIndexResponse.valid.json index c6693ac8..d61a83ae 100644 --- a/src/test/resources/createIndexResponse.valid.json +++ b/src/test/resources/createIndexResponse.valid.json @@ -12,5 +12,6 @@ "region": "us-west-2", "cloud": "aws" } - } + }, + "vector_type": "dense" } diff --git a/src/test/resources/createIndexResponse.withUnknownProperties.json b/src/test/resources/createIndexResponse.withUnknownProperties.json index 0b5c8723..a79d6f70 100644 --- a/src/test/resources/createIndexResponse.withUnknownProperties.json +++ b/src/test/resources/createIndexResponse.withUnknownProperties.json @@ -15,5 +15,6 @@ "cloud": "aws", "weather_forecast": "partly sunny" } - } + }, + "vector_type": "dense" } diff --git a/src/test/resources/describeCollection.witihUnknownProperties.json b/src/test/resources/describeCollection.witihUnknownProperties.json index 8a73e4f7..42d58ab0 100644 --- a/src/test/resources/describeCollection.witihUnknownProperties.json +++ b/src/test/resources/describeCollection.witihUnknownProperties.json @@ -6,5 +6,6 @@ "status": "Ready", "vector_count": 99, "extra": true, - "even_more": null + "even_more": null, + "vector_type": "dense" } \ No newline at end of file diff --git a/src/test/resources/describeIndexResponse.valid.json b/src/test/resources/describeIndexResponse.valid.json index 3125d1f7..b3d3868b 100644 --- a/src/test/resources/describeIndexResponse.valid.json +++ b/src/test/resources/describeIndexResponse.valid.json @@ -12,5 +12,6 @@ "cloud": "aws", "region": "us-east2-gcp" } - } + }, + "vector_type": "dense" } \ No newline at end of file diff --git a/src/test/resources/describeIndexResponse.withUnknownProperties.json b/src/test/resources/describeIndexResponse.withUnknownProperties.json index aaf74967..b9f745d1 100644 --- a/src/test/resources/describeIndexResponse.withUnknownProperties.json +++ b/src/test/resources/describeIndexResponse.withUnknownProperties.json @@ -20,5 +20,6 @@ "region": "us-east2-gcp", "hotness": "extra-spicy" } - } + }, + "vector_type": "dense" } \ No newline at end of file diff --git a/src/test/resources/indexListJsonString.json b/src/test/resources/indexListJsonString.json index 05f3c7be..3641b243 100644 --- a/src/test/resources/indexListJsonString.json +++ b/src/test/resources/indexListJsonString.json @@ -13,7 +13,8 @@ "status": { "state":"Ready", "ready":true - } + }, + "vector_type": "dense" },{ "name":"testPodIndex", "metric":"cosine", @@ -31,6 +32,7 @@ "status": { "state":"Ready", "ready":true - } + }, + "vector_type": "dense" }] } \ No newline at end of file diff --git a/src/test/resources/podIndexJsonString.json b/src/test/resources/podIndexJsonString.json index 193541f3..7356385e 100644 --- a/src/test/resources/podIndexJsonString.json +++ b/src/test/resources/podIndexJsonString.json @@ -15,5 +15,6 @@ "status": { "state":"Ready", "ready":true - } + }, + "vector_type": "dense" } \ No newline at end of file diff --git a/src/test/resources/serverlessIndexJsonString.json b/src/test/resources/serverlessIndexJsonString.json index 79b608ea..9fa8d8a6 100644 --- a/src/test/resources/serverlessIndexJsonString.json +++ b/src/test/resources/serverlessIndexJsonString.json @@ -12,5 +12,6 @@ "status": { "state":"Ready", "ready":true - } + }, + "vector_type": "dense" } \ No newline at end of file From c1737a92632e2fd5e7fbfcda7822f913ed2adf98 Mon Sep 17 00:00:00 2001 From: rohanshah18 Date: Fri, 10 Jan 2025 15:17:29 -0500 Subject: [PATCH 2/5] remove commented code --- src/main/java/io/pinecone/clients/Inference.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/java/io/pinecone/clients/Inference.java b/src/main/java/io/pinecone/clients/Inference.java index ea98ec17..47064b70 100644 --- a/src/main/java/io/pinecone/clients/Inference.java +++ b/src/main/java/io/pinecone/clients/Inference.java @@ -49,9 +49,6 @@ public Inference(PineconeConfig config) { * @throws ApiException If the API call fails, an ApiException is thrown. */ public EmbeddingsList embed(String model, Map parameters, List inputs) throws ApiException { -// EmbedRequestParameters embedRequestParameters = new EmbedRequestParameters(); -// parameters.forEach(embedRequestParameters::putAdditionalProperty); - EmbedRequest embedRequest = new EmbedRequest() .model(model) .parameters(parameters) From fe878bc275fe3ba0039e5989626eb200f52c7570 Mon Sep 17 00:00:00 2001 From: Rohan Shah Date: Mon, 27 Jan 2025 10:19:43 -0500 Subject: [PATCH 3/5] Replace protoc with buf and add build script for generating code from the protos (#174) ## Problem The code generation using proto file was done using protoc and the process was manual. ## Solution Added a script to generate java classes using [buf](https://buf.build/docs/generate/overview/). ## Type of Change - [ ] Bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update - [ ] Infrastructure change (CI configs, etc) - [ ] Non-code change (docs, etc) - [ ] None of the above: (explain here) ## Test Plan Integration tests should run successfully. --- build.gradle | 2 +- codegen/apis | 2 +- codegen/buf.gen.yaml | 6 + codegen/buf.lock | 6 + codegen/buf.yaml | 12 + codegen/build-grpc.sh | 49 ++ .../io/pinecone/helpers/TestUtilities.java | 5 - .../controlPlane/pod/CollectionTest.java | 2 +- ...rviceOuterClass.java => DbData202501.java} | 315 +++++---- .../java/io/pinecone/proto/DeleteRequest.java | 251 ++++---- .../proto/DeleteRequestOrBuilder.java | 40 +- .../io/pinecone/proto/DeleteResponse.java | 101 +-- .../proto/DeleteResponseOrBuilder.java | 5 +- .../proto/DescribeIndexStatsRequest.java | 157 ++--- .../DescribeIndexStatsRequestOrBuilder.java | 17 +- .../proto/DescribeIndexStatsResponse.java | 604 +++++++++++++++--- .../DescribeIndexStatsResponseOrBuilder.java | 94 ++- .../java/io/pinecone/proto/FetchRequest.java | 151 ++--- .../pinecone/proto/FetchRequestOrBuilder.java | 17 +- .../java/io/pinecone/proto/FetchResponse.java | 207 +++--- .../proto/FetchResponseOrBuilder.java | 31 +- src/main/java/io/pinecone/proto/ListItem.java | 123 ++-- .../io/pinecone/proto/ListItemOrBuilder.java | 9 +- .../java/io/pinecone/proto/ListRequest.java | 179 ++---- .../pinecone/proto/ListRequestOrBuilder.java | 25 +- .../java/io/pinecone/proto/ListResponse.java | 263 ++++---- .../pinecone/proto/ListResponseOrBuilder.java | 37 +- .../io/pinecone/proto/NamespaceSummary.java | 109 +--- .../proto/NamespaceSummaryOrBuilder.java | 7 +- .../java/io/pinecone/proto/Pagination.java | 123 ++-- .../pinecone/proto/PaginationOrBuilder.java | 9 +- .../java/io/pinecone/proto/QueryRequest.java | 329 +++++----- .../pinecone/proto/QueryRequestOrBuilder.java | 53 +- .../java/io/pinecone/proto/QueryResponse.java | 263 ++++---- .../proto/QueryResponseOrBuilder.java | 35 +- .../java/io/pinecone/proto/QueryVector.java | 233 +++---- .../pinecone/proto/QueryVectorOrBuilder.java | 35 +- .../java/io/pinecone/proto/RequestUnion.java | 191 +++--- .../pinecone/proto/RequestUnionOrBuilder.java | 23 +- .../java/io/pinecone/proto/ScoredVector.java | 213 +++--- .../pinecone/proto/ScoredVectorOrBuilder.java | 29 +- .../io/pinecone/proto/SingleQueryResults.java | 177 ++--- .../proto/SingleQueryResultsOrBuilder.java | 19 +- .../java/io/pinecone/proto/SparseValues.java | 141 ++-- .../pinecone/proto/SparseValuesOrBuilder.java | 17 +- .../java/io/pinecone/proto/UpdateRequest.java | 313 ++++----- .../proto/UpdateRequestOrBuilder.java | 53 +- .../io/pinecone/proto/UpdateResponse.java | 101 +-- .../proto/UpdateResponseOrBuilder.java | 5 +- .../java/io/pinecone/proto/UpsertRequest.java | 191 +++--- .../proto/UpsertRequestOrBuilder.java | 23 +- .../io/pinecone/proto/UpsertResponse.java | 109 +--- .../proto/UpsertResponseOrBuilder.java | 7 +- src/main/java/io/pinecone/proto/Usage.java | 113 ++-- .../io/pinecone/proto/UsageOrBuilder.java | 9 +- src/main/java/io/pinecone/proto/Vector.java | 253 ++++---- .../io/pinecone/proto/VectorOrBuilder.java | 39 +- .../io/pinecone/proto/VectorServiceGrpc.java | 130 ++-- 58 files changed, 2919 insertions(+), 3143 deletions(-) create mode 100644 codegen/buf.gen.yaml create mode 100644 codegen/buf.lock create mode 100644 codegen/buf.yaml create mode 100755 codegen/build-grpc.sh rename src/main/java/io/pinecone/proto/{VectorServiceOuterClass.java => DbData202501.java} (54%) diff --git a/build.gradle b/build.gradle index b143d050..49fb36b3 100644 --- a/build.gradle +++ b/build.gradle @@ -52,7 +52,7 @@ dependencies { implementation 'com.google.code.gson:gson:2.9.1' implementation 'io.gsonfire:gson-fire:1.8.5' implementation 'org.openapitools:jackson-databind-nullable:0.2.6' - implementation 'com.google.protobuf:protobuf-java:3.25.2' + implementation 'com.google.protobuf:protobuf-java:4.29.3' compileOnly "org.apache.tomcat:annotations-api:6.0.53" // necessary for Java 9+ testImplementation("com.squareup.okhttp3:mockwebserver:4.12.0") diff --git a/codegen/apis b/codegen/apis index 24c62612..63e97dcd 160000 --- a/codegen/apis +++ b/codegen/apis @@ -1 +1 @@ -Subproject commit 24c62612dad963af00da4baa29c173c954244ac7 +Subproject commit 63e97dcd8a46cfb0687e23eab1f02300824f6e9d diff --git a/codegen/buf.gen.yaml b/codegen/buf.gen.yaml new file mode 100644 index 00000000..50186c4c --- /dev/null +++ b/codegen/buf.gen.yaml @@ -0,0 +1,6 @@ +version: v1 +plugins: + - name: java + out: gen/java + - name: grpc-java + out: gen/java \ No newline at end of file diff --git a/codegen/buf.lock b/codegen/buf.lock new file mode 100644 index 00000000..e4c37bd3 --- /dev/null +++ b/codegen/buf.lock @@ -0,0 +1,6 @@ +# Generated by buf. DO NOT EDIT. +version: v2 +deps: + - name: buf.build/googleapis/googleapis + commit: e93e34f48be043dab55be31b4b47f458 + digest: b5:cebe5dfac5f7d67c55296f37ad9d368dba8d9862777e69d5d99eb1d72dc95fa68cd6323b483ca42cf70e66060002c1bc36e1f5f754b217a5c771c108eb243dbf diff --git a/codegen/buf.yaml b/codegen/buf.yaml new file mode 100644 index 00000000..ce7494ab --- /dev/null +++ b/codegen/buf.yaml @@ -0,0 +1,12 @@ +# For details on buf.yaml configuration, visit https://buf.build/docs/configuration/v2/buf-yaml +version: v2 +lint: + use: + - STANDARD +breaking: + use: + - FILE +deps: + - buf.build/googleapis/googleapis +modules: + - path: apis/_build/2025-01 \ No newline at end of file diff --git a/codegen/build-grpc.sh b/codegen/build-grpc.sh new file mode 100755 index 00000000..3c44f5a0 --- /dev/null +++ b/codegen/build-grpc.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +set -eux -o pipefail +version=$1 # e.g. 2024-07 + +update_apis_repo() { + echo "Updating apis repo" + pushd codegen/apis + git fetch + git checkout main + git pull + just build + popd +} + +update_buf_config() { + pushd codegen + # Update buf config to find correct proto version + sed -i '' "s/[0-9][0-9][0-9][0-9]-[0-1][0-9]/${version}/g" buf.yaml + + # Clean before building + rm -rf gen + + # Ensure path valid by running the buf build command + buf build + popd +} + +buf_generate() { + pushd codegen + # Generate the java code + buf generate + popd +} + +update_apis_repo +update_buf_config +buf_generate + +dest="src/main/java/io/pinecone/proto/" + +# Remove existing files in dest +rm -rf "${dest}*.java" + +# Copy the new generated files to dest directory +cp codegen/gen/java/io/pinecone/proto/*.java ${dest} + +# Cleanup the intermediate files that were generated +rm -rf codegen/gen \ No newline at end of file diff --git a/src/integration/java/io/pinecone/helpers/TestUtilities.java b/src/integration/java/io/pinecone/helpers/TestUtilities.java index 859d9a2c..3f203ed9 100644 --- a/src/integration/java/io/pinecone/helpers/TestUtilities.java +++ b/src/integration/java/io/pinecone/helpers/TestUtilities.java @@ -1,15 +1,10 @@ package io.pinecone.helpers; -import io.pinecone.clients.Index; import io.pinecone.clients.Pinecone; -import io.pinecone.proto.DescribeIndexStatsResponse; -import io.pinecone.proto.NamespaceSummary; import org.openapitools.db_control.client.model.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.*; - import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.fail; diff --git a/src/integration/java/io/pinecone/integration/controlPlane/pod/CollectionTest.java b/src/integration/java/io/pinecone/integration/controlPlane/pod/CollectionTest.java index 1e19736a..dc357709 100644 --- a/src/integration/java/io/pinecone/integration/controlPlane/pod/CollectionTest.java +++ b/src/integration/java/io/pinecone/integration/controlPlane/pod/CollectionTest.java @@ -5,9 +5,9 @@ import io.pinecone.exceptions.PineconeException; import io.pinecone.exceptions.PineconeValidationException; import io.pinecone.helpers.RandomStringBuilder; -import io.pinecone.proto.FetchResponse; import io.pinecone.helpers.TestResourcesManager; +import io.pinecone.proto.FetchResponse; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Disabled; diff --git a/src/main/java/io/pinecone/proto/VectorServiceOuterClass.java b/src/main/java/io/pinecone/proto/DbData202501.java similarity index 54% rename from src/main/java/io/pinecone/proto/VectorServiceOuterClass.java rename to src/main/java/io/pinecone/proto/DbData202501.java index 84693128..7cad4d2f 100644 --- a/src/main/java/io/pinecone/proto/VectorServiceOuterClass.java +++ b/src/main/java/io/pinecone/proto/DbData202501.java @@ -1,11 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; -public final class VectorServiceOuterClass { - private VectorServiceOuterClass() {} +public final class DbData202501 { + private DbData202501() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + DbData202501.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -18,132 +28,132 @@ public static void registerAllExtensions( static final com.google.protobuf.Descriptors.Descriptor internal_static_SparseValues_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_SparseValues_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_Vector_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Vector_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_ScoredVector_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_ScoredVector_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_RequestUnion_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_RequestUnion_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_UpsertRequest_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_UpsertRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_UpsertResponse_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_UpsertResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_DeleteRequest_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_DeleteRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_DeleteResponse_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_DeleteResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_FetchRequest_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_FetchRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_FetchResponse_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_FetchResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_FetchResponse_VectorsEntry_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_FetchResponse_VectorsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_ListRequest_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_ListRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_Pagination_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Pagination_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_ListItem_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_ListItem_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_ListResponse_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_ListResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_QueryVector_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_QueryVector_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_QueryRequest_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_QueryRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_SingleQueryResults_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_SingleQueryResults_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_QueryResponse_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_QueryResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_Usage_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Usage_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_UpdateRequest_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_UpdateRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_UpdateResponse_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_UpdateResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_DescribeIndexStatsRequest_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_DescribeIndexStatsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_NamespaceSummary_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_NamespaceSummary_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_DescribeIndexStatsResponse_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_DescribeIndexStatsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_DescribeIndexStatsResponse_NamespacesEntry_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_DescribeIndexStatsResponse_NamespacesEntry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -154,88 +164,108 @@ public static void registerAllExtensions( descriptor; static { java.lang.String[] descriptorData = { - "\n\024vector_service.proto\032\034google/protobuf/" + - "struct.proto\032\034google/api/annotations.pro" + - "to\032\037google/api/field_behavior.proto\";\n\014S" + - "parseValues\022\025\n\007indices\030\001 \003(\rB\004\342A\001\002\022\024\n\006va" + - "lues\030\002 \003(\002B\004\342A\001\002\"\201\001\n\006Vector\022\020\n\002id\030\001 \001(\tB" + - "\004\342A\001\002\022\024\n\006values\030\002 \003(\002B\004\342A\001\002\022$\n\rsparse_va" + - "lues\030\004 \001(\0132\r.SparseValues\022)\n\010metadata\030\003 " + - "\001(\0132\027.google.protobuf.Struct\"\220\001\n\014ScoredV" + - "ector\022\020\n\002id\030\001 \001(\tB\004\342A\001\002\022\r\n\005score\030\002 \001(\002\022\016" + - "\n\006values\030\003 \003(\002\022$\n\rsparse_values\030\005 \001(\0132\r." + - "SparseValues\022)\n\010metadata\030\004 \001(\0132\027.google." + - "protobuf.Struct\"\211\001\n\014RequestUnion\022 \n\006upse" + - "rt\030\001 \001(\0132\016.UpsertRequestH\000\022 \n\006delete\030\002 \001" + - "(\0132\016.DeleteRequestH\000\022 \n\006update\030\003 \001(\0132\016.U" + - "pdateRequestH\000B\023\n\021RequestUnionInner\"B\n\rU" + - "psertRequest\022\036\n\007vectors\030\001 \003(\0132\007.VectorB\004" + - "\342A\001\002\022\021\n\tnamespace\030\002 \001(\t\"(\n\016UpsertRespons" + - "e\022\026\n\016upserted_count\030\001 \001(\r\"l\n\rDeleteReque" + - "st\022\013\n\003ids\030\001 \003(\t\022\022\n\ndelete_all\030\002 \001(\010\022\021\n\tn" + - "amespace\030\003 \001(\t\022\'\n\006filter\030\004 \001(\0132\027.google." + - "protobuf.Struct\"\020\n\016DeleteResponse\"4\n\014Fet" + - "chRequest\022\021\n\003ids\030\001 \003(\tB\004\342A\001\002\022\021\n\tnamespac" + - "e\030\002 \001(\t\"\257\001\n\rFetchResponse\022,\n\007vectors\030\001 \003" + - "(\0132\033.FetchResponse.VectorsEntry\022\021\n\tnames" + - "pace\030\002 \001(\t\022\032\n\005usage\030\003 \001(\0132\006.UsageH\000\210\001\001\0327" + - "\n\014VectorsEntry\022\013\n\003key\030\001 \001(\t\022\026\n\005value\030\002 \001" + - "(\0132\007.Vector:\0028\001B\010\n\006_usage\"\222\001\n\013ListReques" + - "t\022\023\n\006prefix\030\001 \001(\tH\000\210\001\001\022\022\n\005limit\030\002 \001(\rH\001\210" + - "\001\001\022\035\n\020pagination_token\030\003 \001(\tH\002\210\001\001\022\021\n\tnam" + - "espace\030\004 \001(\tB\t\n\007_prefixB\010\n\006_limitB\023\n\021_pa" + - "gination_token\"\032\n\nPagination\022\014\n\004next\030\001 \001" + - "(\t\"\026\n\010ListItem\022\n\n\002id\030\001 \001(\t\"\230\001\n\014ListRespo" + - "nse\022\032\n\007vectors\030\001 \003(\0132\t.ListItem\022$\n\npagin" + - "ation\030\002 \001(\0132\013.PaginationH\000\210\001\001\022\021\n\tnamespa" + - "ce\030\003 \001(\t\022\032\n\005usage\030\004 \001(\0132\006.UsageH\001\210\001\001B\r\n\013" + - "_paginationB\010\n\006_usage\"\224\001\n\013QueryVector\022\024\n" + - "\006values\030\001 \003(\002B\004\342A\001\002\022$\n\rsparse_values\030\005 \001" + - "(\0132\r.SparseValues\022\r\n\005top_k\030\002 \001(\r\022\021\n\tname" + - "space\030\003 \001(\t\022\'\n\006filter\030\004 \001(\0132\027.google.pro" + - "tobuf.Struct\"\366\001\n\014QueryRequest\022\021\n\tnamespa" + - "ce\030\001 \001(\t\022\023\n\005top_k\030\002 \001(\rB\004\342A\001\002\022\'\n\006filter\030" + - "\003 \001(\0132\027.google.protobuf.Struct\022\026\n\016includ" + - "e_values\030\004 \001(\010\022\030\n\020include_metadata\030\005 \001(\010" + - "\022!\n\007queries\030\006 \003(\0132\014.QueryVectorB\002\030\001\022\016\n\006v" + - "ector\030\007 \003(\002\022$\n\rsparse_vector\030\t \001(\0132\r.Spa" + - "rseValues\022\n\n\002id\030\010 \001(\t\"G\n\022SingleQueryResu" + - "lts\022\036\n\007matches\030\001 \003(\0132\r.ScoredVector\022\021\n\tn" + - "amespace\030\002 \001(\t\"\222\001\n\rQueryResponse\022(\n\007resu" + - "lts\030\001 \003(\0132\023.SingleQueryResultsB\002\030\001\022\036\n\007ma" + - "tches\030\002 \003(\0132\r.ScoredVector\022\021\n\tnamespace\030" + - "\003 \001(\t\022\032\n\005usage\030\004 \001(\0132\006.UsageH\000\210\001\001B\010\n\006_us" + - "age\"/\n\005Usage\022\027\n\nread_units\030\001 \001(\rH\000\210\001\001B\r\n" + - "\013_read_units\"\231\001\n\rUpdateRequest\022\020\n\002id\030\001 \001" + - "(\tB\004\342A\001\002\022\016\n\006values\030\002 \003(\002\022$\n\rsparse_value" + - "s\030\005 \001(\0132\r.SparseValues\022-\n\014set_metadata\030\003" + - " \001(\0132\027.google.protobuf.Struct\022\021\n\tnamespa" + - "ce\030\004 \001(\t\"\020\n\016UpdateResponse\"D\n\031DescribeIn" + - "dexStatsRequest\022\'\n\006filter\030\001 \001(\0132\027.google" + - ".protobuf.Struct\"(\n\020NamespaceSummary\022\024\n\014" + - "vector_count\030\001 \001(\r\"\352\001\n\032DescribeIndexStat" + - "sResponse\022?\n\nnamespaces\030\001 \003(\0132+.Describe" + - "IndexStatsResponse.NamespacesEntry\022\021\n\tdi" + - "mension\030\002 \001(\r\022\026\n\016index_fullness\030\003 \001(\002\022\032\n" + - "\022total_vector_count\030\004 \001(\r\032D\n\017NamespacesE" + - "ntry\022\013\n\003key\030\001 \001(\t\022 \n\005value\030\002 \001(\0132\021.Names" + - "paceSummary:\0028\0012\271\004\n\rVectorService\022E\n\006Ups" + - "ert\022\016.UpsertRequest\032\017.UpsertResponse\"\032\202\323" + - "\344\223\002\024\"\017/vectors/upsert:\001*\022X\n\006Delete\022\016.Del" + - "eteRequest\032\017.DeleteResponse\"-\202\323\344\223\002\'\"\017/ve" + - "ctors/delete:\001*Z\021*\017/vectors/delete\022>\n\005Fe" + - "tch\022\r.FetchRequest\032\016.FetchResponse\"\026\202\323\344\223" + - "\002\020\022\016/vectors/fetch\022:\n\004List\022\014.ListRequest" + - "\032\r.ListResponse\"\025\202\323\344\223\002\017\022\r/vectors/list\0229" + - "\n\005Query\022\r.QueryRequest\032\016.QueryResponse\"\021" + - "\202\323\344\223\002\013\"\006/query:\001*\022E\n\006Update\022\016.UpdateRequ" + - "est\032\017.UpdateResponse\"\032\202\323\344\223\002\024\"\017/vectors/u" + - "pdate:\001*\022\210\001\n\022DescribeIndexStats\022\032.Descri" + - "beIndexStatsRequest\032\033.DescribeIndexStats" + - "Response\"9\202\323\344\223\0023\"\025/describe_index_stats:" + - "\001*Z\027\022\025/describe_index_statsBK\n\021io.pineco" + - "ne.protoP\001Z4github.com/pinecone-io/go-pi" + - "necone/internal/gen/datab\006proto3" + "\n\025db_data_2025-01.proto\032\034google/protobuf" + + "/struct.proto\032\034google/api/annotations.pr" + + "oto\032\037google/api/field_behavior.proto\"J\n\014" + + "SparseValues\022\035\n\007indices\030\001 \003(\rB\003\340A\002R\007indi" + + "ces\022\033\n\006values\030\002 \003(\002B\003\340A\002R\006values\"\236\001\n\006Vec" + + "tor\022\023\n\002id\030\001 \001(\tB\003\340A\002R\002id\022\026\n\006values\030\002 \003(\002" + + "R\006values\0222\n\rsparse_values\030\004 \001(\0132\r.Sparse" + + "ValuesR\014sparseValues\0223\n\010metadata\030\003 \001(\0132\027" + + ".google.protobuf.StructR\010metadata\"\272\001\n\014Sc" + + "oredVector\022\023\n\002id\030\001 \001(\tB\003\340A\002R\002id\022\024\n\005score" + + "\030\002 \001(\002R\005score\022\026\n\006values\030\003 \003(\002R\006values\0222\n" + + "\rsparse_values\030\005 \001(\0132\r.SparseValuesR\014spa" + + "rseValues\0223\n\010metadata\030\004 \001(\0132\027.google.pro" + + "tobuf.StructR\010metadata\"\241\001\n\014RequestUnion\022" + + "(\n\006upsert\030\001 \001(\0132\016.UpsertRequestH\000R\006upser" + + "t\022(\n\006delete\030\002 \001(\0132\016.DeleteRequestH\000R\006del" + + "ete\022(\n\006update\030\003 \001(\0132\016.UpdateRequestH\000R\006u" + + "pdateB\023\n\021RequestUnionInner\"U\n\rUpsertRequ" + + "est\022&\n\007vectors\030\001 \003(\0132\007.VectorB\003\340A\002R\007vect" + + "ors\022\034\n\tnamespace\030\002 \001(\tR\tnamespace\"7\n\016Ups" + + "ertResponse\022%\n\016upserted_count\030\001 \001(\rR\rups" + + "ertedCount\"\217\001\n\rDeleteRequest\022\020\n\003ids\030\001 \003(" + + "\tR\003ids\022\035\n\ndelete_all\030\002 \001(\010R\tdeleteAll\022\034\n" + + "\tnamespace\030\003 \001(\tR\tnamespace\022/\n\006filter\030\004 " + + "\001(\0132\027.google.protobuf.StructR\006filter\"\020\n\016" + + "DeleteResponse\"C\n\014FetchRequest\022\025\n\003ids\030\001 " + + "\003(\tB\003\340A\002R\003ids\022\034\n\tnamespace\030\002 \001(\tR\tnamesp" + + "ace\"\326\001\n\rFetchResponse\0225\n\007vectors\030\001 \003(\0132\033" + + ".FetchResponse.VectorsEntryR\007vectors\022\034\n\t" + + "namespace\030\002 \001(\tR\tnamespace\022!\n\005usage\030\003 \001(" + + "\0132\006.UsageH\000R\005usage\210\001\001\032C\n\014VectorsEntry\022\020\n" + + "\003key\030\001 \001(\tR\003key\022\035\n\005value\030\002 \001(\0132\007.VectorR" + + "\005value:\0028\001B\010\n\006_usage\"\275\001\n\013ListRequest\022\033\n\006" + + "prefix\030\001 \001(\tH\000R\006prefix\210\001\001\022\031\n\005limit\030\002 \001(\r" + + "H\001R\005limit\210\001\001\022.\n\020pagination_token\030\003 \001(\tH\002" + + "R\017paginationToken\210\001\001\022\034\n\tnamespace\030\004 \001(\tR" + + "\tnamespaceB\t\n\007_prefixB\010\n\006_limitB\023\n\021_pagi" + + "nation_token\" \n\nPagination\022\022\n\004next\030\001 \001(\t" + + "R\004next\"\032\n\010ListItem\022\016\n\002id\030\001 \001(\tR\002id\"\277\001\n\014L" + + "istResponse\022#\n\007vectors\030\001 \003(\0132\t.ListItemR" + + "\007vectors\0220\n\npagination\030\002 \001(\0132\013.Paginatio" + + "nH\000R\npagination\210\001\001\022\034\n\tnamespace\030\003 \001(\tR\tn" + + "amespace\022!\n\005usage\030\004 \001(\0132\006.UsageH\001R\005usage" + + "\210\001\001B\r\n\013_paginationB\010\n\006_usage\"\275\001\n\013QueryVe" + + "ctor\022\026\n\006values\030\001 \003(\002R\006values\0222\n\rsparse_v" + + "alues\030\005 \001(\0132\r.SparseValuesR\014sparseValues" + + "\022\023\n\005top_k\030\002 \001(\rR\004topK\022\034\n\tnamespace\030\003 \001(\t" + + "R\tnamespace\022/\n\006filter\030\004 \001(\0132\027.google.pro" + + "tobuf.StructR\006filter\"\321\002\n\014QueryRequest\022\034\n" + + "\tnamespace\030\001 \001(\tR\tnamespace\022\030\n\005top_k\030\002 \001" + + "(\rB\003\340A\002R\004topK\022/\n\006filter\030\003 \001(\0132\027.google.p" + + "rotobuf.StructR\006filter\022%\n\016include_values" + + "\030\004 \001(\010R\rincludeValues\022)\n\020include_metadat" + + "a\030\005 \001(\010R\017includeMetadata\022*\n\007queries\030\006 \003(" + + "\0132\014.QueryVectorB\002\030\001R\007queries\022\026\n\006vector\030\007" + + " \003(\002R\006vector\0222\n\rsparse_vector\030\t \001(\0132\r.Sp" + + "arseValuesR\014sparseVector\022\016\n\002id\030\010 \001(\tR\002id" + + "\"[\n\022SingleQueryResults\022\'\n\007matches\030\001 \003(\0132" + + "\r.ScoredVectorR\007matches\022\034\n\tnamespace\030\002 \001" + + "(\tR\tnamespace\"\266\001\n\rQueryResponse\0221\n\007resul" + + "ts\030\001 \003(\0132\023.SingleQueryResultsB\002\030\001R\007resul" + + "ts\022\'\n\007matches\030\002 \003(\0132\r.ScoredVectorR\007matc" + + "hes\022\034\n\tnamespace\030\003 \001(\tR\tnamespace\022!\n\005usa" + + "ge\030\004 \001(\0132\006.UsageH\000R\005usage\210\001\001B\010\n\006_usage\":" + + "\n\005Usage\022\"\n\nread_units\030\001 \001(\rH\000R\treadUnits" + + "\210\001\001B\r\n\013_read_units\"\312\001\n\rUpdateRequest\022\023\n\002" + + "id\030\001 \001(\tB\003\340A\002R\002id\022\026\n\006values\030\002 \003(\002R\006value" + + "s\0222\n\rsparse_values\030\005 \001(\0132\r.SparseValuesR" + + "\014sparseValues\022:\n\014set_metadata\030\003 \001(\0132\027.go" + + "ogle.protobuf.StructR\013setMetadata\022\034\n\tnam" + + "espace\030\004 \001(\tR\tnamespace\"\020\n\016UpdateRespons" + + "e\"L\n\031DescribeIndexStatsRequest\022/\n\006filter" + + "\030\001 \001(\0132\027.google.protobuf.StructR\006filter\"" + + "5\n\020NamespaceSummary\022!\n\014vector_count\030\001 \001(" + + "\rR\013vectorCount\"\237\003\n\032DescribeIndexStatsRes" + + "ponse\022K\n\nnamespaces\030\001 \003(\0132+.DescribeInde" + + "xStatsResponse.NamespacesEntryR\nnamespac" + + "es\022!\n\tdimension\030\002 \001(\rH\000R\tdimension\210\001\001\022%\n" + + "\016index_fullness\030\003 \001(\002R\rindexFullness\022,\n\022" + + "total_vector_count\030\004 \001(\rR\020totalVectorCou" + + "nt\022\033\n\006metric\030\005 \001(\tH\001R\006metric\210\001\001\022$\n\013vecto" + + "r_type\030\006 \001(\tH\002R\nvectorType\210\001\001\032P\n\017Namespa" + + "cesEntry\022\020\n\003key\030\001 \001(\tR\003key\022\'\n\005value\030\002 \001(" + + "\0132\021.NamespaceSummaryR\005value:\0028\001B\014\n\n_dime" + + "nsionB\t\n\007_metricB\016\n\014_vector_type2\271\004\n\rVec" + + "torService\022E\n\006Upsert\022\016.UpsertRequest\032\017.U" + + "psertResponse\"\032\202\323\344\223\002\024\"\017/vectors/upsert:\001" + + "*\022X\n\006Delete\022\016.DeleteRequest\032\017.DeleteResp" + + "onse\"-\202\323\344\223\002\'\"\017/vectors/delete:\001*Z\021*\017/vec" + + "tors/delete\022>\n\005Fetch\022\r.FetchRequest\032\016.Fe" + + "tchResponse\"\026\202\323\344\223\002\020\022\016/vectors/fetch\022:\n\004L" + + "ist\022\014.ListRequest\032\r.ListResponse\"\025\202\323\344\223\002\017" + + "\022\r/vectors/list\0229\n\005Query\022\r.QueryRequest\032" + + "\016.QueryResponse\"\021\202\323\344\223\002\013\"\006/query:\001*\022E\n\006Up" + + "date\022\016.UpdateRequest\032\017.UpdateResponse\"\032\202" + + "\323\344\223\002\024\"\017/vectors/update:\001*\022\210\001\n\022DescribeIn" + + "dexStats\022\032.DescribeIndexStatsRequest\032\033.D" + + "escribeIndexStatsResponse\"9\202\323\344\223\0023\"\025/desc" + + "ribe_index_stats:\001*Z\027\022\025/describe_index_s" + + "tatsBS\n\021io.pinecone.protoP\001Z builder) { + private DeleteRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private DeleteRequest() { @@ -26,22 +36,15 @@ private DeleteRequest() { namespace_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_DeleteRequest_descriptor; + return io.pinecone.proto.DbData202501.internal_static_DeleteRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_DeleteRequest_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_DeleteRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.DeleteRequest.class, io.pinecone.proto.DeleteRequest.Builder.class); } @@ -56,7 +59,7 @@ protected java.lang.Object newInstance( * Vectors to delete. * * - * repeated string ids = 1; + * repeated string ids = 1 [json_name = "ids"]; * @return A list containing the ids. */ public com.google.protobuf.ProtocolStringList @@ -68,7 +71,7 @@ protected java.lang.Object newInstance( * Vectors to delete. * * - * repeated string ids = 1; + * repeated string ids = 1 [json_name = "ids"]; * @return The count of ids. */ public int getIdsCount() { @@ -79,7 +82,7 @@ public int getIdsCount() { * Vectors to delete. * * - * repeated string ids = 1; + * repeated string ids = 1 [json_name = "ids"]; * @param index The index of the element to return. * @return The ids at the given index. */ @@ -91,7 +94,7 @@ public java.lang.String getIds(int index) { * Vectors to delete. * * - * repeated string ids = 1; + * repeated string ids = 1 [json_name = "ids"]; * @param index The index of the value to return. * @return The bytes of the ids at the given index. */ @@ -107,7 +110,7 @@ public java.lang.String getIds(int index) { * This indicates that all vectors in the index namespace should be deleted. * * - * bool delete_all = 2; + * bool delete_all = 2 [json_name = "deleteAll"]; * @return The deleteAll. */ @java.lang.Override @@ -123,7 +126,7 @@ public boolean getDeleteAll() { * The namespace to delete vectors from, if applicable. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The namespace. */ @java.lang.Override @@ -144,7 +147,7 @@ public java.lang.String getNamespace() { * The namespace to delete vectors from, if applicable. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The bytes for namespace. */ @java.lang.Override @@ -167,11 +170,12 @@ public java.lang.String getNamespace() { /** *
    * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive
-   * with specifying ids to delete in the ids param or using delete_all=True.
-   * See https://www.pinecone.io/docs/metadata-filtering/.
+   * with specifying ids to delete in the ids param or using `delete_all=True`.
+   * For guidance and examples, see [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
+   * Serverless indexes do not support delete by metadata. Instead, you can use the `list` operation to fetch the vector IDs based on their common ID prefix and then delete the records by ID.
    * 
* - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; * @return Whether the filter field is set. */ @java.lang.Override @@ -181,11 +185,12 @@ public boolean hasFilter() { /** *
    * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive
-   * with specifying ids to delete in the ids param or using delete_all=True.
-   * See https://www.pinecone.io/docs/metadata-filtering/.
+   * with specifying ids to delete in the ids param or using `delete_all=True`.
+   * For guidance and examples, see [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
+   * Serverless indexes do not support delete by metadata. Instead, you can use the `list` operation to fetch the vector IDs based on their common ID prefix and then delete the records by ID.
    * 
* - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; * @return The filter. */ @java.lang.Override @@ -195,11 +200,12 @@ public com.google.protobuf.Struct getFilter() { /** *
    * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive
-   * with specifying ids to delete in the ids param or using delete_all=True.
-   * See https://www.pinecone.io/docs/metadata-filtering/.
+   * with specifying ids to delete in the ids param or using `delete_all=True`.
+   * For guidance and examples, see [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
+   * Serverless indexes do not support delete by metadata. Instead, you can use the `list` operation to fetch the vector IDs based on their common ID prefix and then delete the records by ID.
    * 
* - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; */ @java.lang.Override public com.google.protobuf.StructOrBuilder getFilterOrBuilder() { @@ -221,13 +227,13 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < ids_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ids_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 1, ids_.getRaw(i)); } if (deleteAll_ != false) { output.writeBool(2, deleteAll_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, namespace_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(4, getFilter()); @@ -253,8 +259,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(2, deleteAll_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, namespace_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -349,20 +355,20 @@ public static io.pinecone.proto.DeleteRequest parseFrom( } public static io.pinecone.proto.DeleteRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.DeleteRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.DeleteRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -370,20 +376,20 @@ public static io.pinecone.proto.DeleteRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.DeleteRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.DeleteRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -403,7 +409,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -415,18 +421,18 @@ protected Builder newBuilderForType( * Protobuf type {@code DeleteRequest} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:DeleteRequest) io.pinecone.proto.DeleteRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_DeleteRequest_descriptor; + return io.pinecone.proto.DbData202501.internal_static_DeleteRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_DeleteRequest_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_DeleteRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.DeleteRequest.class, io.pinecone.proto.DeleteRequest.Builder.class); } @@ -437,12 +443,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getFilterFieldBuilder(); } @@ -466,7 +472,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_DeleteRequest_descriptor; + return io.pinecone.proto.DbData202501.internal_static_DeleteRequest_descriptor; } @java.lang.Override @@ -513,38 +519,6 @@ private void buildPartial0(io.pinecone.proto.DeleteRequest result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.DeleteRequest) { @@ -657,7 +631,7 @@ private void ensureIdsIsMutable() { * Vectors to delete. * * - * repeated string ids = 1; + * repeated string ids = 1 [json_name = "ids"]; * @return A list containing the ids. */ public com.google.protobuf.ProtocolStringList @@ -670,7 +644,7 @@ private void ensureIdsIsMutable() { * Vectors to delete. * * - * repeated string ids = 1; + * repeated string ids = 1 [json_name = "ids"]; * @return The count of ids. */ public int getIdsCount() { @@ -681,7 +655,7 @@ public int getIdsCount() { * Vectors to delete. * * - * repeated string ids = 1; + * repeated string ids = 1 [json_name = "ids"]; * @param index The index of the element to return. * @return The ids at the given index. */ @@ -693,7 +667,7 @@ public java.lang.String getIds(int index) { * Vectors to delete. * * - * repeated string ids = 1; + * repeated string ids = 1 [json_name = "ids"]; * @param index The index of the value to return. * @return The bytes of the ids at the given index. */ @@ -706,7 +680,7 @@ public java.lang.String getIds(int index) { * Vectors to delete. * * - * repeated string ids = 1; + * repeated string ids = 1 [json_name = "ids"]; * @param index The index to set the value at. * @param value The ids to set. * @return This builder for chaining. @@ -725,7 +699,7 @@ public Builder setIds( * Vectors to delete. * * - * repeated string ids = 1; + * repeated string ids = 1 [json_name = "ids"]; * @param value The ids to add. * @return This builder for chaining. */ @@ -743,7 +717,7 @@ public Builder addIds( * Vectors to delete. * * - * repeated string ids = 1; + * repeated string ids = 1 [json_name = "ids"]; * @param values The ids to add. * @return This builder for chaining. */ @@ -761,7 +735,7 @@ public Builder addAllIds( * Vectors to delete. * * - * repeated string ids = 1; + * repeated string ids = 1 [json_name = "ids"]; * @return This builder for chaining. */ public Builder clearIds() { @@ -776,7 +750,7 @@ public Builder clearIds() { * Vectors to delete. * * - * repeated string ids = 1; + * repeated string ids = 1 [json_name = "ids"]; * @param value The bytes of the ids to add. * @return This builder for chaining. */ @@ -797,7 +771,7 @@ public Builder addIdsBytes( * This indicates that all vectors in the index namespace should be deleted. * * - * bool delete_all = 2; + * bool delete_all = 2 [json_name = "deleteAll"]; * @return The deleteAll. */ @java.lang.Override @@ -809,7 +783,7 @@ public boolean getDeleteAll() { * This indicates that all vectors in the index namespace should be deleted. * * - * bool delete_all = 2; + * bool delete_all = 2 [json_name = "deleteAll"]; * @param value The deleteAll to set. * @return This builder for chaining. */ @@ -825,7 +799,7 @@ public Builder setDeleteAll(boolean value) { * This indicates that all vectors in the index namespace should be deleted. * * - * bool delete_all = 2; + * bool delete_all = 2 [json_name = "deleteAll"]; * @return This builder for chaining. */ public Builder clearDeleteAll() { @@ -841,7 +815,7 @@ public Builder clearDeleteAll() { * The namespace to delete vectors from, if applicable. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The namespace. */ public java.lang.String getNamespace() { @@ -861,7 +835,7 @@ public java.lang.String getNamespace() { * The namespace to delete vectors from, if applicable. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The bytes for namespace. */ public com.google.protobuf.ByteString @@ -882,7 +856,7 @@ public java.lang.String getNamespace() { * The namespace to delete vectors from, if applicable. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @param value The namespace to set. * @return This builder for chaining. */ @@ -899,7 +873,7 @@ public Builder setNamespace( * The namespace to delete vectors from, if applicable. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return This builder for chaining. */ public Builder clearNamespace() { @@ -913,7 +887,7 @@ public Builder clearNamespace() { * The namespace to delete vectors from, if applicable. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @param value The bytes for namespace to set. * @return This builder for chaining. */ @@ -928,16 +902,17 @@ public Builder setNamespaceBytes( } private com.google.protobuf.Struct filter_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> filterBuilder_; /** *
      * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive
-     * with specifying ids to delete in the ids param or using delete_all=True.
-     * See https://www.pinecone.io/docs/metadata-filtering/.
+     * with specifying ids to delete in the ids param or using `delete_all=True`.
+     * For guidance and examples, see [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
+     * Serverless indexes do not support delete by metadata. Instead, you can use the `list` operation to fetch the vector IDs based on their common ID prefix and then delete the records by ID.
      * 
* - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; * @return Whether the filter field is set. */ public boolean hasFilter() { @@ -946,11 +921,12 @@ public boolean hasFilter() { /** *
      * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive
-     * with specifying ids to delete in the ids param or using delete_all=True.
-     * See https://www.pinecone.io/docs/metadata-filtering/.
+     * with specifying ids to delete in the ids param or using `delete_all=True`.
+     * For guidance and examples, see [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
+     * Serverless indexes do not support delete by metadata. Instead, you can use the `list` operation to fetch the vector IDs based on their common ID prefix and then delete the records by ID.
      * 
* - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; * @return The filter. */ public com.google.protobuf.Struct getFilter() { @@ -963,11 +939,12 @@ public com.google.protobuf.Struct getFilter() { /** *
      * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive
-     * with specifying ids to delete in the ids param or using delete_all=True.
-     * See https://www.pinecone.io/docs/metadata-filtering/.
+     * with specifying ids to delete in the ids param or using `delete_all=True`.
+     * For guidance and examples, see [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
+     * Serverless indexes do not support delete by metadata. Instead, you can use the `list` operation to fetch the vector IDs based on their common ID prefix and then delete the records by ID.
      * 
* - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; */ public Builder setFilter(com.google.protobuf.Struct value) { if (filterBuilder_ == null) { @@ -985,11 +962,12 @@ public Builder setFilter(com.google.protobuf.Struct value) { /** *
      * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive
-     * with specifying ids to delete in the ids param or using delete_all=True.
-     * See https://www.pinecone.io/docs/metadata-filtering/.
+     * with specifying ids to delete in the ids param or using `delete_all=True`.
+     * For guidance and examples, see [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
+     * Serverless indexes do not support delete by metadata. Instead, you can use the `list` operation to fetch the vector IDs based on their common ID prefix and then delete the records by ID.
      * 
* - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; */ public Builder setFilter( com.google.protobuf.Struct.Builder builderForValue) { @@ -1005,11 +983,12 @@ public Builder setFilter( /** *
      * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive
-     * with specifying ids to delete in the ids param or using delete_all=True.
-     * See https://www.pinecone.io/docs/metadata-filtering/.
+     * with specifying ids to delete in the ids param or using `delete_all=True`.
+     * For guidance and examples, see [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
+     * Serverless indexes do not support delete by metadata. Instead, you can use the `list` operation to fetch the vector IDs based on their common ID prefix and then delete the records by ID.
      * 
* - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; */ public Builder mergeFilter(com.google.protobuf.Struct value) { if (filterBuilder_ == null) { @@ -1032,11 +1011,12 @@ public Builder mergeFilter(com.google.protobuf.Struct value) { /** *
      * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive
-     * with specifying ids to delete in the ids param or using delete_all=True.
-     * See https://www.pinecone.io/docs/metadata-filtering/.
+     * with specifying ids to delete in the ids param or using `delete_all=True`.
+     * For guidance and examples, see [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
+     * Serverless indexes do not support delete by metadata. Instead, you can use the `list` operation to fetch the vector IDs based on their common ID prefix and then delete the records by ID.
      * 
* - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; */ public Builder clearFilter() { bitField0_ = (bitField0_ & ~0x00000008); @@ -1051,11 +1031,12 @@ public Builder clearFilter() { /** *
      * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive
-     * with specifying ids to delete in the ids param or using delete_all=True.
-     * See https://www.pinecone.io/docs/metadata-filtering/.
+     * with specifying ids to delete in the ids param or using `delete_all=True`.
+     * For guidance and examples, see [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
+     * Serverless indexes do not support delete by metadata. Instead, you can use the `list` operation to fetch the vector IDs based on their common ID prefix and then delete the records by ID.
      * 
* - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; */ public com.google.protobuf.Struct.Builder getFilterBuilder() { bitField0_ |= 0x00000008; @@ -1065,11 +1046,12 @@ public com.google.protobuf.Struct.Builder getFilterBuilder() { /** *
      * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive
-     * with specifying ids to delete in the ids param or using delete_all=True.
-     * See https://www.pinecone.io/docs/metadata-filtering/.
+     * with specifying ids to delete in the ids param or using `delete_all=True`.
+     * For guidance and examples, see [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
+     * Serverless indexes do not support delete by metadata. Instead, you can use the `list` operation to fetch the vector IDs based on their common ID prefix and then delete the records by ID.
      * 
* - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; */ public com.google.protobuf.StructOrBuilder getFilterOrBuilder() { if (filterBuilder_ != null) { @@ -1082,17 +1064,18 @@ public com.google.protobuf.StructOrBuilder getFilterOrBuilder() { /** *
      * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive
-     * with specifying ids to delete in the ids param or using delete_all=True.
-     * See https://www.pinecone.io/docs/metadata-filtering/.
+     * with specifying ids to delete in the ids param or using `delete_all=True`.
+     * For guidance and examples, see [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
+     * Serverless indexes do not support delete by metadata. Instead, you can use the `list` operation to fetch the vector IDs based on their common ID prefix and then delete the records by ID.
      * 
* - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> getFilterFieldBuilder() { if (filterBuilder_ == null) { - filterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + filterBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( getFilter(), getParentForChildren(), @@ -1101,18 +1084,6 @@ public com.google.protobuf.StructOrBuilder getFilterOrBuilder() { } return filterBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:DeleteRequest) } diff --git a/src/main/java/io/pinecone/proto/DeleteRequestOrBuilder.java b/src/main/java/io/pinecone/proto/DeleteRequestOrBuilder.java index 99e7c8ef..9a3c0e0f 100644 --- a/src/main/java/io/pinecone/proto/DeleteRequestOrBuilder.java +++ b/src/main/java/io/pinecone/proto/DeleteRequestOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface DeleteRequestOrBuilder extends @@ -13,7 +14,7 @@ public interface DeleteRequestOrBuilder extends * Vectors to delete. * * - * repeated string ids = 1; + * repeated string ids = 1 [json_name = "ids"]; * @return A list containing the ids. */ java.util.List @@ -23,7 +24,7 @@ public interface DeleteRequestOrBuilder extends * Vectors to delete. * * - * repeated string ids = 1; + * repeated string ids = 1 [json_name = "ids"]; * @return The count of ids. */ int getIdsCount(); @@ -32,7 +33,7 @@ public interface DeleteRequestOrBuilder extends * Vectors to delete. * * - * repeated string ids = 1; + * repeated string ids = 1 [json_name = "ids"]; * @param index The index of the element to return. * @return The ids at the given index. */ @@ -42,7 +43,7 @@ public interface DeleteRequestOrBuilder extends * Vectors to delete. * * - * repeated string ids = 1; + * repeated string ids = 1 [json_name = "ids"]; * @param index The index of the value to return. * @return The bytes of the ids at the given index. */ @@ -54,7 +55,7 @@ public interface DeleteRequestOrBuilder extends * This indicates that all vectors in the index namespace should be deleted. * * - * bool delete_all = 2; + * bool delete_all = 2 [json_name = "deleteAll"]; * @return The deleteAll. */ boolean getDeleteAll(); @@ -64,7 +65,7 @@ public interface DeleteRequestOrBuilder extends * The namespace to delete vectors from, if applicable. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The namespace. */ java.lang.String getNamespace(); @@ -73,7 +74,7 @@ public interface DeleteRequestOrBuilder extends * The namespace to delete vectors from, if applicable. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The bytes for namespace. */ com.google.protobuf.ByteString @@ -82,33 +83,36 @@ public interface DeleteRequestOrBuilder extends /** *
    * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive
-   * with specifying ids to delete in the ids param or using delete_all=True.
-   * See https://www.pinecone.io/docs/metadata-filtering/.
+   * with specifying ids to delete in the ids param or using `delete_all=True`.
+   * For guidance and examples, see [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
+   * Serverless indexes do not support delete by metadata. Instead, you can use the `list` operation to fetch the vector IDs based on their common ID prefix and then delete the records by ID.
    * 
* - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; * @return Whether the filter field is set. */ boolean hasFilter(); /** *
    * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive
-   * with specifying ids to delete in the ids param or using delete_all=True.
-   * See https://www.pinecone.io/docs/metadata-filtering/.
+   * with specifying ids to delete in the ids param or using `delete_all=True`.
+   * For guidance and examples, see [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
+   * Serverless indexes do not support delete by metadata. Instead, you can use the `list` operation to fetch the vector IDs based on their common ID prefix and then delete the records by ID.
    * 
* - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; * @return The filter. */ com.google.protobuf.Struct getFilter(); /** *
    * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive
-   * with specifying ids to delete in the ids param or using delete_all=True.
-   * See https://www.pinecone.io/docs/metadata-filtering/.
+   * with specifying ids to delete in the ids param or using `delete_all=True`.
+   * For guidance and examples, see [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
+   * Serverless indexes do not support delete by metadata. Instead, you can use the `list` operation to fetch the vector IDs based on their common ID prefix and then delete the records by ID.
    * 
* - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; */ com.google.protobuf.StructOrBuilder getFilterOrBuilder(); } diff --git a/src/main/java/io/pinecone/proto/DeleteResponse.java b/src/main/java/io/pinecone/proto/DeleteResponse.java index fded5538..6ff7b5f0 100644 --- a/src/main/java/io/pinecone/proto/DeleteResponse.java +++ b/src/main/java/io/pinecone/proto/DeleteResponse.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** @@ -12,33 +13,35 @@ * Protobuf type {@code DeleteResponse} */ public final class DeleteResponse extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:DeleteResponse) DeleteResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + DeleteResponse.class.getName()); + } // Use DeleteResponse.newBuilder() to construct. - private DeleteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private DeleteResponse() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_DeleteResponse_descriptor; + return io.pinecone.proto.DbData202501.internal_static_DeleteResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_DeleteResponse_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_DeleteResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.DeleteResponse.class, io.pinecone.proto.DeleteResponse.Builder.class); } @@ -131,20 +134,20 @@ public static io.pinecone.proto.DeleteResponse parseFrom( } public static io.pinecone.proto.DeleteResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.DeleteResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.DeleteResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -152,20 +155,20 @@ public static io.pinecone.proto.DeleteResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.DeleteResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.DeleteResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -185,7 +188,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -197,18 +200,18 @@ protected Builder newBuilderForType( * Protobuf type {@code DeleteResponse} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:DeleteResponse) io.pinecone.proto.DeleteResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_DeleteResponse_descriptor; + return io.pinecone.proto.DbData202501.internal_static_DeleteResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_DeleteResponse_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_DeleteResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.DeleteResponse.class, io.pinecone.proto.DeleteResponse.Builder.class); } @@ -219,7 +222,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -232,7 +235,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_DeleteResponse_descriptor; + return io.pinecone.proto.DbData202501.internal_static_DeleteResponse_descriptor; } @java.lang.Override @@ -256,38 +259,6 @@ public io.pinecone.proto.DeleteResponse buildPartial() { return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.DeleteResponse) { @@ -341,18 +312,6 @@ public Builder mergeFrom( } // finally return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:DeleteResponse) } diff --git a/src/main/java/io/pinecone/proto/DeleteResponseOrBuilder.java b/src/main/java/io/pinecone/proto/DeleteResponseOrBuilder.java index 2d3ef048..7f131d7d 100644 --- a/src/main/java/io/pinecone/proto/DeleteResponseOrBuilder.java +++ b/src/main/java/io/pinecone/proto/DeleteResponseOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface DeleteResponseOrBuilder extends diff --git a/src/main/java/io/pinecone/proto/DescribeIndexStatsRequest.java b/src/main/java/io/pinecone/proto/DescribeIndexStatsRequest.java index 11c3a4e3..309c531d 100644 --- a/src/main/java/io/pinecone/proto/DescribeIndexStatsRequest.java +++ b/src/main/java/io/pinecone/proto/DescribeIndexStatsRequest.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** @@ -12,33 +13,35 @@ * Protobuf type {@code DescribeIndexStatsRequest} */ public final class DescribeIndexStatsRequest extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:DescribeIndexStatsRequest) DescribeIndexStatsRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + DescribeIndexStatsRequest.class.getName()); + } // Use DescribeIndexStatsRequest.newBuilder() to construct. - private DescribeIndexStatsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DescribeIndexStatsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private DescribeIndexStatsRequest() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DescribeIndexStatsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_DescribeIndexStatsRequest_descriptor; + return io.pinecone.proto.DbData202501.internal_static_DescribeIndexStatsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_DescribeIndexStatsRequest_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_DescribeIndexStatsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.DescribeIndexStatsRequest.class, io.pinecone.proto.DescribeIndexStatsRequest.Builder.class); } @@ -50,10 +53,10 @@ protected java.lang.Object newInstance( *
    * If this parameter is present, the operation only returns statistics
    * for vectors that satisfy the filter.
-   * See https://www.pinecone.io/docs/metadata-filtering/.
+   * See https://docs.pinecone.io/guides/data/filtering-with-metadata.
    * 
* - * .google.protobuf.Struct filter = 1; + * .google.protobuf.Struct filter = 1 [json_name = "filter"]; * @return Whether the filter field is set. */ @java.lang.Override @@ -64,10 +67,10 @@ public boolean hasFilter() { *
    * If this parameter is present, the operation only returns statistics
    * for vectors that satisfy the filter.
-   * See https://www.pinecone.io/docs/metadata-filtering/.
+   * See https://docs.pinecone.io/guides/data/filtering-with-metadata.
    * 
* - * .google.protobuf.Struct filter = 1; + * .google.protobuf.Struct filter = 1 [json_name = "filter"]; * @return The filter. */ @java.lang.Override @@ -78,10 +81,10 @@ public com.google.protobuf.Struct getFilter() { *
    * If this parameter is present, the operation only returns statistics
    * for vectors that satisfy the filter.
-   * See https://www.pinecone.io/docs/metadata-filtering/.
+   * See https://docs.pinecone.io/guides/data/filtering-with-metadata.
    * 
* - * .google.protobuf.Struct filter = 1; + * .google.protobuf.Struct filter = 1 [json_name = "filter"]; */ @java.lang.Override public com.google.protobuf.StructOrBuilder getFilterOrBuilder() { @@ -192,20 +195,20 @@ public static io.pinecone.proto.DescribeIndexStatsRequest parseFrom( } public static io.pinecone.proto.DescribeIndexStatsRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.DescribeIndexStatsRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.DescribeIndexStatsRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -213,20 +216,20 @@ public static io.pinecone.proto.DescribeIndexStatsRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.DescribeIndexStatsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.DescribeIndexStatsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -246,7 +249,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -258,18 +261,18 @@ protected Builder newBuilderForType( * Protobuf type {@code DescribeIndexStatsRequest} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:DescribeIndexStatsRequest) io.pinecone.proto.DescribeIndexStatsRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_DescribeIndexStatsRequest_descriptor; + return io.pinecone.proto.DbData202501.internal_static_DescribeIndexStatsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_DescribeIndexStatsRequest_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_DescribeIndexStatsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.DescribeIndexStatsRequest.class, io.pinecone.proto.DescribeIndexStatsRequest.Builder.class); } @@ -280,12 +283,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getFilterFieldBuilder(); } @@ -305,7 +308,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_DescribeIndexStatsRequest_descriptor; + return io.pinecone.proto.DbData202501.internal_static_DescribeIndexStatsRequest_descriptor; } @java.lang.Override @@ -342,38 +345,6 @@ private void buildPartial0(io.pinecone.proto.DescribeIndexStatsRequest result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.DescribeIndexStatsRequest) { @@ -440,16 +411,16 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.Struct filter_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> filterBuilder_; /** *
      * If this parameter is present, the operation only returns statistics
      * for vectors that satisfy the filter.
-     * See https://www.pinecone.io/docs/metadata-filtering/.
+     * See https://docs.pinecone.io/guides/data/filtering-with-metadata.
      * 
* - * .google.protobuf.Struct filter = 1; + * .google.protobuf.Struct filter = 1 [json_name = "filter"]; * @return Whether the filter field is set. */ public boolean hasFilter() { @@ -459,10 +430,10 @@ public boolean hasFilter() { *
      * If this parameter is present, the operation only returns statistics
      * for vectors that satisfy the filter.
-     * See https://www.pinecone.io/docs/metadata-filtering/.
+     * See https://docs.pinecone.io/guides/data/filtering-with-metadata.
      * 
* - * .google.protobuf.Struct filter = 1; + * .google.protobuf.Struct filter = 1 [json_name = "filter"]; * @return The filter. */ public com.google.protobuf.Struct getFilter() { @@ -476,10 +447,10 @@ public com.google.protobuf.Struct getFilter() { *
      * If this parameter is present, the operation only returns statistics
      * for vectors that satisfy the filter.
-     * See https://www.pinecone.io/docs/metadata-filtering/.
+     * See https://docs.pinecone.io/guides/data/filtering-with-metadata.
      * 
* - * .google.protobuf.Struct filter = 1; + * .google.protobuf.Struct filter = 1 [json_name = "filter"]; */ public Builder setFilter(com.google.protobuf.Struct value) { if (filterBuilder_ == null) { @@ -498,10 +469,10 @@ public Builder setFilter(com.google.protobuf.Struct value) { *
      * If this parameter is present, the operation only returns statistics
      * for vectors that satisfy the filter.
-     * See https://www.pinecone.io/docs/metadata-filtering/.
+     * See https://docs.pinecone.io/guides/data/filtering-with-metadata.
      * 
* - * .google.protobuf.Struct filter = 1; + * .google.protobuf.Struct filter = 1 [json_name = "filter"]; */ public Builder setFilter( com.google.protobuf.Struct.Builder builderForValue) { @@ -518,10 +489,10 @@ public Builder setFilter( *
      * If this parameter is present, the operation only returns statistics
      * for vectors that satisfy the filter.
-     * See https://www.pinecone.io/docs/metadata-filtering/.
+     * See https://docs.pinecone.io/guides/data/filtering-with-metadata.
      * 
* - * .google.protobuf.Struct filter = 1; + * .google.protobuf.Struct filter = 1 [json_name = "filter"]; */ public Builder mergeFilter(com.google.protobuf.Struct value) { if (filterBuilder_ == null) { @@ -545,10 +516,10 @@ public Builder mergeFilter(com.google.protobuf.Struct value) { *
      * If this parameter is present, the operation only returns statistics
      * for vectors that satisfy the filter.
-     * See https://www.pinecone.io/docs/metadata-filtering/.
+     * See https://docs.pinecone.io/guides/data/filtering-with-metadata.
      * 
* - * .google.protobuf.Struct filter = 1; + * .google.protobuf.Struct filter = 1 [json_name = "filter"]; */ public Builder clearFilter() { bitField0_ = (bitField0_ & ~0x00000001); @@ -564,10 +535,10 @@ public Builder clearFilter() { *
      * If this parameter is present, the operation only returns statistics
      * for vectors that satisfy the filter.
-     * See https://www.pinecone.io/docs/metadata-filtering/.
+     * See https://docs.pinecone.io/guides/data/filtering-with-metadata.
      * 
* - * .google.protobuf.Struct filter = 1; + * .google.protobuf.Struct filter = 1 [json_name = "filter"]; */ public com.google.protobuf.Struct.Builder getFilterBuilder() { bitField0_ |= 0x00000001; @@ -578,10 +549,10 @@ public com.google.protobuf.Struct.Builder getFilterBuilder() { *
      * If this parameter is present, the operation only returns statistics
      * for vectors that satisfy the filter.
-     * See https://www.pinecone.io/docs/metadata-filtering/.
+     * See https://docs.pinecone.io/guides/data/filtering-with-metadata.
      * 
* - * .google.protobuf.Struct filter = 1; + * .google.protobuf.Struct filter = 1 [json_name = "filter"]; */ public com.google.protobuf.StructOrBuilder getFilterOrBuilder() { if (filterBuilder_ != null) { @@ -595,16 +566,16 @@ public com.google.protobuf.StructOrBuilder getFilterOrBuilder() { *
      * If this parameter is present, the operation only returns statistics
      * for vectors that satisfy the filter.
-     * See https://www.pinecone.io/docs/metadata-filtering/.
+     * See https://docs.pinecone.io/guides/data/filtering-with-metadata.
      * 
* - * .google.protobuf.Struct filter = 1; + * .google.protobuf.Struct filter = 1 [json_name = "filter"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> getFilterFieldBuilder() { if (filterBuilder_ == null) { - filterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + filterBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( getFilter(), getParentForChildren(), @@ -613,18 +584,6 @@ public com.google.protobuf.StructOrBuilder getFilterOrBuilder() { } return filterBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:DescribeIndexStatsRequest) } diff --git a/src/main/java/io/pinecone/proto/DescribeIndexStatsRequestOrBuilder.java b/src/main/java/io/pinecone/proto/DescribeIndexStatsRequestOrBuilder.java index a584471f..aee33090 100644 --- a/src/main/java/io/pinecone/proto/DescribeIndexStatsRequestOrBuilder.java +++ b/src/main/java/io/pinecone/proto/DescribeIndexStatsRequestOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface DescribeIndexStatsRequestOrBuilder extends @@ -12,10 +13,10 @@ public interface DescribeIndexStatsRequestOrBuilder extends *
    * If this parameter is present, the operation only returns statistics
    * for vectors that satisfy the filter.
-   * See https://www.pinecone.io/docs/metadata-filtering/.
+   * See https://docs.pinecone.io/guides/data/filtering-with-metadata.
    * 
* - * .google.protobuf.Struct filter = 1; + * .google.protobuf.Struct filter = 1 [json_name = "filter"]; * @return Whether the filter field is set. */ boolean hasFilter(); @@ -23,10 +24,10 @@ public interface DescribeIndexStatsRequestOrBuilder extends *
    * If this parameter is present, the operation only returns statistics
    * for vectors that satisfy the filter.
-   * See https://www.pinecone.io/docs/metadata-filtering/.
+   * See https://docs.pinecone.io/guides/data/filtering-with-metadata.
    * 
* - * .google.protobuf.Struct filter = 1; + * .google.protobuf.Struct filter = 1 [json_name = "filter"]; * @return The filter. */ com.google.protobuf.Struct getFilter(); @@ -34,10 +35,10 @@ public interface DescribeIndexStatsRequestOrBuilder extends *
    * If this parameter is present, the operation only returns statistics
    * for vectors that satisfy the filter.
-   * See https://www.pinecone.io/docs/metadata-filtering/.
+   * See https://docs.pinecone.io/guides/data/filtering-with-metadata.
    * 
* - * .google.protobuf.Struct filter = 1; + * .google.protobuf.Struct filter = 1 [json_name = "filter"]; */ com.google.protobuf.StructOrBuilder getFilterOrBuilder(); } diff --git a/src/main/java/io/pinecone/proto/DescribeIndexStatsResponse.java b/src/main/java/io/pinecone/proto/DescribeIndexStatsResponse.java index 2ba576bb..ef53e58a 100644 --- a/src/main/java/io/pinecone/proto/DescribeIndexStatsResponse.java +++ b/src/main/java/io/pinecone/proto/DescribeIndexStatsResponse.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** @@ -12,27 +13,31 @@ * Protobuf type {@code DescribeIndexStatsResponse} */ public final class DescribeIndexStatsResponse extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:DescribeIndexStatsResponse) DescribeIndexStatsResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + DescribeIndexStatsResponse.class.getName()); + } // Use DescribeIndexStatsResponse.newBuilder() to construct. - private DescribeIndexStatsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DescribeIndexStatsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private DescribeIndexStatsResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DescribeIndexStatsResponse(); + metric_ = ""; + vectorType_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_DescribeIndexStatsResponse_descriptor; + return io.pinecone.proto.DbData202501.internal_static_DescribeIndexStatsResponse_descriptor; } @SuppressWarnings({"rawtypes"}) @@ -48,20 +53,21 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_DescribeIndexStatsResponse_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_DescribeIndexStatsResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.DescribeIndexStatsResponse.class, io.pinecone.proto.DescribeIndexStatsResponse.Builder.class); } + private int bitField0_; public static final int NAMESPACES_FIELD_NUMBER = 1; private static final class NamespacesDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, io.pinecone.proto.NamespaceSummary> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( - io.pinecone.proto.VectorServiceOuterClass.internal_static_DescribeIndexStatsResponse_NamespacesEntry_descriptor, + io.pinecone.proto.DbData202501.internal_static_DescribeIndexStatsResponse_NamespacesEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, @@ -88,7 +94,7 @@ public int getNamespacesCount() { * summary will reflect only vectors matching that expression. * * - * map<string, .NamespaceSummary> namespaces = 1; + * map<string, .NamespaceSummary> namespaces = 1 [json_name = "namespaces"]; */ @java.lang.Override public boolean containsNamespaces( @@ -111,7 +117,7 @@ public java.util.Map getNa * summary will reflect only vectors matching that expression. * * - * map<string, .NamespaceSummary> namespaces = 1; + * map<string, .NamespaceSummary> namespaces = 1 [json_name = "namespaces"]; */ @java.lang.Override public java.util.Map getNamespacesMap() { @@ -124,7 +130,7 @@ public java.util.Map getNa * summary will reflect only vectors matching that expression. * * - * map<string, .NamespaceSummary> namespaces = 1; + * map<string, .NamespaceSummary> namespaces = 1 [json_name = "namespaces"]; */ @java.lang.Override public /* nullable */ @@ -144,7 +150,7 @@ io.pinecone.proto.NamespaceSummary getNamespacesOrDefault( * summary will reflect only vectors matching that expression. * * - * map<string, .NamespaceSummary> namespaces = 1; + * map<string, .NamespaceSummary> namespaces = 1 [json_name = "namespaces"]; */ @java.lang.Override public io.pinecone.proto.NamespaceSummary getNamespacesOrThrow( @@ -162,10 +168,22 @@ public io.pinecone.proto.NamespaceSummary getNamespacesOrThrow( private int dimension_ = 0; /** *
-   * The dimension of the indexed vectors.
+   * The dimension of the indexed vectors. Not specified if `sparse` index.
    * 
* - * uint32 dimension = 2; + * optional uint32 dimension = 2 [json_name = "dimension"]; + * @return Whether the dimension field is set. + */ + @java.lang.Override + public boolean hasDimension() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The dimension of the indexed vectors. Not specified if `sparse` index.
+   * 
+ * + * optional uint32 dimension = 2 [json_name = "dimension"]; * @return The dimension. */ @java.lang.Override @@ -178,9 +196,13 @@ public int getDimension() { /** *
    * The fullness of the index, regardless of whether a metadata filter expression was passed. The granularity of this metric is 10%.
+   *
+   * Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes.
+   *
+   * The index fullness result may be inaccurate during pod resizing; to get the status of a pod resizing process, use [`describe_index`](https://docs.pinecone.io/reference/api/2024-04/control-plane/describe_index).
    * 
* - * float index_fullness = 3; + * float index_fullness = 3 [json_name = "indexFullness"]; * @return The indexFullness. */ @java.lang.Override @@ -195,7 +217,7 @@ public float getIndexFullness() { * The total number of vectors in the index, regardless of whether a metadata filter expression was passed * * - * uint32 total_vector_count = 4; + * uint32 total_vector_count = 4 [json_name = "totalVectorCount"]; * @return The totalVectorCount. */ @java.lang.Override @@ -203,6 +225,124 @@ public int getTotalVectorCount() { return totalVectorCount_; } + public static final int METRIC_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object metric_ = ""; + /** + *
+   * The metric of the index.
+   * 
+ * + * optional string metric = 5 [json_name = "metric"]; + * @return Whether the metric field is set. + */ + @java.lang.Override + public boolean hasMetric() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * The metric of the index.
+   * 
+ * + * optional string metric = 5 [json_name = "metric"]; + * @return The metric. + */ + @java.lang.Override + public java.lang.String getMetric() { + java.lang.Object ref = metric_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metric_ = s; + return s; + } + } + /** + *
+   * The metric of the index.
+   * 
+ * + * optional string metric = 5 [json_name = "metric"]; + * @return The bytes for metric. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMetricBytes() { + java.lang.Object ref = metric_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metric_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VECTOR_TYPE_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object vectorType_ = ""; + /** + *
+   * The type of the vector the index supports.
+   * 
+ * + * optional string vector_type = 6 [json_name = "vectorType"]; + * @return Whether the vectorType field is set. + */ + @java.lang.Override + public boolean hasVectorType() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+   * The type of the vector the index supports.
+   * 
+ * + * optional string vector_type = 6 [json_name = "vectorType"]; + * @return The vectorType. + */ + @java.lang.Override + public java.lang.String getVectorType() { + java.lang.Object ref = vectorType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vectorType_ = s; + return s; + } + } + /** + *
+   * The type of the vector the index supports.
+   * 
+ * + * optional string vector_type = 6 [json_name = "vectorType"]; + * @return The bytes for vectorType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVectorTypeBytes() { + java.lang.Object ref = vectorType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + vectorType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -217,13 +357,13 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.GeneratedMessage .serializeStringMapTo( output, internalGetNamespaces(), NamespacesDefaultEntryHolder.defaultEntry, 1); - if (dimension_ != 0) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeUInt32(2, dimension_); } if (java.lang.Float.floatToRawIntBits(indexFullness_) != 0) { @@ -232,6 +372,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (totalVectorCount_ != 0) { output.writeUInt32(4, totalVectorCount_); } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, metric_); + } + if (((bitField0_ & 0x00000004) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, vectorType_); + } getUnknownFields().writeTo(output); } @@ -251,7 +397,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, namespaces__); } - if (dimension_ != 0) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, dimension_); } @@ -263,6 +409,12 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(4, totalVectorCount_); } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, metric_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, vectorType_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -280,13 +432,26 @@ public boolean equals(final java.lang.Object obj) { if (!internalGetNamespaces().equals( other.internalGetNamespaces())) return false; - if (getDimension() - != other.getDimension()) return false; + if (hasDimension() != other.hasDimension()) return false; + if (hasDimension()) { + if (getDimension() + != other.getDimension()) return false; + } if (java.lang.Float.floatToIntBits(getIndexFullness()) != java.lang.Float.floatToIntBits( other.getIndexFullness())) return false; if (getTotalVectorCount() != other.getTotalVectorCount()) return false; + if (hasMetric() != other.hasMetric()) return false; + if (hasMetric()) { + if (!getMetric() + .equals(other.getMetric())) return false; + } + if (hasVectorType() != other.hasVectorType()) return false; + if (hasVectorType()) { + if (!getVectorType() + .equals(other.getVectorType())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -302,13 +467,23 @@ public int hashCode() { hash = (37 * hash) + NAMESPACES_FIELD_NUMBER; hash = (53 * hash) + internalGetNamespaces().hashCode(); } - hash = (37 * hash) + DIMENSION_FIELD_NUMBER; - hash = (53 * hash) + getDimension(); + if (hasDimension()) { + hash = (37 * hash) + DIMENSION_FIELD_NUMBER; + hash = (53 * hash) + getDimension(); + } hash = (37 * hash) + INDEX_FULLNESS_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits( getIndexFullness()); hash = (37 * hash) + TOTAL_VECTOR_COUNT_FIELD_NUMBER; hash = (53 * hash) + getTotalVectorCount(); + if (hasMetric()) { + hash = (37 * hash) + METRIC_FIELD_NUMBER; + hash = (53 * hash) + getMetric().hashCode(); + } + if (hasVectorType()) { + hash = (37 * hash) + VECTOR_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getVectorType().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -348,20 +523,20 @@ public static io.pinecone.proto.DescribeIndexStatsResponse parseFrom( } public static io.pinecone.proto.DescribeIndexStatsResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.DescribeIndexStatsResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.DescribeIndexStatsResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -369,20 +544,20 @@ public static io.pinecone.proto.DescribeIndexStatsResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.DescribeIndexStatsResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.DescribeIndexStatsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -402,7 +577,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -414,12 +589,12 @@ protected Builder newBuilderForType( * Protobuf type {@code DescribeIndexStatsResponse} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:DescribeIndexStatsResponse) io.pinecone.proto.DescribeIndexStatsResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_DescribeIndexStatsResponse_descriptor; + return io.pinecone.proto.DbData202501.internal_static_DescribeIndexStatsResponse_descriptor; } @SuppressWarnings({"rawtypes"}) @@ -445,9 +620,9 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_DescribeIndexStatsResponse_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_DescribeIndexStatsResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.DescribeIndexStatsResponse.class, io.pinecone.proto.DescribeIndexStatsResponse.Builder.class); } @@ -458,7 +633,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -470,13 +645,15 @@ public Builder clear() { dimension_ = 0; indexFullness_ = 0F; totalVectorCount_ = 0; + metric_ = ""; + vectorType_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_DescribeIndexStatsResponse_descriptor; + return io.pinecone.proto.DbData202501.internal_static_DescribeIndexStatsResponse_descriptor; } @java.lang.Override @@ -506,8 +683,10 @@ private void buildPartial0(io.pinecone.proto.DescribeIndexStatsResponse result) if (((from_bitField0_ & 0x00000001) != 0)) { result.namespaces_ = internalGetNamespaces().build(NamespacesDefaultEntryHolder.defaultEntry); } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.dimension_ = dimension_; + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000004) != 0)) { result.indexFullness_ = indexFullness_; @@ -515,40 +694,17 @@ private void buildPartial0(io.pinecone.proto.DescribeIndexStatsResponse result) if (((from_bitField0_ & 0x00000008) != 0)) { result.totalVectorCount_ = totalVectorCount_; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.metric_ = metric_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.vectorType_ = vectorType_; + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.DescribeIndexStatsResponse) { @@ -564,7 +720,7 @@ public Builder mergeFrom(io.pinecone.proto.DescribeIndexStatsResponse other) { internalGetMutableNamespaces().mergeFrom( other.internalGetNamespaces()); bitField0_ |= 0x00000001; - if (other.getDimension() != 0) { + if (other.hasDimension()) { setDimension(other.getDimension()); } if (other.getIndexFullness() != 0F) { @@ -573,6 +729,16 @@ public Builder mergeFrom(io.pinecone.proto.DescribeIndexStatsResponse other) { if (other.getTotalVectorCount() != 0) { setTotalVectorCount(other.getTotalVectorCount()); } + if (other.hasMetric()) { + metric_ = other.metric_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasVectorType()) { + vectorType_ = other.vectorType_; + bitField0_ |= 0x00000020; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -623,6 +789,16 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 32 + case 42: { + metric_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + vectorType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -682,7 +858,7 @@ public int getNamespacesCount() { * summary will reflect only vectors matching that expression. * * - * map<string, .NamespaceSummary> namespaces = 1; + * map<string, .NamespaceSummary> namespaces = 1 [json_name = "namespaces"]; */ @java.lang.Override public boolean containsNamespaces( @@ -705,7 +881,7 @@ public java.util.Map getNa * summary will reflect only vectors matching that expression. * * - * map<string, .NamespaceSummary> namespaces = 1; + * map<string, .NamespaceSummary> namespaces = 1 [json_name = "namespaces"]; */ @java.lang.Override public java.util.Map getNamespacesMap() { @@ -718,7 +894,7 @@ public java.util.Map getNa * summary will reflect only vectors matching that expression. * * - * map<string, .NamespaceSummary> namespaces = 1; + * map<string, .NamespaceSummary> namespaces = 1 [json_name = "namespaces"]; */ @java.lang.Override public /* nullable */ @@ -737,7 +913,7 @@ io.pinecone.proto.NamespaceSummary getNamespacesOrDefault( * summary will reflect only vectors matching that expression. * * - * map<string, .NamespaceSummary> namespaces = 1; + * map<string, .NamespaceSummary> namespaces = 1 [json_name = "namespaces"]; */ @java.lang.Override public io.pinecone.proto.NamespaceSummary getNamespacesOrThrow( @@ -761,7 +937,7 @@ public Builder clearNamespaces() { * summary will reflect only vectors matching that expression. * * - * map<string, .NamespaceSummary> namespaces = 1; + * map<string, .NamespaceSummary> namespaces = 1 [json_name = "namespaces"]; */ public Builder removeNamespaces( java.lang.String key) { @@ -786,7 +962,7 @@ public Builder removeNamespaces( * summary will reflect only vectors matching that expression. * * - * map<string, .NamespaceSummary> namespaces = 1; + * map<string, .NamespaceSummary> namespaces = 1 [json_name = "namespaces"]; */ public Builder putNamespaces( java.lang.String key, @@ -805,7 +981,7 @@ public Builder putNamespaces( * summary will reflect only vectors matching that expression. * * - * map<string, .NamespaceSummary> namespaces = 1; + * map<string, .NamespaceSummary> namespaces = 1 [json_name = "namespaces"]; */ public Builder putAllNamespaces( java.util.Map values) { @@ -826,7 +1002,7 @@ public Builder putAllNamespaces( * summary will reflect only vectors matching that expression. * * - * map<string, .NamespaceSummary> namespaces = 1; + * map<string, .NamespaceSummary> namespaces = 1 [json_name = "namespaces"]; */ public io.pinecone.proto.NamespaceSummary.Builder putNamespacesBuilderIfAbsent( java.lang.String key) { @@ -846,10 +1022,22 @@ public io.pinecone.proto.NamespaceSummary.Builder putNamespacesBuilderIfAbsent( private int dimension_ ; /** *
-     * The dimension of the indexed vectors.
+     * The dimension of the indexed vectors. Not specified if `sparse` index.
      * 
* - * uint32 dimension = 2; + * optional uint32 dimension = 2 [json_name = "dimension"]; + * @return Whether the dimension field is set. + */ + @java.lang.Override + public boolean hasDimension() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * The dimension of the indexed vectors. Not specified if `sparse` index.
+     * 
+ * + * optional uint32 dimension = 2 [json_name = "dimension"]; * @return The dimension. */ @java.lang.Override @@ -858,10 +1046,10 @@ public int getDimension() { } /** *
-     * The dimension of the indexed vectors.
+     * The dimension of the indexed vectors. Not specified if `sparse` index.
      * 
* - * uint32 dimension = 2; + * optional uint32 dimension = 2 [json_name = "dimension"]; * @param value The dimension to set. * @return This builder for chaining. */ @@ -874,10 +1062,10 @@ public Builder setDimension(int value) { } /** *
-     * The dimension of the indexed vectors.
+     * The dimension of the indexed vectors. Not specified if `sparse` index.
      * 
* - * uint32 dimension = 2; + * optional uint32 dimension = 2 [json_name = "dimension"]; * @return This builder for chaining. */ public Builder clearDimension() { @@ -891,9 +1079,13 @@ public Builder clearDimension() { /** *
      * The fullness of the index, regardless of whether a metadata filter expression was passed. The granularity of this metric is 10%.
+     *
+     * Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes.
+     *
+     * The index fullness result may be inaccurate during pod resizing; to get the status of a pod resizing process, use [`describe_index`](https://docs.pinecone.io/reference/api/2024-04/control-plane/describe_index).
      * 
* - * float index_fullness = 3; + * float index_fullness = 3 [json_name = "indexFullness"]; * @return The indexFullness. */ @java.lang.Override @@ -903,9 +1095,13 @@ public float getIndexFullness() { /** *
      * The fullness of the index, regardless of whether a metadata filter expression was passed. The granularity of this metric is 10%.
+     *
+     * Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes.
+     *
+     * The index fullness result may be inaccurate during pod resizing; to get the status of a pod resizing process, use [`describe_index`](https://docs.pinecone.io/reference/api/2024-04/control-plane/describe_index).
      * 
* - * float index_fullness = 3; + * float index_fullness = 3 [json_name = "indexFullness"]; * @param value The indexFullness to set. * @return This builder for chaining. */ @@ -919,9 +1115,13 @@ public Builder setIndexFullness(float value) { /** *
      * The fullness of the index, regardless of whether a metadata filter expression was passed. The granularity of this metric is 10%.
+     *
+     * Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes.
+     *
+     * The index fullness result may be inaccurate during pod resizing; to get the status of a pod resizing process, use [`describe_index`](https://docs.pinecone.io/reference/api/2024-04/control-plane/describe_index).
      * 
* - * float index_fullness = 3; + * float index_fullness = 3 [json_name = "indexFullness"]; * @return This builder for chaining. */ public Builder clearIndexFullness() { @@ -937,7 +1137,7 @@ public Builder clearIndexFullness() { * The total number of vectors in the index, regardless of whether a metadata filter expression was passed * * - * uint32 total_vector_count = 4; + * uint32 total_vector_count = 4 [json_name = "totalVectorCount"]; * @return The totalVectorCount. */ @java.lang.Override @@ -949,7 +1149,7 @@ public int getTotalVectorCount() { * The total number of vectors in the index, regardless of whether a metadata filter expression was passed * * - * uint32 total_vector_count = 4; + * uint32 total_vector_count = 4 [json_name = "totalVectorCount"]; * @param value The totalVectorCount to set. * @return This builder for chaining. */ @@ -965,7 +1165,7 @@ public Builder setTotalVectorCount(int value) { * The total number of vectors in the index, regardless of whether a metadata filter expression was passed * * - * uint32 total_vector_count = 4; + * uint32 total_vector_count = 4 [json_name = "totalVectorCount"]; * @return This builder for chaining. */ public Builder clearTotalVectorCount() { @@ -974,18 +1174,212 @@ public Builder clearTotalVectorCount() { onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + private java.lang.Object metric_ = ""; + /** + *
+     * The metric of the index.
+     * 
+ * + * optional string metric = 5 [json_name = "metric"]; + * @return Whether the metric field is set. + */ + public boolean hasMetric() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * The metric of the index.
+     * 
+ * + * optional string metric = 5 [json_name = "metric"]; + * @return The metric. + */ + public java.lang.String getMetric() { + java.lang.Object ref = metric_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metric_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The metric of the index.
+     * 
+ * + * optional string metric = 5 [json_name = "metric"]; + * @return The bytes for metric. + */ + public com.google.protobuf.ByteString + getMetricBytes() { + java.lang.Object ref = metric_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metric_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The metric of the index.
+     * 
+ * + * optional string metric = 5 [json_name = "metric"]; + * @param value The metric to set. + * @return This builder for chaining. + */ + public Builder setMetric( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + metric_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The metric of the index.
+     * 
+ * + * optional string metric = 5 [json_name = "metric"]; + * @return This builder for chaining. + */ + public Builder clearMetric() { + metric_ = getDefaultInstance().getMetric(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * The metric of the index.
+     * 
+ * + * optional string metric = 5 [json_name = "metric"]; + * @param value The bytes for metric to set. + * @return This builder for chaining. + */ + public Builder setMetricBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + metric_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; } + private java.lang.Object vectorType_ = ""; + /** + *
+     * The type of the vector the index supports.
+     * 
+ * + * optional string vector_type = 6 [json_name = "vectorType"]; + * @return Whether the vectorType field is set. + */ + public boolean hasVectorType() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * The type of the vector the index supports.
+     * 
+ * + * optional string vector_type = 6 [json_name = "vectorType"]; + * @return The vectorType. + */ + public java.lang.String getVectorType() { + java.lang.Object ref = vectorType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vectorType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of the vector the index supports.
+     * 
+ * + * optional string vector_type = 6 [json_name = "vectorType"]; + * @return The bytes for vectorType. + */ + public com.google.protobuf.ByteString + getVectorTypeBytes() { + java.lang.Object ref = vectorType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + vectorType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of the vector the index supports.
+     * 
+ * + * optional string vector_type = 6 [json_name = "vectorType"]; + * @param value The vectorType to set. + * @return This builder for chaining. + */ + public Builder setVectorType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + vectorType_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The type of the vector the index supports.
+     * 
+ * + * optional string vector_type = 6 [json_name = "vectorType"]; + * @return This builder for chaining. + */ + public Builder clearVectorType() { + vectorType_ = getDefaultInstance().getVectorType(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * The type of the vector the index supports.
+     * 
+ * + * optional string vector_type = 6 [json_name = "vectorType"]; + * @param value The bytes for vectorType to set. + * @return This builder for chaining. + */ + public Builder setVectorTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + vectorType_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } // @@protoc_insertion_point(builder_scope:DescribeIndexStatsResponse) } diff --git a/src/main/java/io/pinecone/proto/DescribeIndexStatsResponseOrBuilder.java b/src/main/java/io/pinecone/proto/DescribeIndexStatsResponseOrBuilder.java index 67f1174b..db7fc8af 100644 --- a/src/main/java/io/pinecone/proto/DescribeIndexStatsResponseOrBuilder.java +++ b/src/main/java/io/pinecone/proto/DescribeIndexStatsResponseOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface DescribeIndexStatsResponseOrBuilder extends @@ -15,7 +16,7 @@ public interface DescribeIndexStatsResponseOrBuilder extends * summary will reflect only vectors matching that expression. * * - * map<string, .NamespaceSummary> namespaces = 1; + * map<string, .NamespaceSummary> namespaces = 1 [json_name = "namespaces"]; */ int getNamespacesCount(); /** @@ -25,7 +26,7 @@ public interface DescribeIndexStatsResponseOrBuilder extends * summary will reflect only vectors matching that expression. * * - * map<string, .NamespaceSummary> namespaces = 1; + * map<string, .NamespaceSummary> namespaces = 1 [json_name = "namespaces"]; */ boolean containsNamespaces( java.lang.String key); @@ -42,7 +43,7 @@ boolean containsNamespaces( * summary will reflect only vectors matching that expression. * * - * map<string, .NamespaceSummary> namespaces = 1; + * map<string, .NamespaceSummary> namespaces = 1 [json_name = "namespaces"]; */ java.util.Map getNamespacesMap(); @@ -53,7 +54,7 @@ boolean containsNamespaces( * summary will reflect only vectors matching that expression. * * - * map<string, .NamespaceSummary> namespaces = 1; + * map<string, .NamespaceSummary> namespaces = 1 [json_name = "namespaces"]; */ /* nullable */ io.pinecone.proto.NamespaceSummary getNamespacesOrDefault( @@ -67,17 +68,26 @@ io.pinecone.proto.NamespaceSummary getNamespacesOrDefault( * summary will reflect only vectors matching that expression. * * - * map<string, .NamespaceSummary> namespaces = 1; + * map<string, .NamespaceSummary> namespaces = 1 [json_name = "namespaces"]; */ io.pinecone.proto.NamespaceSummary getNamespacesOrThrow( java.lang.String key); /** *
-   * The dimension of the indexed vectors.
+   * The dimension of the indexed vectors. Not specified if `sparse` index.
    * 
* - * uint32 dimension = 2; + * optional uint32 dimension = 2 [json_name = "dimension"]; + * @return Whether the dimension field is set. + */ + boolean hasDimension(); + /** + *
+   * The dimension of the indexed vectors. Not specified if `sparse` index.
+   * 
+ * + * optional uint32 dimension = 2 [json_name = "dimension"]; * @return The dimension. */ int getDimension(); @@ -85,9 +95,13 @@ io.pinecone.proto.NamespaceSummary getNamespacesOrThrow( /** *
    * The fullness of the index, regardless of whether a metadata filter expression was passed. The granularity of this metric is 10%.
+   *
+   * Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes.
+   *
+   * The index fullness result may be inaccurate during pod resizing; to get the status of a pod resizing process, use [`describe_index`](https://docs.pinecone.io/reference/api/2024-04/control-plane/describe_index).
    * 
* - * float index_fullness = 3; + * float index_fullness = 3 [json_name = "indexFullness"]; * @return The indexFullness. */ float getIndexFullness(); @@ -97,8 +111,66 @@ io.pinecone.proto.NamespaceSummary getNamespacesOrThrow( * The total number of vectors in the index, regardless of whether a metadata filter expression was passed * * - * uint32 total_vector_count = 4; + * uint32 total_vector_count = 4 [json_name = "totalVectorCount"]; * @return The totalVectorCount. */ int getTotalVectorCount(); + + /** + *
+   * The metric of the index.
+   * 
+ * + * optional string metric = 5 [json_name = "metric"]; + * @return Whether the metric field is set. + */ + boolean hasMetric(); + /** + *
+   * The metric of the index.
+   * 
+ * + * optional string metric = 5 [json_name = "metric"]; + * @return The metric. + */ + java.lang.String getMetric(); + /** + *
+   * The metric of the index.
+   * 
+ * + * optional string metric = 5 [json_name = "metric"]; + * @return The bytes for metric. + */ + com.google.protobuf.ByteString + getMetricBytes(); + + /** + *
+   * The type of the vector the index supports.
+   * 
+ * + * optional string vector_type = 6 [json_name = "vectorType"]; + * @return Whether the vectorType field is set. + */ + boolean hasVectorType(); + /** + *
+   * The type of the vector the index supports.
+   * 
+ * + * optional string vector_type = 6 [json_name = "vectorType"]; + * @return The vectorType. + */ + java.lang.String getVectorType(); + /** + *
+   * The type of the vector the index supports.
+   * 
+ * + * optional string vector_type = 6 [json_name = "vectorType"]; + * @return The bytes for vectorType. + */ + com.google.protobuf.ByteString + getVectorTypeBytes(); } diff --git a/src/main/java/io/pinecone/proto/FetchRequest.java b/src/main/java/io/pinecone/proto/FetchRequest.java index 3c22f04d..57e1c086 100644 --- a/src/main/java/io/pinecone/proto/FetchRequest.java +++ b/src/main/java/io/pinecone/proto/FetchRequest.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** @@ -12,12 +13,21 @@ * Protobuf type {@code FetchRequest} */ public final class FetchRequest extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:FetchRequest) FetchRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + FetchRequest.class.getName()); + } // Use FetchRequest.newBuilder() to construct. - private FetchRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FetchRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private FetchRequest() { @@ -26,22 +36,15 @@ private FetchRequest() { namespace_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FetchRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_FetchRequest_descriptor; + return io.pinecone.proto.DbData202501.internal_static_FetchRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_FetchRequest_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_FetchRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.FetchRequest.class, io.pinecone.proto.FetchRequest.Builder.class); } @@ -55,7 +58,7 @@ protected java.lang.Object newInstance( * The vector IDs to fetch. Does not accept values containing spaces. * * - * repeated string ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string ids = 1 [json_name = "ids", (.google.api.field_behavior) = REQUIRED]; * @return A list containing the ids. */ public com.google.protobuf.ProtocolStringList @@ -67,7 +70,7 @@ protected java.lang.Object newInstance( * The vector IDs to fetch. Does not accept values containing spaces. * * - * repeated string ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string ids = 1 [json_name = "ids", (.google.api.field_behavior) = REQUIRED]; * @return The count of ids. */ public int getIdsCount() { @@ -78,7 +81,7 @@ public int getIdsCount() { * The vector IDs to fetch. Does not accept values containing spaces. * * - * repeated string ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string ids = 1 [json_name = "ids", (.google.api.field_behavior) = REQUIRED]; * @param index The index of the element to return. * @return The ids at the given index. */ @@ -90,7 +93,7 @@ public java.lang.String getIds(int index) { * The vector IDs to fetch. Does not accept values containing spaces. * * - * repeated string ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string ids = 1 [json_name = "ids", (.google.api.field_behavior) = REQUIRED]; * @param index The index of the value to return. * @return The bytes of the ids at the given index. */ @@ -103,7 +106,7 @@ public java.lang.String getIds(int index) { @SuppressWarnings("serial") private volatile java.lang.Object namespace_ = ""; /** - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The namespace. */ @java.lang.Override @@ -120,7 +123,7 @@ public java.lang.String getNamespace() { } } /** - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The bytes for namespace. */ @java.lang.Override @@ -153,10 +156,10 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < ids_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ids_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 1, ids_.getRaw(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, namespace_); } getUnknownFields().writeTo(output); } @@ -175,8 +178,8 @@ public int getSerializedSize() { size += dataSize; size += 1 * getIdsList().size(); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, namespace_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -253,20 +256,20 @@ public static io.pinecone.proto.FetchRequest parseFrom( } public static io.pinecone.proto.FetchRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.FetchRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.FetchRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -274,20 +277,20 @@ public static io.pinecone.proto.FetchRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.FetchRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.FetchRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -307,7 +310,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -319,18 +322,18 @@ protected Builder newBuilderForType( * Protobuf type {@code FetchRequest} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:FetchRequest) io.pinecone.proto.FetchRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_FetchRequest_descriptor; + return io.pinecone.proto.DbData202501.internal_static_FetchRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_FetchRequest_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_FetchRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.FetchRequest.class, io.pinecone.proto.FetchRequest.Builder.class); } @@ -341,7 +344,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -358,7 +361,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_FetchRequest_descriptor; + return io.pinecone.proto.DbData202501.internal_static_FetchRequest_descriptor; } @java.lang.Override @@ -394,38 +397,6 @@ private void buildPartial0(io.pinecone.proto.FetchRequest result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.FetchRequest) { @@ -520,7 +491,7 @@ private void ensureIdsIsMutable() { * The vector IDs to fetch. Does not accept values containing spaces. * * - * repeated string ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string ids = 1 [json_name = "ids", (.google.api.field_behavior) = REQUIRED]; * @return A list containing the ids. */ public com.google.protobuf.ProtocolStringList @@ -533,7 +504,7 @@ private void ensureIdsIsMutable() { * The vector IDs to fetch. Does not accept values containing spaces. * * - * repeated string ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string ids = 1 [json_name = "ids", (.google.api.field_behavior) = REQUIRED]; * @return The count of ids. */ public int getIdsCount() { @@ -544,7 +515,7 @@ public int getIdsCount() { * The vector IDs to fetch. Does not accept values containing spaces. * * - * repeated string ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string ids = 1 [json_name = "ids", (.google.api.field_behavior) = REQUIRED]; * @param index The index of the element to return. * @return The ids at the given index. */ @@ -556,7 +527,7 @@ public java.lang.String getIds(int index) { * The vector IDs to fetch. Does not accept values containing spaces. * * - * repeated string ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string ids = 1 [json_name = "ids", (.google.api.field_behavior) = REQUIRED]; * @param index The index of the value to return. * @return The bytes of the ids at the given index. */ @@ -569,7 +540,7 @@ public java.lang.String getIds(int index) { * The vector IDs to fetch. Does not accept values containing spaces. * * - * repeated string ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string ids = 1 [json_name = "ids", (.google.api.field_behavior) = REQUIRED]; * @param index The index to set the value at. * @param value The ids to set. * @return This builder for chaining. @@ -588,7 +559,7 @@ public Builder setIds( * The vector IDs to fetch. Does not accept values containing spaces. * * - * repeated string ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string ids = 1 [json_name = "ids", (.google.api.field_behavior) = REQUIRED]; * @param value The ids to add. * @return This builder for chaining. */ @@ -606,7 +577,7 @@ public Builder addIds( * The vector IDs to fetch. Does not accept values containing spaces. * * - * repeated string ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string ids = 1 [json_name = "ids", (.google.api.field_behavior) = REQUIRED]; * @param values The ids to add. * @return This builder for chaining. */ @@ -624,7 +595,7 @@ public Builder addAllIds( * The vector IDs to fetch. Does not accept values containing spaces. * * - * repeated string ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string ids = 1 [json_name = "ids", (.google.api.field_behavior) = REQUIRED]; * @return This builder for chaining. */ public Builder clearIds() { @@ -639,7 +610,7 @@ public Builder clearIds() { * The vector IDs to fetch. Does not accept values containing spaces. * * - * repeated string ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string ids = 1 [json_name = "ids", (.google.api.field_behavior) = REQUIRED]; * @param value The bytes of the ids to add. * @return This builder for chaining. */ @@ -656,7 +627,7 @@ public Builder addIdsBytes( private java.lang.Object namespace_ = ""; /** - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The namespace. */ public java.lang.String getNamespace() { @@ -672,7 +643,7 @@ public java.lang.String getNamespace() { } } /** - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The bytes for namespace. */ public com.google.protobuf.ByteString @@ -689,7 +660,7 @@ public java.lang.String getNamespace() { } } /** - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @param value The namespace to set. * @return This builder for chaining. */ @@ -702,7 +673,7 @@ public Builder setNamespace( return this; } /** - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return This builder for chaining. */ public Builder clearNamespace() { @@ -712,7 +683,7 @@ public Builder clearNamespace() { return this; } /** - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @param value The bytes for namespace to set. * @return This builder for chaining. */ @@ -725,18 +696,6 @@ public Builder setNamespaceBytes( onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:FetchRequest) } diff --git a/src/main/java/io/pinecone/proto/FetchRequestOrBuilder.java b/src/main/java/io/pinecone/proto/FetchRequestOrBuilder.java index eda74865..8af83ffd 100644 --- a/src/main/java/io/pinecone/proto/FetchRequestOrBuilder.java +++ b/src/main/java/io/pinecone/proto/FetchRequestOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface FetchRequestOrBuilder extends @@ -13,7 +14,7 @@ public interface FetchRequestOrBuilder extends * The vector IDs to fetch. Does not accept values containing spaces. * * - * repeated string ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string ids = 1 [json_name = "ids", (.google.api.field_behavior) = REQUIRED]; * @return A list containing the ids. */ java.util.List @@ -23,7 +24,7 @@ public interface FetchRequestOrBuilder extends * The vector IDs to fetch. Does not accept values containing spaces. * * - * repeated string ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string ids = 1 [json_name = "ids", (.google.api.field_behavior) = REQUIRED]; * @return The count of ids. */ int getIdsCount(); @@ -32,7 +33,7 @@ public interface FetchRequestOrBuilder extends * The vector IDs to fetch. Does not accept values containing spaces. * * - * repeated string ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string ids = 1 [json_name = "ids", (.google.api.field_behavior) = REQUIRED]; * @param index The index of the element to return. * @return The ids at the given index. */ @@ -42,7 +43,7 @@ public interface FetchRequestOrBuilder extends * The vector IDs to fetch. Does not accept values containing spaces. * * - * repeated string ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string ids = 1 [json_name = "ids", (.google.api.field_behavior) = REQUIRED]; * @param index The index of the value to return. * @return The bytes of the ids at the given index. */ @@ -50,12 +51,12 @@ public interface FetchRequestOrBuilder extends getIdsBytes(int index); /** - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The namespace. */ java.lang.String getNamespace(); /** - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The bytes for namespace. */ com.google.protobuf.ByteString diff --git a/src/main/java/io/pinecone/proto/FetchResponse.java b/src/main/java/io/pinecone/proto/FetchResponse.java index 46605bb0..4398d272 100644 --- a/src/main/java/io/pinecone/proto/FetchResponse.java +++ b/src/main/java/io/pinecone/proto/FetchResponse.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** @@ -12,28 +13,30 @@ * Protobuf type {@code FetchResponse} */ public final class FetchResponse extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:FetchResponse) FetchResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + FetchResponse.class.getName()); + } // Use FetchResponse.newBuilder() to construct. - private FetchResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FetchResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private FetchResponse() { namespace_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FetchResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_FetchResponse_descriptor; + return io.pinecone.proto.DbData202501.internal_static_FetchResponse_descriptor; } @SuppressWarnings({"rawtypes"}) @@ -49,9 +52,9 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_FetchResponse_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_FetchResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.FetchResponse.class, io.pinecone.proto.FetchResponse.Builder.class); } @@ -63,7 +66,7 @@ private static final class VectorsDefaultEntryHolder { java.lang.String, io.pinecone.proto.Vector> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( - io.pinecone.proto.VectorServiceOuterClass.internal_static_FetchResponse_VectorsEntry_descriptor, + io.pinecone.proto.DbData202501.internal_static_FetchResponse_VectorsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, @@ -88,7 +91,7 @@ public int getVectorsCount() { * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors * * - * map<string, .Vector> vectors = 1; + * map<string, .Vector> vectors = 1 [json_name = "vectors"]; */ @java.lang.Override public boolean containsVectors( @@ -109,7 +112,7 @@ public java.util.Map getVectors() { * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors * * - * map<string, .Vector> vectors = 1; + * map<string, .Vector> vectors = 1 [json_name = "vectors"]; */ @java.lang.Override public java.util.Map getVectorsMap() { @@ -120,7 +123,7 @@ public java.util.Map getVectorsMap() * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors * * - * map<string, .Vector> vectors = 1; + * map<string, .Vector> vectors = 1 [json_name = "vectors"]; */ @java.lang.Override public /* nullable */ @@ -138,7 +141,7 @@ io.pinecone.proto.Vector getVectorsOrDefault( * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors * * - * map<string, .Vector> vectors = 1; + * map<string, .Vector> vectors = 1 [json_name = "vectors"]; */ @java.lang.Override public io.pinecone.proto.Vector getVectorsOrThrow( @@ -160,7 +163,7 @@ public io.pinecone.proto.Vector getVectorsOrThrow( * The namespace of the vectors. * * - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The namespace. */ @java.lang.Override @@ -181,7 +184,7 @@ public java.lang.String getNamespace() { * The namespace of the vectors. * * - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The bytes for namespace. */ @java.lang.Override @@ -203,10 +206,10 @@ public java.lang.String getNamespace() { private io.pinecone.proto.Usage usage_; /** *
-   *  The usage for this operation.
+   * The usage for this operation.
    * 
* - * optional .Usage usage = 3; + * optional .Usage usage = 3 [json_name = "usage"]; * @return Whether the usage field is set. */ @java.lang.Override @@ -215,10 +218,10 @@ public boolean hasUsage() { } /** *
-   *  The usage for this operation.
+   * The usage for this operation.
    * 
* - * optional .Usage usage = 3; + * optional .Usage usage = 3 [json_name = "usage"]; * @return The usage. */ @java.lang.Override @@ -227,10 +230,10 @@ public io.pinecone.proto.Usage getUsage() { } /** *
-   *  The usage for this operation.
+   * The usage for this operation.
    * 
* - * optional .Usage usage = 3; + * optional .Usage usage = 3 [json_name = "usage"]; */ @java.lang.Override public io.pinecone.proto.UsageOrBuilder getUsageOrBuilder() { @@ -251,14 +254,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.GeneratedMessage .serializeStringMapTo( output, internalGetVectors(), VectorsDefaultEntryHolder.defaultEntry, 1); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, namespace_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getUsage()); @@ -282,8 +285,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, vectors__); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, namespace_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -373,20 +376,20 @@ public static io.pinecone.proto.FetchResponse parseFrom( } public static io.pinecone.proto.FetchResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.FetchResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.FetchResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -394,20 +397,20 @@ public static io.pinecone.proto.FetchResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.FetchResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.FetchResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -427,7 +430,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -439,12 +442,12 @@ protected Builder newBuilderForType( * Protobuf type {@code FetchResponse} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:FetchResponse) io.pinecone.proto.FetchResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_FetchResponse_descriptor; + return io.pinecone.proto.DbData202501.internal_static_FetchResponse_descriptor; } @SuppressWarnings({"rawtypes"}) @@ -470,9 +473,9 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_FetchResponse_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_FetchResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.FetchResponse.class, io.pinecone.proto.FetchResponse.Builder.class); } @@ -483,12 +486,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getUsageFieldBuilder(); } @@ -510,7 +513,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_FetchResponse_descriptor; + return io.pinecone.proto.DbData202501.internal_static_FetchResponse_descriptor; } @java.lang.Override @@ -553,38 +556,6 @@ private void buildPartial0(io.pinecone.proto.FetchResponse result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.FetchResponse) { @@ -712,7 +683,7 @@ public int getVectorsCount() { * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors * * - * map<string, .Vector> vectors = 1; + * map<string, .Vector> vectors = 1 [json_name = "vectors"]; */ @java.lang.Override public boolean containsVectors( @@ -733,7 +704,7 @@ public java.util.Map getVectors() { * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors * * - * map<string, .Vector> vectors = 1; + * map<string, .Vector> vectors = 1 [json_name = "vectors"]; */ @java.lang.Override public java.util.Map getVectorsMap() { @@ -744,7 +715,7 @@ public java.util.Map getVectorsMap() * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors * * - * map<string, .Vector> vectors = 1; + * map<string, .Vector> vectors = 1 [json_name = "vectors"]; */ @java.lang.Override public /* nullable */ @@ -761,7 +732,7 @@ io.pinecone.proto.Vector getVectorsOrDefault( * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors * * - * map<string, .Vector> vectors = 1; + * map<string, .Vector> vectors = 1 [json_name = "vectors"]; */ @java.lang.Override public io.pinecone.proto.Vector getVectorsOrThrow( @@ -783,7 +754,7 @@ public Builder clearVectors() { * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors * * - * map<string, .Vector> vectors = 1; + * map<string, .Vector> vectors = 1 [json_name = "vectors"]; */ public Builder removeVectors( java.lang.String key) { @@ -806,7 +777,7 @@ public Builder removeVectors( * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors * * - * map<string, .Vector> vectors = 1; + * map<string, .Vector> vectors = 1 [json_name = "vectors"]; */ public Builder putVectors( java.lang.String key, @@ -823,7 +794,7 @@ public Builder putVectors( * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors * * - * map<string, .Vector> vectors = 1; + * map<string, .Vector> vectors = 1 [json_name = "vectors"]; */ public Builder putAllVectors( java.util.Map values) { @@ -842,7 +813,7 @@ public Builder putAllVectors( * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors * * - * map<string, .Vector> vectors = 1; + * map<string, .Vector> vectors = 1 [json_name = "vectors"]; */ public io.pinecone.proto.Vector.Builder putVectorsBuilderIfAbsent( java.lang.String key) { @@ -865,7 +836,7 @@ public io.pinecone.proto.Vector.Builder putVectorsBuilderIfAbsent( * The namespace of the vectors. * * - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The namespace. */ public java.lang.String getNamespace() { @@ -885,7 +856,7 @@ public java.lang.String getNamespace() { * The namespace of the vectors. * * - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The bytes for namespace. */ public com.google.protobuf.ByteString @@ -906,7 +877,7 @@ public java.lang.String getNamespace() { * The namespace of the vectors. * * - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @param value The namespace to set. * @return This builder for chaining. */ @@ -923,7 +894,7 @@ public Builder setNamespace( * The namespace of the vectors. * * - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return This builder for chaining. */ public Builder clearNamespace() { @@ -937,7 +908,7 @@ public Builder clearNamespace() { * The namespace of the vectors. * * - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @param value The bytes for namespace to set. * @return This builder for chaining. */ @@ -952,14 +923,14 @@ public Builder setNamespaceBytes( } private io.pinecone.proto.Usage usage_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.Usage, io.pinecone.proto.Usage.Builder, io.pinecone.proto.UsageOrBuilder> usageBuilder_; /** *
-     *  The usage for this operation.
+     * The usage for this operation.
      * 
* - * optional .Usage usage = 3; + * optional .Usage usage = 3 [json_name = "usage"]; * @return Whether the usage field is set. */ public boolean hasUsage() { @@ -967,10 +938,10 @@ public boolean hasUsage() { } /** *
-     *  The usage for this operation.
+     * The usage for this operation.
      * 
* - * optional .Usage usage = 3; + * optional .Usage usage = 3 [json_name = "usage"]; * @return The usage. */ public io.pinecone.proto.Usage getUsage() { @@ -982,10 +953,10 @@ public io.pinecone.proto.Usage getUsage() { } /** *
-     *  The usage for this operation.
+     * The usage for this operation.
      * 
* - * optional .Usage usage = 3; + * optional .Usage usage = 3 [json_name = "usage"]; */ public Builder setUsage(io.pinecone.proto.Usage value) { if (usageBuilder_ == null) { @@ -1002,10 +973,10 @@ public Builder setUsage(io.pinecone.proto.Usage value) { } /** *
-     *  The usage for this operation.
+     * The usage for this operation.
      * 
* - * optional .Usage usage = 3; + * optional .Usage usage = 3 [json_name = "usage"]; */ public Builder setUsage( io.pinecone.proto.Usage.Builder builderForValue) { @@ -1020,10 +991,10 @@ public Builder setUsage( } /** *
-     *  The usage for this operation.
+     * The usage for this operation.
      * 
* - * optional .Usage usage = 3; + * optional .Usage usage = 3 [json_name = "usage"]; */ public Builder mergeUsage(io.pinecone.proto.Usage value) { if (usageBuilder_ == null) { @@ -1045,10 +1016,10 @@ public Builder mergeUsage(io.pinecone.proto.Usage value) { } /** *
-     *  The usage for this operation.
+     * The usage for this operation.
      * 
* - * optional .Usage usage = 3; + * optional .Usage usage = 3 [json_name = "usage"]; */ public Builder clearUsage() { bitField0_ = (bitField0_ & ~0x00000004); @@ -1062,10 +1033,10 @@ public Builder clearUsage() { } /** *
-     *  The usage for this operation.
+     * The usage for this operation.
      * 
* - * optional .Usage usage = 3; + * optional .Usage usage = 3 [json_name = "usage"]; */ public io.pinecone.proto.Usage.Builder getUsageBuilder() { bitField0_ |= 0x00000004; @@ -1074,10 +1045,10 @@ public io.pinecone.proto.Usage.Builder getUsageBuilder() { } /** *
-     *  The usage for this operation.
+     * The usage for this operation.
      * 
* - * optional .Usage usage = 3; + * optional .Usage usage = 3 [json_name = "usage"]; */ public io.pinecone.proto.UsageOrBuilder getUsageOrBuilder() { if (usageBuilder_ != null) { @@ -1089,16 +1060,16 @@ public io.pinecone.proto.UsageOrBuilder getUsageOrBuilder() { } /** *
-     *  The usage for this operation.
+     * The usage for this operation.
      * 
* - * optional .Usage usage = 3; + * optional .Usage usage = 3 [json_name = "usage"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.Usage, io.pinecone.proto.Usage.Builder, io.pinecone.proto.UsageOrBuilder> getUsageFieldBuilder() { if (usageBuilder_ == null) { - usageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + usageBuilder_ = new com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.Usage, io.pinecone.proto.Usage.Builder, io.pinecone.proto.UsageOrBuilder>( getUsage(), getParentForChildren(), @@ -1107,18 +1078,6 @@ public io.pinecone.proto.UsageOrBuilder getUsageOrBuilder() { } return usageBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:FetchResponse) } diff --git a/src/main/java/io/pinecone/proto/FetchResponseOrBuilder.java b/src/main/java/io/pinecone/proto/FetchResponseOrBuilder.java index e709f073..6cedd702 100644 --- a/src/main/java/io/pinecone/proto/FetchResponseOrBuilder.java +++ b/src/main/java/io/pinecone/proto/FetchResponseOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface FetchResponseOrBuilder extends @@ -13,7 +14,7 @@ public interface FetchResponseOrBuilder extends * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors * * - * map<string, .Vector> vectors = 1; + * map<string, .Vector> vectors = 1 [json_name = "vectors"]; */ int getVectorsCount(); /** @@ -21,7 +22,7 @@ public interface FetchResponseOrBuilder extends * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors * * - * map<string, .Vector> vectors = 1; + * map<string, .Vector> vectors = 1 [json_name = "vectors"]; */ boolean containsVectors( java.lang.String key); @@ -36,7 +37,7 @@ boolean containsVectors( * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors * * - * map<string, .Vector> vectors = 1; + * map<string, .Vector> vectors = 1 [json_name = "vectors"]; */ java.util.Map getVectorsMap(); @@ -45,7 +46,7 @@ boolean containsVectors( * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors * * - * map<string, .Vector> vectors = 1; + * map<string, .Vector> vectors = 1 [json_name = "vectors"]; */ /* nullable */ io.pinecone.proto.Vector getVectorsOrDefault( @@ -57,7 +58,7 @@ io.pinecone.proto.Vector getVectorsOrDefault( * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors * * - * map<string, .Vector> vectors = 1; + * map<string, .Vector> vectors = 1 [json_name = "vectors"]; */ io.pinecone.proto.Vector getVectorsOrThrow( java.lang.String key); @@ -67,7 +68,7 @@ io.pinecone.proto.Vector getVectorsOrThrow( * The namespace of the vectors. * * - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The namespace. */ java.lang.String getNamespace(); @@ -76,7 +77,7 @@ io.pinecone.proto.Vector getVectorsOrThrow( * The namespace of the vectors. * * - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The bytes for namespace. */ com.google.protobuf.ByteString @@ -84,28 +85,28 @@ io.pinecone.proto.Vector getVectorsOrThrow( /** *
-   *  The usage for this operation.
+   * The usage for this operation.
    * 
* - * optional .Usage usage = 3; + * optional .Usage usage = 3 [json_name = "usage"]; * @return Whether the usage field is set. */ boolean hasUsage(); /** *
-   *  The usage for this operation.
+   * The usage for this operation.
    * 
* - * optional .Usage usage = 3; + * optional .Usage usage = 3 [json_name = "usage"]; * @return The usage. */ io.pinecone.proto.Usage getUsage(); /** *
-   *  The usage for this operation.
+   * The usage for this operation.
    * 
* - * optional .Usage usage = 3; + * optional .Usage usage = 3 [json_name = "usage"]; */ io.pinecone.proto.UsageOrBuilder getUsageOrBuilder(); } diff --git a/src/main/java/io/pinecone/proto/ListItem.java b/src/main/java/io/pinecone/proto/ListItem.java index a83ad275..f457cd08 100644 --- a/src/main/java/io/pinecone/proto/ListItem.java +++ b/src/main/java/io/pinecone/proto/ListItem.java @@ -1,41 +1,44 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** * Protobuf type {@code ListItem} */ public final class ListItem extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:ListItem) ListItemOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + ListItem.class.getName()); + } // Use ListItem.newBuilder() to construct. - private ListItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListItem(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ListItem() { id_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListItem(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_ListItem_descriptor; + return io.pinecone.proto.DbData202501.internal_static_ListItem_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_ListItem_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_ListItem_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.ListItem.class, io.pinecone.proto.ListItem.Builder.class); } @@ -44,7 +47,7 @@ protected java.lang.Object newInstance( @SuppressWarnings("serial") private volatile java.lang.Object id_ = ""; /** - * string id = 1; + * string id = 1 [json_name = "id"]; * @return The id. */ @java.lang.Override @@ -61,7 +64,7 @@ public java.lang.String getId() { } } /** - * string id = 1; + * string id = 1 [json_name = "id"]; * @return The bytes for id. */ @java.lang.Override @@ -93,8 +96,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); } getUnknownFields().writeTo(output); } @@ -105,8 +108,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -177,20 +180,20 @@ public static io.pinecone.proto.ListItem parseFrom( } public static io.pinecone.proto.ListItem parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.ListItem parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.ListItem parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -198,20 +201,20 @@ public static io.pinecone.proto.ListItem parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.ListItem parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.ListItem parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -231,7 +234,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -239,18 +242,18 @@ protected Builder newBuilderForType( * Protobuf type {@code ListItem} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:ListItem) io.pinecone.proto.ListItemOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_ListItem_descriptor; + return io.pinecone.proto.DbData202501.internal_static_ListItem_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_ListItem_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_ListItem_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.ListItem.class, io.pinecone.proto.ListItem.Builder.class); } @@ -261,7 +264,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -276,7 +279,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_ListItem_descriptor; + return io.pinecone.proto.DbData202501.internal_static_ListItem_descriptor; } @java.lang.Override @@ -308,38 +311,6 @@ private void buildPartial0(io.pinecone.proto.ListItem result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.ListItem) { @@ -407,7 +378,7 @@ public Builder mergeFrom( private java.lang.Object id_ = ""; /** - * string id = 1; + * string id = 1 [json_name = "id"]; * @return The id. */ public java.lang.String getId() { @@ -423,7 +394,7 @@ public java.lang.String getId() { } } /** - * string id = 1; + * string id = 1 [json_name = "id"]; * @return The bytes for id. */ public com.google.protobuf.ByteString @@ -440,7 +411,7 @@ public java.lang.String getId() { } } /** - * string id = 1; + * string id = 1 [json_name = "id"]; * @param value The id to set. * @return This builder for chaining. */ @@ -453,7 +424,7 @@ public Builder setId( return this; } /** - * string id = 1; + * string id = 1 [json_name = "id"]; * @return This builder for chaining. */ public Builder clearId() { @@ -463,7 +434,7 @@ public Builder clearId() { return this; } /** - * string id = 1; + * string id = 1 [json_name = "id"]; * @param value The bytes for id to set. * @return This builder for chaining. */ @@ -476,18 +447,6 @@ public Builder setIdBytes( onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:ListItem) } diff --git a/src/main/java/io/pinecone/proto/ListItemOrBuilder.java b/src/main/java/io/pinecone/proto/ListItemOrBuilder.java index 91b5abee..3cee65f7 100644 --- a/src/main/java/io/pinecone/proto/ListItemOrBuilder.java +++ b/src/main/java/io/pinecone/proto/ListItemOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface ListItemOrBuilder extends @@ -9,12 +10,12 @@ public interface ListItemOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * string id = 1; + * string id = 1 [json_name = "id"]; * @return The id. */ java.lang.String getId(); /** - * string id = 1; + * string id = 1 [json_name = "id"]; * @return The bytes for id. */ com.google.protobuf.ByteString diff --git a/src/main/java/io/pinecone/proto/ListRequest.java b/src/main/java/io/pinecone/proto/ListRequest.java index 23638385..2bdf0ccd 100644 --- a/src/main/java/io/pinecone/proto/ListRequest.java +++ b/src/main/java/io/pinecone/proto/ListRequest.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** @@ -12,12 +13,21 @@ * Protobuf type {@code ListRequest} */ public final class ListRequest extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:ListRequest) ListRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + ListRequest.class.getName()); + } // Use ListRequest.newBuilder() to construct. - private ListRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ListRequest() { @@ -26,22 +36,15 @@ private ListRequest() { namespace_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_ListRequest_descriptor; + return io.pinecone.proto.DbData202501.internal_static_ListRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_ListRequest_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_ListRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.ListRequest.class, io.pinecone.proto.ListRequest.Builder.class); } @@ -55,7 +58,7 @@ protected java.lang.Object newInstance( * The vector IDs to fetch. Does not accept values containing spaces. * * - * optional string prefix = 1; + * optional string prefix = 1 [json_name = "prefix"]; * @return Whether the prefix field is set. */ @java.lang.Override @@ -67,7 +70,7 @@ public boolean hasPrefix() { * The vector IDs to fetch. Does not accept values containing spaces. * * - * optional string prefix = 1; + * optional string prefix = 1 [json_name = "prefix"]; * @return The prefix. */ @java.lang.Override @@ -88,7 +91,7 @@ public java.lang.String getPrefix() { * The vector IDs to fetch. Does not accept values containing spaces. * * - * optional string prefix = 1; + * optional string prefix = 1 [json_name = "prefix"]; * @return The bytes for prefix. */ @java.lang.Override @@ -113,7 +116,7 @@ public java.lang.String getPrefix() { * Max number of ids to return * * - * optional uint32 limit = 2; + * optional uint32 limit = 2 [json_name = "limit"]; * @return Whether the limit field is set. */ @java.lang.Override @@ -125,7 +128,7 @@ public boolean hasLimit() { * Max number of ids to return * * - * optional uint32 limit = 2; + * optional uint32 limit = 2 [json_name = "limit"]; * @return The limit. */ @java.lang.Override @@ -141,7 +144,7 @@ public int getLimit() { * Pagination token to continue a previous listing operation * * - * optional string pagination_token = 3; + * optional string pagination_token = 3 [json_name = "paginationToken"]; * @return Whether the paginationToken field is set. */ @java.lang.Override @@ -153,7 +156,7 @@ public boolean hasPaginationToken() { * Pagination token to continue a previous listing operation * * - * optional string pagination_token = 3; + * optional string pagination_token = 3 [json_name = "paginationToken"]; * @return The paginationToken. */ @java.lang.Override @@ -174,7 +177,7 @@ public java.lang.String getPaginationToken() { * Pagination token to continue a previous listing operation * * - * optional string pagination_token = 3; + * optional string pagination_token = 3 [json_name = "paginationToken"]; * @return The bytes for paginationToken. */ @java.lang.Override @@ -196,7 +199,7 @@ public java.lang.String getPaginationToken() { @SuppressWarnings("serial") private volatile java.lang.Object namespace_ = ""; /** - * string namespace = 4; + * string namespace = 4 [json_name = "namespace"]; * @return The namespace. */ @java.lang.Override @@ -213,7 +216,7 @@ public java.lang.String getNamespace() { } } /** - * string namespace = 4; + * string namespace = 4 [json_name = "namespace"]; * @return The bytes for namespace. */ @java.lang.Override @@ -246,16 +249,16 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, prefix_); + com.google.protobuf.GeneratedMessage.writeString(output, 1, prefix_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeUInt32(2, limit_); } if (((bitField0_ & 0x00000004) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, paginationToken_); + com.google.protobuf.GeneratedMessage.writeString(output, 3, paginationToken_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, namespace_); } getUnknownFields().writeTo(output); } @@ -267,17 +270,17 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, prefix_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, prefix_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, limit_); } if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, paginationToken_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, paginationToken_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, namespace_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -375,20 +378,20 @@ public static io.pinecone.proto.ListRequest parseFrom( } public static io.pinecone.proto.ListRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.ListRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.ListRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -396,20 +399,20 @@ public static io.pinecone.proto.ListRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.ListRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.ListRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -429,7 +432,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -441,18 +444,18 @@ protected Builder newBuilderForType( * Protobuf type {@code ListRequest} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:ListRequest) io.pinecone.proto.ListRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_ListRequest_descriptor; + return io.pinecone.proto.DbData202501.internal_static_ListRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_ListRequest_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_ListRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.ListRequest.class, io.pinecone.proto.ListRequest.Builder.class); } @@ -463,7 +466,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -481,7 +484,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_ListRequest_descriptor; + return io.pinecone.proto.DbData202501.internal_static_ListRequest_descriptor; } @java.lang.Override @@ -527,38 +530,6 @@ private void buildPartial0(io.pinecone.proto.ListRequest result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.ListRequest) { @@ -658,7 +629,7 @@ public Builder mergeFrom( * The vector IDs to fetch. Does not accept values containing spaces. * * - * optional string prefix = 1; + * optional string prefix = 1 [json_name = "prefix"]; * @return Whether the prefix field is set. */ public boolean hasPrefix() { @@ -669,7 +640,7 @@ public boolean hasPrefix() { * The vector IDs to fetch. Does not accept values containing spaces. * * - * optional string prefix = 1; + * optional string prefix = 1 [json_name = "prefix"]; * @return The prefix. */ public java.lang.String getPrefix() { @@ -689,7 +660,7 @@ public java.lang.String getPrefix() { * The vector IDs to fetch. Does not accept values containing spaces. * * - * optional string prefix = 1; + * optional string prefix = 1 [json_name = "prefix"]; * @return The bytes for prefix. */ public com.google.protobuf.ByteString @@ -710,7 +681,7 @@ public java.lang.String getPrefix() { * The vector IDs to fetch. Does not accept values containing spaces. * * - * optional string prefix = 1; + * optional string prefix = 1 [json_name = "prefix"]; * @param value The prefix to set. * @return This builder for chaining. */ @@ -727,7 +698,7 @@ public Builder setPrefix( * The vector IDs to fetch. Does not accept values containing spaces. * * - * optional string prefix = 1; + * optional string prefix = 1 [json_name = "prefix"]; * @return This builder for chaining. */ public Builder clearPrefix() { @@ -741,7 +712,7 @@ public Builder clearPrefix() { * The vector IDs to fetch. Does not accept values containing spaces. * * - * optional string prefix = 1; + * optional string prefix = 1 [json_name = "prefix"]; * @param value The bytes for prefix to set. * @return This builder for chaining. */ @@ -761,7 +732,7 @@ public Builder setPrefixBytes( * Max number of ids to return * * - * optional uint32 limit = 2; + * optional uint32 limit = 2 [json_name = "limit"]; * @return Whether the limit field is set. */ @java.lang.Override @@ -773,7 +744,7 @@ public boolean hasLimit() { * Max number of ids to return * * - * optional uint32 limit = 2; + * optional uint32 limit = 2 [json_name = "limit"]; * @return The limit. */ @java.lang.Override @@ -785,7 +756,7 @@ public int getLimit() { * Max number of ids to return * * - * optional uint32 limit = 2; + * optional uint32 limit = 2 [json_name = "limit"]; * @param value The limit to set. * @return This builder for chaining. */ @@ -801,7 +772,7 @@ public Builder setLimit(int value) { * Max number of ids to return * * - * optional uint32 limit = 2; + * optional uint32 limit = 2 [json_name = "limit"]; * @return This builder for chaining. */ public Builder clearLimit() { @@ -817,7 +788,7 @@ public Builder clearLimit() { * Pagination token to continue a previous listing operation * * - * optional string pagination_token = 3; + * optional string pagination_token = 3 [json_name = "paginationToken"]; * @return Whether the paginationToken field is set. */ public boolean hasPaginationToken() { @@ -828,7 +799,7 @@ public boolean hasPaginationToken() { * Pagination token to continue a previous listing operation * * - * optional string pagination_token = 3; + * optional string pagination_token = 3 [json_name = "paginationToken"]; * @return The paginationToken. */ public java.lang.String getPaginationToken() { @@ -848,7 +819,7 @@ public java.lang.String getPaginationToken() { * Pagination token to continue a previous listing operation * * - * optional string pagination_token = 3; + * optional string pagination_token = 3 [json_name = "paginationToken"]; * @return The bytes for paginationToken. */ public com.google.protobuf.ByteString @@ -869,7 +840,7 @@ public java.lang.String getPaginationToken() { * Pagination token to continue a previous listing operation * * - * optional string pagination_token = 3; + * optional string pagination_token = 3 [json_name = "paginationToken"]; * @param value The paginationToken to set. * @return This builder for chaining. */ @@ -886,7 +857,7 @@ public Builder setPaginationToken( * Pagination token to continue a previous listing operation * * - * optional string pagination_token = 3; + * optional string pagination_token = 3 [json_name = "paginationToken"]; * @return This builder for chaining. */ public Builder clearPaginationToken() { @@ -900,7 +871,7 @@ public Builder clearPaginationToken() { * Pagination token to continue a previous listing operation * * - * optional string pagination_token = 3; + * optional string pagination_token = 3 [json_name = "paginationToken"]; * @param value The bytes for paginationToken to set. * @return This builder for chaining. */ @@ -916,7 +887,7 @@ public Builder setPaginationTokenBytes( private java.lang.Object namespace_ = ""; /** - * string namespace = 4; + * string namespace = 4 [json_name = "namespace"]; * @return The namespace. */ public java.lang.String getNamespace() { @@ -932,7 +903,7 @@ public java.lang.String getNamespace() { } } /** - * string namespace = 4; + * string namespace = 4 [json_name = "namespace"]; * @return The bytes for namespace. */ public com.google.protobuf.ByteString @@ -949,7 +920,7 @@ public java.lang.String getNamespace() { } } /** - * string namespace = 4; + * string namespace = 4 [json_name = "namespace"]; * @param value The namespace to set. * @return This builder for chaining. */ @@ -962,7 +933,7 @@ public Builder setNamespace( return this; } /** - * string namespace = 4; + * string namespace = 4 [json_name = "namespace"]; * @return This builder for chaining. */ public Builder clearNamespace() { @@ -972,7 +943,7 @@ public Builder clearNamespace() { return this; } /** - * string namespace = 4; + * string namespace = 4 [json_name = "namespace"]; * @param value The bytes for namespace to set. * @return This builder for chaining. */ @@ -985,18 +956,6 @@ public Builder setNamespaceBytes( onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:ListRequest) } diff --git a/src/main/java/io/pinecone/proto/ListRequestOrBuilder.java b/src/main/java/io/pinecone/proto/ListRequestOrBuilder.java index 7f55b295..bcb183f7 100644 --- a/src/main/java/io/pinecone/proto/ListRequestOrBuilder.java +++ b/src/main/java/io/pinecone/proto/ListRequestOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface ListRequestOrBuilder extends @@ -13,7 +14,7 @@ public interface ListRequestOrBuilder extends * The vector IDs to fetch. Does not accept values containing spaces. * * - * optional string prefix = 1; + * optional string prefix = 1 [json_name = "prefix"]; * @return Whether the prefix field is set. */ boolean hasPrefix(); @@ -22,7 +23,7 @@ public interface ListRequestOrBuilder extends * The vector IDs to fetch. Does not accept values containing spaces. * * - * optional string prefix = 1; + * optional string prefix = 1 [json_name = "prefix"]; * @return The prefix. */ java.lang.String getPrefix(); @@ -31,7 +32,7 @@ public interface ListRequestOrBuilder extends * The vector IDs to fetch. Does not accept values containing spaces. * * - * optional string prefix = 1; + * optional string prefix = 1 [json_name = "prefix"]; * @return The bytes for prefix. */ com.google.protobuf.ByteString @@ -42,7 +43,7 @@ public interface ListRequestOrBuilder extends * Max number of ids to return * * - * optional uint32 limit = 2; + * optional uint32 limit = 2 [json_name = "limit"]; * @return Whether the limit field is set. */ boolean hasLimit(); @@ -51,7 +52,7 @@ public interface ListRequestOrBuilder extends * Max number of ids to return * * - * optional uint32 limit = 2; + * optional uint32 limit = 2 [json_name = "limit"]; * @return The limit. */ int getLimit(); @@ -61,7 +62,7 @@ public interface ListRequestOrBuilder extends * Pagination token to continue a previous listing operation * * - * optional string pagination_token = 3; + * optional string pagination_token = 3 [json_name = "paginationToken"]; * @return Whether the paginationToken field is set. */ boolean hasPaginationToken(); @@ -70,7 +71,7 @@ public interface ListRequestOrBuilder extends * Pagination token to continue a previous listing operation * * - * optional string pagination_token = 3; + * optional string pagination_token = 3 [json_name = "paginationToken"]; * @return The paginationToken. */ java.lang.String getPaginationToken(); @@ -79,19 +80,19 @@ public interface ListRequestOrBuilder extends * Pagination token to continue a previous listing operation * * - * optional string pagination_token = 3; + * optional string pagination_token = 3 [json_name = "paginationToken"]; * @return The bytes for paginationToken. */ com.google.protobuf.ByteString getPaginationTokenBytes(); /** - * string namespace = 4; + * string namespace = 4 [json_name = "namespace"]; * @return The namespace. */ java.lang.String getNamespace(); /** - * string namespace = 4; + * string namespace = 4 [json_name = "namespace"]; * @return The bytes for namespace. */ com.google.protobuf.ByteString diff --git a/src/main/java/io/pinecone/proto/ListResponse.java b/src/main/java/io/pinecone/proto/ListResponse.java index e8a817e2..38888272 100644 --- a/src/main/java/io/pinecone/proto/ListResponse.java +++ b/src/main/java/io/pinecone/proto/ListResponse.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** @@ -12,12 +13,21 @@ * Protobuf type {@code ListResponse} */ public final class ListResponse extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:ListResponse) ListResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + ListResponse.class.getName()); + } // Use ListResponse.newBuilder() to construct. - private ListResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ListResponse() { @@ -25,22 +35,15 @@ private ListResponse() { namespace_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_ListResponse_descriptor; + return io.pinecone.proto.DbData202501.internal_static_ListResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_ListResponse_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_ListResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.ListResponse.class, io.pinecone.proto.ListResponse.Builder.class); } @@ -54,7 +57,7 @@ protected java.lang.Object newInstance( * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ @java.lang.Override public java.util.List getVectorsList() { @@ -65,7 +68,7 @@ public java.util.List getVectorsList() { * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ @java.lang.Override public java.util.List @@ -77,7 +80,7 @@ public java.util.List getVectorsList() { * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ @java.lang.Override public int getVectorsCount() { @@ -88,7 +91,7 @@ public int getVectorsCount() { * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ @java.lang.Override public io.pinecone.proto.ListItem getVectors(int index) { @@ -99,7 +102,7 @@ public io.pinecone.proto.ListItem getVectors(int index) { * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ @java.lang.Override public io.pinecone.proto.ListItemOrBuilder getVectorsOrBuilder( @@ -114,7 +117,7 @@ public io.pinecone.proto.ListItemOrBuilder getVectorsOrBuilder( * Pagination token to continue past this listing * * - * optional .Pagination pagination = 2; + * optional .Pagination pagination = 2 [json_name = "pagination"]; * @return Whether the pagination field is set. */ @java.lang.Override @@ -126,7 +129,7 @@ public boolean hasPagination() { * Pagination token to continue past this listing * * - * optional .Pagination pagination = 2; + * optional .Pagination pagination = 2 [json_name = "pagination"]; * @return The pagination. */ @java.lang.Override @@ -138,7 +141,7 @@ public io.pinecone.proto.Pagination getPagination() { * Pagination token to continue past this listing * * - * optional .Pagination pagination = 2; + * optional .Pagination pagination = 2 [json_name = "pagination"]; */ @java.lang.Override public io.pinecone.proto.PaginationOrBuilder getPaginationOrBuilder() { @@ -153,7 +156,7 @@ public io.pinecone.proto.PaginationOrBuilder getPaginationOrBuilder() { * The namespace of the vectors. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The namespace. */ @java.lang.Override @@ -174,7 +177,7 @@ public java.lang.String getNamespace() { * The namespace of the vectors. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The bytes for namespace. */ @java.lang.Override @@ -196,10 +199,10 @@ public java.lang.String getNamespace() { private io.pinecone.proto.Usage usage_; /** *
-   *  The usage for this operation.
+   * The usage for this operation.
    * 
* - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; * @return Whether the usage field is set. */ @java.lang.Override @@ -208,10 +211,10 @@ public boolean hasUsage() { } /** *
-   *  The usage for this operation.
+   * The usage for this operation.
    * 
* - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; * @return The usage. */ @java.lang.Override @@ -220,10 +223,10 @@ public io.pinecone.proto.Usage getUsage() { } /** *
-   *  The usage for this operation.
+   * The usage for this operation.
    * 
* - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; */ @java.lang.Override public io.pinecone.proto.UsageOrBuilder getUsageOrBuilder() { @@ -250,8 +253,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getPagination()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, namespace_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(4, getUsage()); @@ -273,8 +276,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getPagination()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, namespace_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -373,20 +376,20 @@ public static io.pinecone.proto.ListResponse parseFrom( } public static io.pinecone.proto.ListResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.ListResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.ListResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -394,20 +397,20 @@ public static io.pinecone.proto.ListResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.ListResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.ListResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -427,7 +430,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -439,18 +442,18 @@ protected Builder newBuilderForType( * Protobuf type {@code ListResponse} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:ListResponse) io.pinecone.proto.ListResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_ListResponse_descriptor; + return io.pinecone.proto.DbData202501.internal_static_ListResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_ListResponse_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_ListResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.ListResponse.class, io.pinecone.proto.ListResponse.Builder.class); } @@ -461,12 +464,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getVectorsFieldBuilder(); getPaginationFieldBuilder(); @@ -501,7 +504,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_ListResponse_descriptor; + return io.pinecone.proto.DbData202501.internal_static_ListResponse_descriptor; } @java.lang.Override @@ -560,38 +563,6 @@ private void buildPartial0(io.pinecone.proto.ListResponse result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.ListResponse) { @@ -623,7 +594,7 @@ public Builder mergeFrom(io.pinecone.proto.ListResponse other) { vectors_ = other.vectors_; bitField0_ = (bitField0_ & ~0x00000001); vectorsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getVectorsFieldBuilder() : null; } else { vectorsBuilder_.addAllMessages(other.vectors_); @@ -725,7 +696,7 @@ private void ensureVectorsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< io.pinecone.proto.ListItem, io.pinecone.proto.ListItem.Builder, io.pinecone.proto.ListItemOrBuilder> vectorsBuilder_; /** @@ -733,7 +704,7 @@ private void ensureVectorsIsMutable() { * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ public java.util.List getVectorsList() { if (vectorsBuilder_ == null) { @@ -747,7 +718,7 @@ public java.util.List getVectorsList() { * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ public int getVectorsCount() { if (vectorsBuilder_ == null) { @@ -761,7 +732,7 @@ public int getVectorsCount() { * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ public io.pinecone.proto.ListItem getVectors(int index) { if (vectorsBuilder_ == null) { @@ -775,7 +746,7 @@ public io.pinecone.proto.ListItem getVectors(int index) { * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ public Builder setVectors( int index, io.pinecone.proto.ListItem value) { @@ -796,7 +767,7 @@ public Builder setVectors( * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ public Builder setVectors( int index, io.pinecone.proto.ListItem.Builder builderForValue) { @@ -814,7 +785,7 @@ public Builder setVectors( * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ public Builder addVectors(io.pinecone.proto.ListItem value) { if (vectorsBuilder_ == null) { @@ -834,7 +805,7 @@ public Builder addVectors(io.pinecone.proto.ListItem value) { * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ public Builder addVectors( int index, io.pinecone.proto.ListItem value) { @@ -855,7 +826,7 @@ public Builder addVectors( * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ public Builder addVectors( io.pinecone.proto.ListItem.Builder builderForValue) { @@ -873,7 +844,7 @@ public Builder addVectors( * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ public Builder addVectors( int index, io.pinecone.proto.ListItem.Builder builderForValue) { @@ -891,7 +862,7 @@ public Builder addVectors( * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ public Builder addAllVectors( java.lang.Iterable values) { @@ -910,7 +881,7 @@ public Builder addAllVectors( * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ public Builder clearVectors() { if (vectorsBuilder_ == null) { @@ -927,7 +898,7 @@ public Builder clearVectors() { * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ public Builder removeVectors(int index) { if (vectorsBuilder_ == null) { @@ -944,7 +915,7 @@ public Builder removeVectors(int index) { * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ public io.pinecone.proto.ListItem.Builder getVectorsBuilder( int index) { @@ -955,7 +926,7 @@ public io.pinecone.proto.ListItem.Builder getVectorsBuilder( * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ public io.pinecone.proto.ListItemOrBuilder getVectorsOrBuilder( int index) { @@ -969,7 +940,7 @@ public io.pinecone.proto.ListItemOrBuilder getVectorsOrBuilder( * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ public java.util.List getVectorsOrBuilderList() { @@ -984,7 +955,7 @@ public io.pinecone.proto.ListItemOrBuilder getVectorsOrBuilder( * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ public io.pinecone.proto.ListItem.Builder addVectorsBuilder() { return getVectorsFieldBuilder().addBuilder( @@ -995,7 +966,7 @@ public io.pinecone.proto.ListItem.Builder addVectorsBuilder() { * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ public io.pinecone.proto.ListItem.Builder addVectorsBuilder( int index) { @@ -1007,17 +978,17 @@ public io.pinecone.proto.ListItem.Builder addVectorsBuilder( * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ public java.util.List getVectorsBuilderList() { return getVectorsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< io.pinecone.proto.ListItem, io.pinecone.proto.ListItem.Builder, io.pinecone.proto.ListItemOrBuilder> getVectorsFieldBuilder() { if (vectorsBuilder_ == null) { - vectorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + vectorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< io.pinecone.proto.ListItem, io.pinecone.proto.ListItem.Builder, io.pinecone.proto.ListItemOrBuilder>( vectors_, ((bitField0_ & 0x00000001) != 0), @@ -1029,14 +1000,14 @@ public io.pinecone.proto.ListItem.Builder addVectorsBuilder( } private io.pinecone.proto.Pagination pagination_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.Pagination, io.pinecone.proto.Pagination.Builder, io.pinecone.proto.PaginationOrBuilder> paginationBuilder_; /** *
      * Pagination token to continue past this listing
      * 
* - * optional .Pagination pagination = 2; + * optional .Pagination pagination = 2 [json_name = "pagination"]; * @return Whether the pagination field is set. */ public boolean hasPagination() { @@ -1047,7 +1018,7 @@ public boolean hasPagination() { * Pagination token to continue past this listing * * - * optional .Pagination pagination = 2; + * optional .Pagination pagination = 2 [json_name = "pagination"]; * @return The pagination. */ public io.pinecone.proto.Pagination getPagination() { @@ -1062,7 +1033,7 @@ public io.pinecone.proto.Pagination getPagination() { * Pagination token to continue past this listing * * - * optional .Pagination pagination = 2; + * optional .Pagination pagination = 2 [json_name = "pagination"]; */ public Builder setPagination(io.pinecone.proto.Pagination value) { if (paginationBuilder_ == null) { @@ -1082,7 +1053,7 @@ public Builder setPagination(io.pinecone.proto.Pagination value) { * Pagination token to continue past this listing * * - * optional .Pagination pagination = 2; + * optional .Pagination pagination = 2 [json_name = "pagination"]; */ public Builder setPagination( io.pinecone.proto.Pagination.Builder builderForValue) { @@ -1100,7 +1071,7 @@ public Builder setPagination( * Pagination token to continue past this listing * * - * optional .Pagination pagination = 2; + * optional .Pagination pagination = 2 [json_name = "pagination"]; */ public Builder mergePagination(io.pinecone.proto.Pagination value) { if (paginationBuilder_ == null) { @@ -1125,7 +1096,7 @@ public Builder mergePagination(io.pinecone.proto.Pagination value) { * Pagination token to continue past this listing * * - * optional .Pagination pagination = 2; + * optional .Pagination pagination = 2 [json_name = "pagination"]; */ public Builder clearPagination() { bitField0_ = (bitField0_ & ~0x00000002); @@ -1142,7 +1113,7 @@ public Builder clearPagination() { * Pagination token to continue past this listing * * - * optional .Pagination pagination = 2; + * optional .Pagination pagination = 2 [json_name = "pagination"]; */ public io.pinecone.proto.Pagination.Builder getPaginationBuilder() { bitField0_ |= 0x00000002; @@ -1154,7 +1125,7 @@ public io.pinecone.proto.Pagination.Builder getPaginationBuilder() { * Pagination token to continue past this listing * * - * optional .Pagination pagination = 2; + * optional .Pagination pagination = 2 [json_name = "pagination"]; */ public io.pinecone.proto.PaginationOrBuilder getPaginationOrBuilder() { if (paginationBuilder_ != null) { @@ -1169,13 +1140,13 @@ public io.pinecone.proto.PaginationOrBuilder getPaginationOrBuilder() { * Pagination token to continue past this listing * * - * optional .Pagination pagination = 2; + * optional .Pagination pagination = 2 [json_name = "pagination"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.Pagination, io.pinecone.proto.Pagination.Builder, io.pinecone.proto.PaginationOrBuilder> getPaginationFieldBuilder() { if (paginationBuilder_ == null) { - paginationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + paginationBuilder_ = new com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.Pagination, io.pinecone.proto.Pagination.Builder, io.pinecone.proto.PaginationOrBuilder>( getPagination(), getParentForChildren(), @@ -1191,7 +1162,7 @@ public io.pinecone.proto.PaginationOrBuilder getPaginationOrBuilder() { * The namespace of the vectors. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The namespace. */ public java.lang.String getNamespace() { @@ -1211,7 +1182,7 @@ public java.lang.String getNamespace() { * The namespace of the vectors. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The bytes for namespace. */ public com.google.protobuf.ByteString @@ -1232,7 +1203,7 @@ public java.lang.String getNamespace() { * The namespace of the vectors. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @param value The namespace to set. * @return This builder for chaining. */ @@ -1249,7 +1220,7 @@ public Builder setNamespace( * The namespace of the vectors. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return This builder for chaining. */ public Builder clearNamespace() { @@ -1263,7 +1234,7 @@ public Builder clearNamespace() { * The namespace of the vectors. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @param value The bytes for namespace to set. * @return This builder for chaining. */ @@ -1278,14 +1249,14 @@ public Builder setNamespaceBytes( } private io.pinecone.proto.Usage usage_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.Usage, io.pinecone.proto.Usage.Builder, io.pinecone.proto.UsageOrBuilder> usageBuilder_; /** *
-     *  The usage for this operation.
+     * The usage for this operation.
      * 
* - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; * @return Whether the usage field is set. */ public boolean hasUsage() { @@ -1293,10 +1264,10 @@ public boolean hasUsage() { } /** *
-     *  The usage for this operation.
+     * The usage for this operation.
      * 
* - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; * @return The usage. */ public io.pinecone.proto.Usage getUsage() { @@ -1308,10 +1279,10 @@ public io.pinecone.proto.Usage getUsage() { } /** *
-     *  The usage for this operation.
+     * The usage for this operation.
      * 
* - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; */ public Builder setUsage(io.pinecone.proto.Usage value) { if (usageBuilder_ == null) { @@ -1328,10 +1299,10 @@ public Builder setUsage(io.pinecone.proto.Usage value) { } /** *
-     *  The usage for this operation.
+     * The usage for this operation.
      * 
* - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; */ public Builder setUsage( io.pinecone.proto.Usage.Builder builderForValue) { @@ -1346,10 +1317,10 @@ public Builder setUsage( } /** *
-     *  The usage for this operation.
+     * The usage for this operation.
      * 
* - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; */ public Builder mergeUsage(io.pinecone.proto.Usage value) { if (usageBuilder_ == null) { @@ -1371,10 +1342,10 @@ public Builder mergeUsage(io.pinecone.proto.Usage value) { } /** *
-     *  The usage for this operation.
+     * The usage for this operation.
      * 
* - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; */ public Builder clearUsage() { bitField0_ = (bitField0_ & ~0x00000008); @@ -1388,10 +1359,10 @@ public Builder clearUsage() { } /** *
-     *  The usage for this operation.
+     * The usage for this operation.
      * 
* - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; */ public io.pinecone.proto.Usage.Builder getUsageBuilder() { bitField0_ |= 0x00000008; @@ -1400,10 +1371,10 @@ public io.pinecone.proto.Usage.Builder getUsageBuilder() { } /** *
-     *  The usage for this operation.
+     * The usage for this operation.
      * 
* - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; */ public io.pinecone.proto.UsageOrBuilder getUsageOrBuilder() { if (usageBuilder_ != null) { @@ -1415,16 +1386,16 @@ public io.pinecone.proto.UsageOrBuilder getUsageOrBuilder() { } /** *
-     *  The usage for this operation.
+     * The usage for this operation.
      * 
* - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.Usage, io.pinecone.proto.Usage.Builder, io.pinecone.proto.UsageOrBuilder> getUsageFieldBuilder() { if (usageBuilder_ == null) { - usageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + usageBuilder_ = new com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.Usage, io.pinecone.proto.Usage.Builder, io.pinecone.proto.UsageOrBuilder>( getUsage(), getParentForChildren(), @@ -1433,18 +1404,6 @@ public io.pinecone.proto.UsageOrBuilder getUsageOrBuilder() { } return usageBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:ListResponse) } diff --git a/src/main/java/io/pinecone/proto/ListResponseOrBuilder.java b/src/main/java/io/pinecone/proto/ListResponseOrBuilder.java index 0b876be2..0e11d0c7 100644 --- a/src/main/java/io/pinecone/proto/ListResponseOrBuilder.java +++ b/src/main/java/io/pinecone/proto/ListResponseOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface ListResponseOrBuilder extends @@ -13,7 +14,7 @@ public interface ListResponseOrBuilder extends * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ java.util.List getVectorsList(); @@ -22,7 +23,7 @@ public interface ListResponseOrBuilder extends * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ io.pinecone.proto.ListItem getVectors(int index); /** @@ -30,7 +31,7 @@ public interface ListResponseOrBuilder extends * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ int getVectorsCount(); /** @@ -38,7 +39,7 @@ public interface ListResponseOrBuilder extends * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ java.util.List getVectorsOrBuilderList(); @@ -47,7 +48,7 @@ public interface ListResponseOrBuilder extends * A list of ids * * - * repeated .ListItem vectors = 1; + * repeated .ListItem vectors = 1 [json_name = "vectors"]; */ io.pinecone.proto.ListItemOrBuilder getVectorsOrBuilder( int index); @@ -57,7 +58,7 @@ io.pinecone.proto.ListItemOrBuilder getVectorsOrBuilder( * Pagination token to continue past this listing * * - * optional .Pagination pagination = 2; + * optional .Pagination pagination = 2 [json_name = "pagination"]; * @return Whether the pagination field is set. */ boolean hasPagination(); @@ -66,7 +67,7 @@ io.pinecone.proto.ListItemOrBuilder getVectorsOrBuilder( * Pagination token to continue past this listing * * - * optional .Pagination pagination = 2; + * optional .Pagination pagination = 2 [json_name = "pagination"]; * @return The pagination. */ io.pinecone.proto.Pagination getPagination(); @@ -75,7 +76,7 @@ io.pinecone.proto.ListItemOrBuilder getVectorsOrBuilder( * Pagination token to continue past this listing * * - * optional .Pagination pagination = 2; + * optional .Pagination pagination = 2 [json_name = "pagination"]; */ io.pinecone.proto.PaginationOrBuilder getPaginationOrBuilder(); @@ -84,7 +85,7 @@ io.pinecone.proto.ListItemOrBuilder getVectorsOrBuilder( * The namespace of the vectors. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The namespace. */ java.lang.String getNamespace(); @@ -93,7 +94,7 @@ io.pinecone.proto.ListItemOrBuilder getVectorsOrBuilder( * The namespace of the vectors. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The bytes for namespace. */ com.google.protobuf.ByteString @@ -101,28 +102,28 @@ io.pinecone.proto.ListItemOrBuilder getVectorsOrBuilder( /** *
-   *  The usage for this operation.
+   * The usage for this operation.
    * 
* - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; * @return Whether the usage field is set. */ boolean hasUsage(); /** *
-   *  The usage for this operation.
+   * The usage for this operation.
    * 
* - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; * @return The usage. */ io.pinecone.proto.Usage getUsage(); /** *
-   *  The usage for this operation.
+   * The usage for this operation.
    * 
* - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; */ io.pinecone.proto.UsageOrBuilder getUsageOrBuilder(); } diff --git a/src/main/java/io/pinecone/proto/NamespaceSummary.java b/src/main/java/io/pinecone/proto/NamespaceSummary.java index 15343ab0..a7213705 100644 --- a/src/main/java/io/pinecone/proto/NamespaceSummary.java +++ b/src/main/java/io/pinecone/proto/NamespaceSummary.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** @@ -12,33 +13,35 @@ * Protobuf type {@code NamespaceSummary} */ public final class NamespaceSummary extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:NamespaceSummary) NamespaceSummaryOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + NamespaceSummary.class.getName()); + } // Use NamespaceSummary.newBuilder() to construct. - private NamespaceSummary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private NamespaceSummary(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private NamespaceSummary() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new NamespaceSummary(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_NamespaceSummary_descriptor; + return io.pinecone.proto.DbData202501.internal_static_NamespaceSummary_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_NamespaceSummary_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_NamespaceSummary_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.NamespaceSummary.class, io.pinecone.proto.NamespaceSummary.Builder.class); } @@ -51,7 +54,7 @@ protected java.lang.Object newInstance( * underlying index and corresponding query results, etc. * * - * uint32 vector_count = 1; + * uint32 vector_count = 1 [json_name = "vectorCount"]; * @return The vectorCount. */ @java.lang.Override @@ -158,20 +161,20 @@ public static io.pinecone.proto.NamespaceSummary parseFrom( } public static io.pinecone.proto.NamespaceSummary parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.NamespaceSummary parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.NamespaceSummary parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -179,20 +182,20 @@ public static io.pinecone.proto.NamespaceSummary parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.NamespaceSummary parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.NamespaceSummary parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -212,7 +215,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -224,18 +227,18 @@ protected Builder newBuilderForType( * Protobuf type {@code NamespaceSummary} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:NamespaceSummary) io.pinecone.proto.NamespaceSummaryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_NamespaceSummary_descriptor; + return io.pinecone.proto.DbData202501.internal_static_NamespaceSummary_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_NamespaceSummary_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_NamespaceSummary_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.NamespaceSummary.class, io.pinecone.proto.NamespaceSummary.Builder.class); } @@ -246,7 +249,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -261,7 +264,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_NamespaceSummary_descriptor; + return io.pinecone.proto.DbData202501.internal_static_NamespaceSummary_descriptor; } @java.lang.Override @@ -293,38 +296,6 @@ private void buildPartial0(io.pinecone.proto.NamespaceSummary result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.NamespaceSummary) { @@ -395,7 +366,7 @@ public Builder mergeFrom( * underlying index and corresponding query results, etc. * * - * uint32 vector_count = 1; + * uint32 vector_count = 1 [json_name = "vectorCount"]; * @return The vectorCount. */ @java.lang.Override @@ -408,7 +379,7 @@ public int getVectorCount() { * underlying index and corresponding query results, etc. * * - * uint32 vector_count = 1; + * uint32 vector_count = 1 [json_name = "vectorCount"]; * @param value The vectorCount to set. * @return This builder for chaining. */ @@ -425,7 +396,7 @@ public Builder setVectorCount(int value) { * underlying index and corresponding query results, etc. * * - * uint32 vector_count = 1; + * uint32 vector_count = 1 [json_name = "vectorCount"]; * @return This builder for chaining. */ public Builder clearVectorCount() { @@ -434,18 +405,6 @@ public Builder clearVectorCount() { onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:NamespaceSummary) } diff --git a/src/main/java/io/pinecone/proto/NamespaceSummaryOrBuilder.java b/src/main/java/io/pinecone/proto/NamespaceSummaryOrBuilder.java index 99edc2ea..c4be5f62 100644 --- a/src/main/java/io/pinecone/proto/NamespaceSummaryOrBuilder.java +++ b/src/main/java/io/pinecone/proto/NamespaceSummaryOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface NamespaceSummaryOrBuilder extends @@ -14,7 +15,7 @@ public interface NamespaceSummaryOrBuilder extends * underlying index and corresponding query results, etc. * * - * uint32 vector_count = 1; + * uint32 vector_count = 1 [json_name = "vectorCount"]; * @return The vectorCount. */ int getVectorCount(); diff --git a/src/main/java/io/pinecone/proto/Pagination.java b/src/main/java/io/pinecone/proto/Pagination.java index f84cb301..d7d0896b 100644 --- a/src/main/java/io/pinecone/proto/Pagination.java +++ b/src/main/java/io/pinecone/proto/Pagination.java @@ -1,41 +1,44 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** * Protobuf type {@code Pagination} */ public final class Pagination extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:Pagination) PaginationOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + Pagination.class.getName()); + } // Use Pagination.newBuilder() to construct. - private Pagination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Pagination(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Pagination() { next_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Pagination(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_Pagination_descriptor; + return io.pinecone.proto.DbData202501.internal_static_Pagination_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_Pagination_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_Pagination_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.Pagination.class, io.pinecone.proto.Pagination.Builder.class); } @@ -44,7 +47,7 @@ protected java.lang.Object newInstance( @SuppressWarnings("serial") private volatile java.lang.Object next_ = ""; /** - * string next = 1; + * string next = 1 [json_name = "next"]; * @return The next. */ @java.lang.Override @@ -61,7 +64,7 @@ public java.lang.String getNext() { } } /** - * string next = 1; + * string next = 1 [json_name = "next"]; * @return The bytes for next. */ @java.lang.Override @@ -93,8 +96,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(next_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, next_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(next_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, next_); } getUnknownFields().writeTo(output); } @@ -105,8 +108,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(next_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, next_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(next_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, next_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -177,20 +180,20 @@ public static io.pinecone.proto.Pagination parseFrom( } public static io.pinecone.proto.Pagination parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.Pagination parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.Pagination parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -198,20 +201,20 @@ public static io.pinecone.proto.Pagination parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.Pagination parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.Pagination parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -231,7 +234,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -239,18 +242,18 @@ protected Builder newBuilderForType( * Protobuf type {@code Pagination} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:Pagination) io.pinecone.proto.PaginationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_Pagination_descriptor; + return io.pinecone.proto.DbData202501.internal_static_Pagination_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_Pagination_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_Pagination_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.Pagination.class, io.pinecone.proto.Pagination.Builder.class); } @@ -261,7 +264,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -276,7 +279,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_Pagination_descriptor; + return io.pinecone.proto.DbData202501.internal_static_Pagination_descriptor; } @java.lang.Override @@ -308,38 +311,6 @@ private void buildPartial0(io.pinecone.proto.Pagination result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.Pagination) { @@ -407,7 +378,7 @@ public Builder mergeFrom( private java.lang.Object next_ = ""; /** - * string next = 1; + * string next = 1 [json_name = "next"]; * @return The next. */ public java.lang.String getNext() { @@ -423,7 +394,7 @@ public java.lang.String getNext() { } } /** - * string next = 1; + * string next = 1 [json_name = "next"]; * @return The bytes for next. */ public com.google.protobuf.ByteString @@ -440,7 +411,7 @@ public java.lang.String getNext() { } } /** - * string next = 1; + * string next = 1 [json_name = "next"]; * @param value The next to set. * @return This builder for chaining. */ @@ -453,7 +424,7 @@ public Builder setNext( return this; } /** - * string next = 1; + * string next = 1 [json_name = "next"]; * @return This builder for chaining. */ public Builder clearNext() { @@ -463,7 +434,7 @@ public Builder clearNext() { return this; } /** - * string next = 1; + * string next = 1 [json_name = "next"]; * @param value The bytes for next to set. * @return This builder for chaining. */ @@ -476,18 +447,6 @@ public Builder setNextBytes( onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:Pagination) } diff --git a/src/main/java/io/pinecone/proto/PaginationOrBuilder.java b/src/main/java/io/pinecone/proto/PaginationOrBuilder.java index e6690567..c790f310 100644 --- a/src/main/java/io/pinecone/proto/PaginationOrBuilder.java +++ b/src/main/java/io/pinecone/proto/PaginationOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface PaginationOrBuilder extends @@ -9,12 +10,12 @@ public interface PaginationOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * string next = 1; + * string next = 1 [json_name = "next"]; * @return The next. */ java.lang.String getNext(); /** - * string next = 1; + * string next = 1 [json_name = "next"]; * @return The bytes for next. */ com.google.protobuf.ByteString diff --git a/src/main/java/io/pinecone/proto/QueryRequest.java b/src/main/java/io/pinecone/proto/QueryRequest.java index 315772ad..30afd1d1 100644 --- a/src/main/java/io/pinecone/proto/QueryRequest.java +++ b/src/main/java/io/pinecone/proto/QueryRequest.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** @@ -12,12 +13,21 @@ * Protobuf type {@code QueryRequest} */ public final class QueryRequest extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:QueryRequest) QueryRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + QueryRequest.class.getName()); + } // Use QueryRequest.newBuilder() to construct. - private QueryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private QueryRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private QueryRequest() { @@ -27,22 +37,15 @@ private QueryRequest() { id_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new QueryRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryRequest_descriptor; + return io.pinecone.proto.DbData202501.internal_static_QueryRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryRequest_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_QueryRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.QueryRequest.class, io.pinecone.proto.QueryRequest.Builder.class); } @@ -56,7 +59,7 @@ protected java.lang.Object newInstance( * The namespace to query. * * - * string namespace = 1; + * string namespace = 1 [json_name = "namespace"]; * @return The namespace. */ @java.lang.Override @@ -77,7 +80,7 @@ public java.lang.String getNamespace() { * The namespace to query. * * - * string namespace = 1; + * string namespace = 1 [json_name = "namespace"]; * @return The bytes for namespace. */ @java.lang.Override @@ -102,7 +105,7 @@ public java.lang.String getNamespace() { * The number of results to return for each query. * * - * uint32 top_k = 2 [(.google.api.field_behavior) = REQUIRED]; + * uint32 top_k = 2 [json_name = "topK", (.google.api.field_behavior) = REQUIRED]; * @return The topK. */ @java.lang.Override @@ -114,10 +117,10 @@ public int getTopK() { private com.google.protobuf.Struct filter_; /** *
-   * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
+   * The filter to apply. You can use vector metadata to limit your search. See [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
    * 
* - * .google.protobuf.Struct filter = 3; + * .google.protobuf.Struct filter = 3 [json_name = "filter"]; * @return Whether the filter field is set. */ @java.lang.Override @@ -126,10 +129,10 @@ public boolean hasFilter() { } /** *
-   * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
+   * The filter to apply. You can use vector metadata to limit your search. See [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
    * 
* - * .google.protobuf.Struct filter = 3; + * .google.protobuf.Struct filter = 3 [json_name = "filter"]; * @return The filter. */ @java.lang.Override @@ -138,10 +141,10 @@ public com.google.protobuf.Struct getFilter() { } /** *
-   * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
+   * The filter to apply. You can use vector metadata to limit your search. See [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
    * 
* - * .google.protobuf.Struct filter = 3; + * .google.protobuf.Struct filter = 3 [json_name = "filter"]; */ @java.lang.Override public com.google.protobuf.StructOrBuilder getFilterOrBuilder() { @@ -155,7 +158,7 @@ public com.google.protobuf.StructOrBuilder getFilterOrBuilder() { * Indicates whether vector values are included in the response. * * - * bool include_values = 4; + * bool include_values = 4 [json_name = "includeValues"]; * @return The includeValues. */ @java.lang.Override @@ -170,7 +173,7 @@ public boolean getIncludeValues() { * Indicates whether metadata is included in the response as well as the ids. * * - * bool include_metadata = 5; + * bool include_metadata = 5 [json_name = "includeMetadata"]; * @return The includeMetadata. */ @java.lang.Override @@ -186,7 +189,7 @@ public boolean getIncludeMetadata() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public java.util.List getQueriesList() { @@ -197,7 +200,7 @@ public boolean getIncludeMetadata() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public java.util.List @@ -209,7 +212,7 @@ public boolean getIncludeMetadata() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public int getQueriesCount() { @@ -220,7 +223,7 @@ public boolean getIncludeMetadata() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public io.pinecone.proto.QueryVector getQueries(int index) { @@ -231,7 +234,7 @@ public boolean getIncludeMetadata() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public io.pinecone.proto.QueryVectorOrBuilder getQueriesOrBuilder( @@ -248,7 +251,7 @@ public boolean getIncludeMetadata() { * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`. * * - * repeated float vector = 7; + * repeated float vector = 7 [json_name = "vector"]; * @return A list containing the vector. */ @java.lang.Override @@ -261,7 +264,7 @@ public boolean getIncludeMetadata() { * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`. * * - * repeated float vector = 7; + * repeated float vector = 7 [json_name = "vector"]; * @return The count of vector. */ public int getVectorCount() { @@ -272,7 +275,7 @@ public int getVectorCount() { * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`. * * - * repeated float vector = 7; + * repeated float vector = 7 [json_name = "vector"]; * @param index The index of the element to return. * @return The vector at the given index. */ @@ -288,7 +291,7 @@ public float getVector(int index) { * The query sparse values. * * - * .SparseValues sparse_vector = 9; + * .SparseValues sparse_vector = 9 [json_name = "sparseVector"]; * @return Whether the sparseVector field is set. */ @java.lang.Override @@ -300,7 +303,7 @@ public boolean hasSparseVector() { * The query sparse values. * * - * .SparseValues sparse_vector = 9; + * .SparseValues sparse_vector = 9 [json_name = "sparseVector"]; * @return The sparseVector. */ @java.lang.Override @@ -312,7 +315,7 @@ public io.pinecone.proto.SparseValues getSparseVector() { * The query sparse values. * * - * .SparseValues sparse_vector = 9; + * .SparseValues sparse_vector = 9 [json_name = "sparseVector"]; */ @java.lang.Override public io.pinecone.proto.SparseValuesOrBuilder getSparseVectorOrBuilder() { @@ -327,7 +330,7 @@ public io.pinecone.proto.SparseValuesOrBuilder getSparseVectorOrBuilder() { * The unique ID of the vector to be used as a query vector. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * string id = 8; + * string id = 8 [json_name = "id"]; * @return The id. */ @java.lang.Override @@ -348,7 +351,7 @@ public java.lang.String getId() { * The unique ID of the vector to be used as a query vector. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * string id = 8; + * string id = 8 [json_name = "id"]; * @return The bytes for id. */ @java.lang.Override @@ -381,8 +384,8 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, namespace_); } if (topK_ != 0) { output.writeUInt32(2, topK_); @@ -406,8 +409,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < vector_.size(); i++) { output.writeFloatNoTag(vector_.getFloat(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, id_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, id_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(9, getSparseVector()); @@ -421,8 +424,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, namespace_); } if (topK_ != 0) { size += com.google.protobuf.CodedOutputStream @@ -455,8 +458,8 @@ public int getSerializedSize() { } vectorMemoizedSerializedSize = dataSize; } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, id_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, id_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -579,20 +582,20 @@ public static io.pinecone.proto.QueryRequest parseFrom( } public static io.pinecone.proto.QueryRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.QueryRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.QueryRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -600,20 +603,20 @@ public static io.pinecone.proto.QueryRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.QueryRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.QueryRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -633,7 +636,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -645,18 +648,18 @@ protected Builder newBuilderForType( * Protobuf type {@code QueryRequest} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:QueryRequest) io.pinecone.proto.QueryRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryRequest_descriptor; + return io.pinecone.proto.DbData202501.internal_static_QueryRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryRequest_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_QueryRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.QueryRequest.class, io.pinecone.proto.QueryRequest.Builder.class); } @@ -667,12 +670,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getFilterFieldBuilder(); getQueriesFieldBuilder(); @@ -712,7 +715,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryRequest_descriptor; + return io.pinecone.proto.DbData202501.internal_static_QueryRequest_descriptor; } @java.lang.Override @@ -787,38 +790,6 @@ private void buildPartial0(io.pinecone.proto.QueryRequest result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.QueryRequest) { @@ -867,7 +838,7 @@ public Builder mergeFrom(io.pinecone.proto.QueryRequest other) { queries_ = other.queries_; bitField0_ = (bitField0_ & ~0x00000020); queriesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getQueriesFieldBuilder() : null; } else { queriesBuilder_.addAllMessages(other.queries_); @@ -1011,7 +982,7 @@ public Builder mergeFrom( * The namespace to query. * * - * string namespace = 1; + * string namespace = 1 [json_name = "namespace"]; * @return The namespace. */ public java.lang.String getNamespace() { @@ -1031,7 +1002,7 @@ public java.lang.String getNamespace() { * The namespace to query. * * - * string namespace = 1; + * string namespace = 1 [json_name = "namespace"]; * @return The bytes for namespace. */ public com.google.protobuf.ByteString @@ -1052,7 +1023,7 @@ public java.lang.String getNamespace() { * The namespace to query. * * - * string namespace = 1; + * string namespace = 1 [json_name = "namespace"]; * @param value The namespace to set. * @return This builder for chaining. */ @@ -1069,7 +1040,7 @@ public Builder setNamespace( * The namespace to query. * * - * string namespace = 1; + * string namespace = 1 [json_name = "namespace"]; * @return This builder for chaining. */ public Builder clearNamespace() { @@ -1083,7 +1054,7 @@ public Builder clearNamespace() { * The namespace to query. * * - * string namespace = 1; + * string namespace = 1 [json_name = "namespace"]; * @param value The bytes for namespace to set. * @return This builder for chaining. */ @@ -1103,7 +1074,7 @@ public Builder setNamespaceBytes( * The number of results to return for each query. * * - * uint32 top_k = 2 [(.google.api.field_behavior) = REQUIRED]; + * uint32 top_k = 2 [json_name = "topK", (.google.api.field_behavior) = REQUIRED]; * @return The topK. */ @java.lang.Override @@ -1115,7 +1086,7 @@ public int getTopK() { * The number of results to return for each query. * * - * uint32 top_k = 2 [(.google.api.field_behavior) = REQUIRED]; + * uint32 top_k = 2 [json_name = "topK", (.google.api.field_behavior) = REQUIRED]; * @param value The topK to set. * @return This builder for chaining. */ @@ -1131,7 +1102,7 @@ public Builder setTopK(int value) { * The number of results to return for each query. * * - * uint32 top_k = 2 [(.google.api.field_behavior) = REQUIRED]; + * uint32 top_k = 2 [json_name = "topK", (.google.api.field_behavior) = REQUIRED]; * @return This builder for chaining. */ public Builder clearTopK() { @@ -1142,14 +1113,14 @@ public Builder clearTopK() { } private com.google.protobuf.Struct filter_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> filterBuilder_; /** *
-     * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
+     * The filter to apply. You can use vector metadata to limit your search. See [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
      * 
* - * .google.protobuf.Struct filter = 3; + * .google.protobuf.Struct filter = 3 [json_name = "filter"]; * @return Whether the filter field is set. */ public boolean hasFilter() { @@ -1157,10 +1128,10 @@ public boolean hasFilter() { } /** *
-     * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
+     * The filter to apply. You can use vector metadata to limit your search. See [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
      * 
* - * .google.protobuf.Struct filter = 3; + * .google.protobuf.Struct filter = 3 [json_name = "filter"]; * @return The filter. */ public com.google.protobuf.Struct getFilter() { @@ -1172,10 +1143,10 @@ public com.google.protobuf.Struct getFilter() { } /** *
-     * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
+     * The filter to apply. You can use vector metadata to limit your search. See [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
      * 
* - * .google.protobuf.Struct filter = 3; + * .google.protobuf.Struct filter = 3 [json_name = "filter"]; */ public Builder setFilter(com.google.protobuf.Struct value) { if (filterBuilder_ == null) { @@ -1192,10 +1163,10 @@ public Builder setFilter(com.google.protobuf.Struct value) { } /** *
-     * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
+     * The filter to apply. You can use vector metadata to limit your search. See [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
      * 
* - * .google.protobuf.Struct filter = 3; + * .google.protobuf.Struct filter = 3 [json_name = "filter"]; */ public Builder setFilter( com.google.protobuf.Struct.Builder builderForValue) { @@ -1210,10 +1181,10 @@ public Builder setFilter( } /** *
-     * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
+     * The filter to apply. You can use vector metadata to limit your search. See [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
      * 
* - * .google.protobuf.Struct filter = 3; + * .google.protobuf.Struct filter = 3 [json_name = "filter"]; */ public Builder mergeFilter(com.google.protobuf.Struct value) { if (filterBuilder_ == null) { @@ -1235,10 +1206,10 @@ public Builder mergeFilter(com.google.protobuf.Struct value) { } /** *
-     * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
+     * The filter to apply. You can use vector metadata to limit your search. See [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
      * 
* - * .google.protobuf.Struct filter = 3; + * .google.protobuf.Struct filter = 3 [json_name = "filter"]; */ public Builder clearFilter() { bitField0_ = (bitField0_ & ~0x00000004); @@ -1252,10 +1223,10 @@ public Builder clearFilter() { } /** *
-     * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
+     * The filter to apply. You can use vector metadata to limit your search. See [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
      * 
* - * .google.protobuf.Struct filter = 3; + * .google.protobuf.Struct filter = 3 [json_name = "filter"]; */ public com.google.protobuf.Struct.Builder getFilterBuilder() { bitField0_ |= 0x00000004; @@ -1264,10 +1235,10 @@ public com.google.protobuf.Struct.Builder getFilterBuilder() { } /** *
-     * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
+     * The filter to apply. You can use vector metadata to limit your search. See [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
      * 
* - * .google.protobuf.Struct filter = 3; + * .google.protobuf.Struct filter = 3 [json_name = "filter"]; */ public com.google.protobuf.StructOrBuilder getFilterOrBuilder() { if (filterBuilder_ != null) { @@ -1279,16 +1250,16 @@ public com.google.protobuf.StructOrBuilder getFilterOrBuilder() { } /** *
-     * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
+     * The filter to apply. You can use vector metadata to limit your search. See [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
      * 
* - * .google.protobuf.Struct filter = 3; + * .google.protobuf.Struct filter = 3 [json_name = "filter"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> getFilterFieldBuilder() { if (filterBuilder_ == null) { - filterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + filterBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( getFilter(), getParentForChildren(), @@ -1304,7 +1275,7 @@ public com.google.protobuf.StructOrBuilder getFilterOrBuilder() { * Indicates whether vector values are included in the response. * * - * bool include_values = 4; + * bool include_values = 4 [json_name = "includeValues"]; * @return The includeValues. */ @java.lang.Override @@ -1316,7 +1287,7 @@ public boolean getIncludeValues() { * Indicates whether vector values are included in the response. * * - * bool include_values = 4; + * bool include_values = 4 [json_name = "includeValues"]; * @param value The includeValues to set. * @return This builder for chaining. */ @@ -1332,7 +1303,7 @@ public Builder setIncludeValues(boolean value) { * Indicates whether vector values are included in the response. * * - * bool include_values = 4; + * bool include_values = 4 [json_name = "includeValues"]; * @return This builder for chaining. */ public Builder clearIncludeValues() { @@ -1348,7 +1319,7 @@ public Builder clearIncludeValues() { * Indicates whether metadata is included in the response as well as the ids. * * - * bool include_metadata = 5; + * bool include_metadata = 5 [json_name = "includeMetadata"]; * @return The includeMetadata. */ @java.lang.Override @@ -1360,7 +1331,7 @@ public boolean getIncludeMetadata() { * Indicates whether metadata is included in the response as well as the ids. * * - * bool include_metadata = 5; + * bool include_metadata = 5 [json_name = "includeMetadata"]; * @param value The includeMetadata to set. * @return This builder for chaining. */ @@ -1376,7 +1347,7 @@ public Builder setIncludeMetadata(boolean value) { * Indicates whether metadata is included in the response as well as the ids. * * - * bool include_metadata = 5; + * bool include_metadata = 5 [json_name = "includeMetadata"]; * @return This builder for chaining. */ public Builder clearIncludeMetadata() { @@ -1395,7 +1366,7 @@ private void ensureQueriesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< io.pinecone.proto.QueryVector, io.pinecone.proto.QueryVector.Builder, io.pinecone.proto.QueryVectorOrBuilder> queriesBuilder_; /** @@ -1403,7 +1374,7 @@ private void ensureQueriesIsMutable() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated public java.util.List getQueriesList() { if (queriesBuilder_ == null) { @@ -1417,7 +1388,7 @@ private void ensureQueriesIsMutable() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated public int getQueriesCount() { if (queriesBuilder_ == null) { @@ -1431,7 +1402,7 @@ private void ensureQueriesIsMutable() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated public io.pinecone.proto.QueryVector getQueries(int index) { if (queriesBuilder_ == null) { @@ -1445,7 +1416,7 @@ private void ensureQueriesIsMutable() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated public Builder setQueries( int index, io.pinecone.proto.QueryVector value) { @@ -1466,7 +1437,7 @@ private void ensureQueriesIsMutable() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated public Builder setQueries( int index, io.pinecone.proto.QueryVector.Builder builderForValue) { @@ -1484,7 +1455,7 @@ private void ensureQueriesIsMutable() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated public Builder addQueries(io.pinecone.proto.QueryVector value) { if (queriesBuilder_ == null) { @@ -1504,7 +1475,7 @@ private void ensureQueriesIsMutable() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated public Builder addQueries( int index, io.pinecone.proto.QueryVector value) { @@ -1525,7 +1496,7 @@ private void ensureQueriesIsMutable() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated public Builder addQueries( io.pinecone.proto.QueryVector.Builder builderForValue) { @@ -1543,7 +1514,7 @@ private void ensureQueriesIsMutable() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated public Builder addQueries( int index, io.pinecone.proto.QueryVector.Builder builderForValue) { @@ -1561,7 +1532,7 @@ private void ensureQueriesIsMutable() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated public Builder addAllQueries( java.lang.Iterable values) { @@ -1580,7 +1551,7 @@ private void ensureQueriesIsMutable() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated public Builder clearQueries() { if (queriesBuilder_ == null) { @@ -1597,7 +1568,7 @@ private void ensureQueriesIsMutable() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated public Builder removeQueries(int index) { if (queriesBuilder_ == null) { @@ -1614,7 +1585,7 @@ private void ensureQueriesIsMutable() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated public io.pinecone.proto.QueryVector.Builder getQueriesBuilder( int index) { @@ -1625,7 +1596,7 @@ private void ensureQueriesIsMutable() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated public io.pinecone.proto.QueryVectorOrBuilder getQueriesOrBuilder( int index) { @@ -1639,7 +1610,7 @@ private void ensureQueriesIsMutable() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated public java.util.List getQueriesOrBuilderList() { @@ -1654,7 +1625,7 @@ private void ensureQueriesIsMutable() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated public io.pinecone.proto.QueryVector.Builder addQueriesBuilder() { return getQueriesFieldBuilder().addBuilder( @@ -1665,7 +1636,7 @@ private void ensureQueriesIsMutable() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated public io.pinecone.proto.QueryVector.Builder addQueriesBuilder( int index) { @@ -1677,17 +1648,17 @@ private void ensureQueriesIsMutable() { * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated public java.util.List getQueriesBuilderList() { return getQueriesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< io.pinecone.proto.QueryVector, io.pinecone.proto.QueryVector.Builder, io.pinecone.proto.QueryVectorOrBuilder> getQueriesFieldBuilder() { if (queriesBuilder_ == null) { - queriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + queriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< io.pinecone.proto.QueryVector, io.pinecone.proto.QueryVector.Builder, io.pinecone.proto.QueryVectorOrBuilder>( queries_, ((bitField0_ & 0x00000020) != 0), @@ -1716,7 +1687,7 @@ private void ensureVectorIsMutable(int capacity) { * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`. * * - * repeated float vector = 7; + * repeated float vector = 7 [json_name = "vector"]; * @return A list containing the vector. */ public java.util.List @@ -1729,7 +1700,7 @@ private void ensureVectorIsMutable(int capacity) { * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`. * * - * repeated float vector = 7; + * repeated float vector = 7 [json_name = "vector"]; * @return The count of vector. */ public int getVectorCount() { @@ -1740,7 +1711,7 @@ public int getVectorCount() { * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`. * * - * repeated float vector = 7; + * repeated float vector = 7 [json_name = "vector"]; * @param index The index of the element to return. * @return The vector at the given index. */ @@ -1752,7 +1723,7 @@ public float getVector(int index) { * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`. * * - * repeated float vector = 7; + * repeated float vector = 7 [json_name = "vector"]; * @param index The index to set the value at. * @param value The vector to set. * @return This builder for chaining. @@ -1771,7 +1742,7 @@ public Builder setVector( * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`. * * - * repeated float vector = 7; + * repeated float vector = 7 [json_name = "vector"]; * @param value The vector to add. * @return This builder for chaining. */ @@ -1788,7 +1759,7 @@ public Builder addVector(float value) { * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`. * * - * repeated float vector = 7; + * repeated float vector = 7 [json_name = "vector"]; * @param values The vector to add. * @return This builder for chaining. */ @@ -1806,7 +1777,7 @@ public Builder addAllVector( * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`. * * - * repeated float vector = 7; + * repeated float vector = 7 [json_name = "vector"]; * @return This builder for chaining. */ public Builder clearVector() { @@ -1817,14 +1788,14 @@ public Builder clearVector() { } private io.pinecone.proto.SparseValues sparseVector_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder> sparseVectorBuilder_; /** *
      * The query sparse values.
      * 
* - * .SparseValues sparse_vector = 9; + * .SparseValues sparse_vector = 9 [json_name = "sparseVector"]; * @return Whether the sparseVector field is set. */ public boolean hasSparseVector() { @@ -1835,7 +1806,7 @@ public boolean hasSparseVector() { * The query sparse values. * * - * .SparseValues sparse_vector = 9; + * .SparseValues sparse_vector = 9 [json_name = "sparseVector"]; * @return The sparseVector. */ public io.pinecone.proto.SparseValues getSparseVector() { @@ -1850,7 +1821,7 @@ public io.pinecone.proto.SparseValues getSparseVector() { * The query sparse values. * * - * .SparseValues sparse_vector = 9; + * .SparseValues sparse_vector = 9 [json_name = "sparseVector"]; */ public Builder setSparseVector(io.pinecone.proto.SparseValues value) { if (sparseVectorBuilder_ == null) { @@ -1870,7 +1841,7 @@ public Builder setSparseVector(io.pinecone.proto.SparseValues value) { * The query sparse values. * * - * .SparseValues sparse_vector = 9; + * .SparseValues sparse_vector = 9 [json_name = "sparseVector"]; */ public Builder setSparseVector( io.pinecone.proto.SparseValues.Builder builderForValue) { @@ -1888,7 +1859,7 @@ public Builder setSparseVector( * The query sparse values. * * - * .SparseValues sparse_vector = 9; + * .SparseValues sparse_vector = 9 [json_name = "sparseVector"]; */ public Builder mergeSparseVector(io.pinecone.proto.SparseValues value) { if (sparseVectorBuilder_ == null) { @@ -1913,7 +1884,7 @@ public Builder mergeSparseVector(io.pinecone.proto.SparseValues value) { * The query sparse values. * * - * .SparseValues sparse_vector = 9; + * .SparseValues sparse_vector = 9 [json_name = "sparseVector"]; */ public Builder clearSparseVector() { bitField0_ = (bitField0_ & ~0x00000080); @@ -1930,7 +1901,7 @@ public Builder clearSparseVector() { * The query sparse values. * * - * .SparseValues sparse_vector = 9; + * .SparseValues sparse_vector = 9 [json_name = "sparseVector"]; */ public io.pinecone.proto.SparseValues.Builder getSparseVectorBuilder() { bitField0_ |= 0x00000080; @@ -1942,7 +1913,7 @@ public io.pinecone.proto.SparseValues.Builder getSparseVectorBuilder() { * The query sparse values. * * - * .SparseValues sparse_vector = 9; + * .SparseValues sparse_vector = 9 [json_name = "sparseVector"]; */ public io.pinecone.proto.SparseValuesOrBuilder getSparseVectorOrBuilder() { if (sparseVectorBuilder_ != null) { @@ -1957,13 +1928,13 @@ public io.pinecone.proto.SparseValuesOrBuilder getSparseVectorOrBuilder() { * The query sparse values. * * - * .SparseValues sparse_vector = 9; + * .SparseValues sparse_vector = 9 [json_name = "sparseVector"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder> getSparseVectorFieldBuilder() { if (sparseVectorBuilder_ == null) { - sparseVectorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + sparseVectorBuilder_ = new com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder>( getSparseVector(), getParentForChildren(), @@ -1979,7 +1950,7 @@ public io.pinecone.proto.SparseValuesOrBuilder getSparseVectorOrBuilder() { * The unique ID of the vector to be used as a query vector. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * string id = 8; + * string id = 8 [json_name = "id"]; * @return The id. */ public java.lang.String getId() { @@ -1999,7 +1970,7 @@ public java.lang.String getId() { * The unique ID of the vector to be used as a query vector. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * string id = 8; + * string id = 8 [json_name = "id"]; * @return The bytes for id. */ public com.google.protobuf.ByteString @@ -2020,7 +1991,7 @@ public java.lang.String getId() { * The unique ID of the vector to be used as a query vector. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * string id = 8; + * string id = 8 [json_name = "id"]; * @param value The id to set. * @return This builder for chaining. */ @@ -2037,7 +2008,7 @@ public Builder setId( * The unique ID of the vector to be used as a query vector. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * string id = 8; + * string id = 8 [json_name = "id"]; * @return This builder for chaining. */ public Builder clearId() { @@ -2051,7 +2022,7 @@ public Builder clearId() { * The unique ID of the vector to be used as a query vector. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * string id = 8; + * string id = 8 [json_name = "id"]; * @param value The bytes for id to set. * @return This builder for chaining. */ @@ -2064,18 +2035,6 @@ public Builder setIdBytes( onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:QueryRequest) } diff --git a/src/main/java/io/pinecone/proto/QueryRequestOrBuilder.java b/src/main/java/io/pinecone/proto/QueryRequestOrBuilder.java index 4c6ff990..aed1b963 100644 --- a/src/main/java/io/pinecone/proto/QueryRequestOrBuilder.java +++ b/src/main/java/io/pinecone/proto/QueryRequestOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface QueryRequestOrBuilder extends @@ -13,7 +14,7 @@ public interface QueryRequestOrBuilder extends * The namespace to query. * * - * string namespace = 1; + * string namespace = 1 [json_name = "namespace"]; * @return The namespace. */ java.lang.String getNamespace(); @@ -22,7 +23,7 @@ public interface QueryRequestOrBuilder extends * The namespace to query. * * - * string namespace = 1; + * string namespace = 1 [json_name = "namespace"]; * @return The bytes for namespace. */ com.google.protobuf.ByteString @@ -33,35 +34,35 @@ public interface QueryRequestOrBuilder extends * The number of results to return for each query. * * - * uint32 top_k = 2 [(.google.api.field_behavior) = REQUIRED]; + * uint32 top_k = 2 [json_name = "topK", (.google.api.field_behavior) = REQUIRED]; * @return The topK. */ int getTopK(); /** *
-   * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
+   * The filter to apply. You can use vector metadata to limit your search. See [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
    * 
* - * .google.protobuf.Struct filter = 3; + * .google.protobuf.Struct filter = 3 [json_name = "filter"]; * @return Whether the filter field is set. */ boolean hasFilter(); /** *
-   * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
+   * The filter to apply. You can use vector metadata to limit your search. See [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
    * 
* - * .google.protobuf.Struct filter = 3; + * .google.protobuf.Struct filter = 3 [json_name = "filter"]; * @return The filter. */ com.google.protobuf.Struct getFilter(); /** *
-   * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
+   * The filter to apply. You can use vector metadata to limit your search. See [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata).
    * 
* - * .google.protobuf.Struct filter = 3; + * .google.protobuf.Struct filter = 3 [json_name = "filter"]; */ com.google.protobuf.StructOrBuilder getFilterOrBuilder(); @@ -70,7 +71,7 @@ public interface QueryRequestOrBuilder extends * Indicates whether vector values are included in the response. * * - * bool include_values = 4; + * bool include_values = 4 [json_name = "includeValues"]; * @return The includeValues. */ boolean getIncludeValues(); @@ -80,7 +81,7 @@ public interface QueryRequestOrBuilder extends * Indicates whether metadata is included in the response as well as the ids. * * - * bool include_metadata = 5; + * bool include_metadata = 5 [json_name = "includeMetadata"]; * @return The includeMetadata. */ boolean getIncludeMetadata(); @@ -90,7 +91,7 @@ public interface QueryRequestOrBuilder extends * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated java.util.List getQueriesList(); @@ -99,7 +100,7 @@ public interface QueryRequestOrBuilder extends * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated io.pinecone.proto.QueryVector getQueries(int index); /** @@ -107,7 +108,7 @@ public interface QueryRequestOrBuilder extends * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated int getQueriesCount(); /** @@ -115,7 +116,7 @@ public interface QueryRequestOrBuilder extends * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated java.util.List getQueriesOrBuilderList(); @@ -124,7 +125,7 @@ public interface QueryRequestOrBuilder extends * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * repeated .QueryVector queries = 6 [deprecated = true]; + * repeated .QueryVector queries = 6 [json_name = "queries", deprecated = true]; */ @java.lang.Deprecated io.pinecone.proto.QueryVectorOrBuilder getQueriesOrBuilder( int index); @@ -134,7 +135,7 @@ public interface QueryRequestOrBuilder extends * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`. * * - * repeated float vector = 7; + * repeated float vector = 7 [json_name = "vector"]; * @return A list containing the vector. */ java.util.List getVectorList(); @@ -143,7 +144,7 @@ public interface QueryRequestOrBuilder extends * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`. * * - * repeated float vector = 7; + * repeated float vector = 7 [json_name = "vector"]; * @return The count of vector. */ int getVectorCount(); @@ -152,7 +153,7 @@ public interface QueryRequestOrBuilder extends * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`. * * - * repeated float vector = 7; + * repeated float vector = 7 [json_name = "vector"]; * @param index The index of the element to return. * @return The vector at the given index. */ @@ -163,7 +164,7 @@ public interface QueryRequestOrBuilder extends * The query sparse values. * * - * .SparseValues sparse_vector = 9; + * .SparseValues sparse_vector = 9 [json_name = "sparseVector"]; * @return Whether the sparseVector field is set. */ boolean hasSparseVector(); @@ -172,7 +173,7 @@ public interface QueryRequestOrBuilder extends * The query sparse values. * * - * .SparseValues sparse_vector = 9; + * .SparseValues sparse_vector = 9 [json_name = "sparseVector"]; * @return The sparseVector. */ io.pinecone.proto.SparseValues getSparseVector(); @@ -181,7 +182,7 @@ public interface QueryRequestOrBuilder extends * The query sparse values. * * - * .SparseValues sparse_vector = 9; + * .SparseValues sparse_vector = 9 [json_name = "sparseVector"]; */ io.pinecone.proto.SparseValuesOrBuilder getSparseVectorOrBuilder(); @@ -190,7 +191,7 @@ public interface QueryRequestOrBuilder extends * The unique ID of the vector to be used as a query vector. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * string id = 8; + * string id = 8 [json_name = "id"]; * @return The id. */ java.lang.String getId(); @@ -199,7 +200,7 @@ public interface QueryRequestOrBuilder extends * The unique ID of the vector to be used as a query vector. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. * * - * string id = 8; + * string id = 8 [json_name = "id"]; * @return The bytes for id. */ com.google.protobuf.ByteString diff --git a/src/main/java/io/pinecone/proto/QueryResponse.java b/src/main/java/io/pinecone/proto/QueryResponse.java index 4c2b7559..5ef7a5ce 100644 --- a/src/main/java/io/pinecone/proto/QueryResponse.java +++ b/src/main/java/io/pinecone/proto/QueryResponse.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** @@ -12,12 +13,21 @@ * Protobuf type {@code QueryResponse} */ public final class QueryResponse extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:QueryResponse) QueryResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + QueryResponse.class.getName()); + } // Use QueryResponse.newBuilder() to construct. - private QueryResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private QueryResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private QueryResponse() { @@ -26,22 +36,15 @@ private QueryResponse() { namespace_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new QueryResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryResponse_descriptor; + return io.pinecone.proto.DbData202501.internal_static_QueryResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryResponse_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_QueryResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.QueryResponse.class, io.pinecone.proto.QueryResponse.Builder.class); } @@ -55,7 +58,7 @@ protected java.lang.Object newInstance( * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public java.util.List getResultsList() { @@ -66,7 +69,7 @@ protected java.lang.Object newInstance( * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public java.util.List @@ -78,7 +81,7 @@ protected java.lang.Object newInstance( * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public int getResultsCount() { @@ -89,7 +92,7 @@ protected java.lang.Object newInstance( * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public io.pinecone.proto.SingleQueryResults getResults(int index) { @@ -100,7 +103,7 @@ protected java.lang.Object newInstance( * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public io.pinecone.proto.SingleQueryResultsOrBuilder getResultsOrBuilder( @@ -116,7 +119,7 @@ protected java.lang.Object newInstance( * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ @java.lang.Override public java.util.List getMatchesList() { @@ -127,7 +130,7 @@ public java.util.List getMatchesList() { * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ @java.lang.Override public java.util.List @@ -139,7 +142,7 @@ public java.util.List getMatchesList() { * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ @java.lang.Override public int getMatchesCount() { @@ -150,7 +153,7 @@ public int getMatchesCount() { * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ @java.lang.Override public io.pinecone.proto.ScoredVector getMatches(int index) { @@ -161,7 +164,7 @@ public io.pinecone.proto.ScoredVector getMatches(int index) { * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ @java.lang.Override public io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder( @@ -177,7 +180,7 @@ public io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder( * The namespace for the vectors. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The namespace. */ @java.lang.Override @@ -198,7 +201,7 @@ public java.lang.String getNamespace() { * The namespace for the vectors. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The bytes for namespace. */ @java.lang.Override @@ -223,7 +226,7 @@ public java.lang.String getNamespace() { * The usage for this operation. * * - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; * @return Whether the usage field is set. */ @java.lang.Override @@ -235,7 +238,7 @@ public boolean hasUsage() { * The usage for this operation. * * - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; * @return The usage. */ @java.lang.Override @@ -247,7 +250,7 @@ public io.pinecone.proto.Usage getUsage() { * The usage for this operation. * * - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; */ @java.lang.Override public io.pinecone.proto.UsageOrBuilder getUsageOrBuilder() { @@ -274,8 +277,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < matches_.size(); i++) { output.writeMessage(2, matches_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, namespace_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(4, getUsage()); @@ -297,8 +300,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, matches_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, namespace_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -394,20 +397,20 @@ public static io.pinecone.proto.QueryResponse parseFrom( } public static io.pinecone.proto.QueryResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.QueryResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.QueryResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -415,20 +418,20 @@ public static io.pinecone.proto.QueryResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.QueryResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.QueryResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -448,7 +451,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -460,18 +463,18 @@ protected Builder newBuilderForType( * Protobuf type {@code QueryResponse} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:QueryResponse) io.pinecone.proto.QueryResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryResponse_descriptor; + return io.pinecone.proto.DbData202501.internal_static_QueryResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryResponse_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_QueryResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.QueryResponse.class, io.pinecone.proto.QueryResponse.Builder.class); } @@ -482,12 +485,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getResultsFieldBuilder(); getMatchesFieldBuilder(); @@ -524,7 +527,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryResponse_descriptor; + return io.pinecone.proto.DbData202501.internal_static_QueryResponse_descriptor; } @java.lang.Override @@ -586,38 +589,6 @@ private void buildPartial0(io.pinecone.proto.QueryResponse result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.QueryResponse) { @@ -649,7 +620,7 @@ public Builder mergeFrom(io.pinecone.proto.QueryResponse other) { results_ = other.results_; bitField0_ = (bitField0_ & ~0x00000001); resultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getResultsFieldBuilder() : null; } else { resultsBuilder_.addAllMessages(other.results_); @@ -675,7 +646,7 @@ public Builder mergeFrom(io.pinecone.proto.QueryResponse other) { matches_ = other.matches_; bitField0_ = (bitField0_ & ~0x00000002); matchesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getMatchesFieldBuilder() : null; } else { matchesBuilder_.addAllMessages(other.matches_); @@ -780,7 +751,7 @@ private void ensureResultsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< io.pinecone.proto.SingleQueryResults, io.pinecone.proto.SingleQueryResults.Builder, io.pinecone.proto.SingleQueryResultsOrBuilder> resultsBuilder_; /** @@ -788,7 +759,7 @@ private void ensureResultsIsMutable() { * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated public java.util.List getResultsList() { if (resultsBuilder_ == null) { @@ -802,7 +773,7 @@ private void ensureResultsIsMutable() { * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated public int getResultsCount() { if (resultsBuilder_ == null) { @@ -816,7 +787,7 @@ private void ensureResultsIsMutable() { * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated public io.pinecone.proto.SingleQueryResults getResults(int index) { if (resultsBuilder_ == null) { @@ -830,7 +801,7 @@ private void ensureResultsIsMutable() { * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated public Builder setResults( int index, io.pinecone.proto.SingleQueryResults value) { @@ -851,7 +822,7 @@ private void ensureResultsIsMutable() { * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated public Builder setResults( int index, io.pinecone.proto.SingleQueryResults.Builder builderForValue) { @@ -869,7 +840,7 @@ private void ensureResultsIsMutable() { * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated public Builder addResults(io.pinecone.proto.SingleQueryResults value) { if (resultsBuilder_ == null) { @@ -889,7 +860,7 @@ private void ensureResultsIsMutable() { * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated public Builder addResults( int index, io.pinecone.proto.SingleQueryResults value) { @@ -910,7 +881,7 @@ private void ensureResultsIsMutable() { * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated public Builder addResults( io.pinecone.proto.SingleQueryResults.Builder builderForValue) { @@ -928,7 +899,7 @@ private void ensureResultsIsMutable() { * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated public Builder addResults( int index, io.pinecone.proto.SingleQueryResults.Builder builderForValue) { @@ -946,7 +917,7 @@ private void ensureResultsIsMutable() { * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated public Builder addAllResults( java.lang.Iterable values) { @@ -965,7 +936,7 @@ private void ensureResultsIsMutable() { * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated public Builder clearResults() { if (resultsBuilder_ == null) { @@ -982,7 +953,7 @@ private void ensureResultsIsMutable() { * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated public Builder removeResults(int index) { if (resultsBuilder_ == null) { @@ -999,7 +970,7 @@ private void ensureResultsIsMutable() { * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated public io.pinecone.proto.SingleQueryResults.Builder getResultsBuilder( int index) { @@ -1010,7 +981,7 @@ private void ensureResultsIsMutable() { * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated public io.pinecone.proto.SingleQueryResultsOrBuilder getResultsOrBuilder( int index) { @@ -1024,7 +995,7 @@ private void ensureResultsIsMutable() { * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated public java.util.List getResultsOrBuilderList() { @@ -1039,7 +1010,7 @@ private void ensureResultsIsMutable() { * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated public io.pinecone.proto.SingleQueryResults.Builder addResultsBuilder() { return getResultsFieldBuilder().addBuilder( @@ -1050,7 +1021,7 @@ private void ensureResultsIsMutable() { * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated public io.pinecone.proto.SingleQueryResults.Builder addResultsBuilder( int index) { @@ -1062,17 +1033,17 @@ private void ensureResultsIsMutable() { * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated public java.util.List getResultsBuilderList() { return getResultsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< io.pinecone.proto.SingleQueryResults, io.pinecone.proto.SingleQueryResults.Builder, io.pinecone.proto.SingleQueryResultsOrBuilder> getResultsFieldBuilder() { if (resultsBuilder_ == null) { - resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< io.pinecone.proto.SingleQueryResults, io.pinecone.proto.SingleQueryResults.Builder, io.pinecone.proto.SingleQueryResultsOrBuilder>( results_, ((bitField0_ & 0x00000001) != 0), @@ -1092,7 +1063,7 @@ private void ensureMatchesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< io.pinecone.proto.ScoredVector, io.pinecone.proto.ScoredVector.Builder, io.pinecone.proto.ScoredVectorOrBuilder> matchesBuilder_; /** @@ -1100,7 +1071,7 @@ private void ensureMatchesIsMutable() { * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ public java.util.List getMatchesList() { if (matchesBuilder_ == null) { @@ -1114,7 +1085,7 @@ public java.util.List getMatchesList() { * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ public int getMatchesCount() { if (matchesBuilder_ == null) { @@ -1128,7 +1099,7 @@ public int getMatchesCount() { * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ public io.pinecone.proto.ScoredVector getMatches(int index) { if (matchesBuilder_ == null) { @@ -1142,7 +1113,7 @@ public io.pinecone.proto.ScoredVector getMatches(int index) { * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ public Builder setMatches( int index, io.pinecone.proto.ScoredVector value) { @@ -1163,7 +1134,7 @@ public Builder setMatches( * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ public Builder setMatches( int index, io.pinecone.proto.ScoredVector.Builder builderForValue) { @@ -1181,7 +1152,7 @@ public Builder setMatches( * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ public Builder addMatches(io.pinecone.proto.ScoredVector value) { if (matchesBuilder_ == null) { @@ -1201,7 +1172,7 @@ public Builder addMatches(io.pinecone.proto.ScoredVector value) { * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ public Builder addMatches( int index, io.pinecone.proto.ScoredVector value) { @@ -1222,7 +1193,7 @@ public Builder addMatches( * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ public Builder addMatches( io.pinecone.proto.ScoredVector.Builder builderForValue) { @@ -1240,7 +1211,7 @@ public Builder addMatches( * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ public Builder addMatches( int index, io.pinecone.proto.ScoredVector.Builder builderForValue) { @@ -1258,7 +1229,7 @@ public Builder addMatches( * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ public Builder addAllMatches( java.lang.Iterable values) { @@ -1277,7 +1248,7 @@ public Builder addAllMatches( * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ public Builder clearMatches() { if (matchesBuilder_ == null) { @@ -1294,7 +1265,7 @@ public Builder clearMatches() { * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ public Builder removeMatches(int index) { if (matchesBuilder_ == null) { @@ -1311,7 +1282,7 @@ public Builder removeMatches(int index) { * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ public io.pinecone.proto.ScoredVector.Builder getMatchesBuilder( int index) { @@ -1322,7 +1293,7 @@ public io.pinecone.proto.ScoredVector.Builder getMatchesBuilder( * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ public io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder( int index) { @@ -1336,7 +1307,7 @@ public io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder( * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ public java.util.List getMatchesOrBuilderList() { @@ -1351,7 +1322,7 @@ public io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder( * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ public io.pinecone.proto.ScoredVector.Builder addMatchesBuilder() { return getMatchesFieldBuilder().addBuilder( @@ -1362,7 +1333,7 @@ public io.pinecone.proto.ScoredVector.Builder addMatchesBuilder() { * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ public io.pinecone.proto.ScoredVector.Builder addMatchesBuilder( int index) { @@ -1374,17 +1345,17 @@ public io.pinecone.proto.ScoredVector.Builder addMatchesBuilder( * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ public java.util.List getMatchesBuilderList() { return getMatchesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< io.pinecone.proto.ScoredVector, io.pinecone.proto.ScoredVector.Builder, io.pinecone.proto.ScoredVectorOrBuilder> getMatchesFieldBuilder() { if (matchesBuilder_ == null) { - matchesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + matchesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< io.pinecone.proto.ScoredVector, io.pinecone.proto.ScoredVector.Builder, io.pinecone.proto.ScoredVectorOrBuilder>( matches_, ((bitField0_ & 0x00000002) != 0), @@ -1401,7 +1372,7 @@ public io.pinecone.proto.ScoredVector.Builder addMatchesBuilder( * The namespace for the vectors. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The namespace. */ public java.lang.String getNamespace() { @@ -1421,7 +1392,7 @@ public java.lang.String getNamespace() { * The namespace for the vectors. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The bytes for namespace. */ public com.google.protobuf.ByteString @@ -1442,7 +1413,7 @@ public java.lang.String getNamespace() { * The namespace for the vectors. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @param value The namespace to set. * @return This builder for chaining. */ @@ -1459,7 +1430,7 @@ public Builder setNamespace( * The namespace for the vectors. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return This builder for chaining. */ public Builder clearNamespace() { @@ -1473,7 +1444,7 @@ public Builder clearNamespace() { * The namespace for the vectors. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @param value The bytes for namespace to set. * @return This builder for chaining. */ @@ -1488,14 +1459,14 @@ public Builder setNamespaceBytes( } private io.pinecone.proto.Usage usage_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.Usage, io.pinecone.proto.Usage.Builder, io.pinecone.proto.UsageOrBuilder> usageBuilder_; /** *
      * The usage for this operation.
      * 
* - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; * @return Whether the usage field is set. */ public boolean hasUsage() { @@ -1506,7 +1477,7 @@ public boolean hasUsage() { * The usage for this operation. * * - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; * @return The usage. */ public io.pinecone.proto.Usage getUsage() { @@ -1521,7 +1492,7 @@ public io.pinecone.proto.Usage getUsage() { * The usage for this operation. * * - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; */ public Builder setUsage(io.pinecone.proto.Usage value) { if (usageBuilder_ == null) { @@ -1541,7 +1512,7 @@ public Builder setUsage(io.pinecone.proto.Usage value) { * The usage for this operation. * * - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; */ public Builder setUsage( io.pinecone.proto.Usage.Builder builderForValue) { @@ -1559,7 +1530,7 @@ public Builder setUsage( * The usage for this operation. * * - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; */ public Builder mergeUsage(io.pinecone.proto.Usage value) { if (usageBuilder_ == null) { @@ -1584,7 +1555,7 @@ public Builder mergeUsage(io.pinecone.proto.Usage value) { * The usage for this operation. * * - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; */ public Builder clearUsage() { bitField0_ = (bitField0_ & ~0x00000008); @@ -1601,7 +1572,7 @@ public Builder clearUsage() { * The usage for this operation. * * - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; */ public io.pinecone.proto.Usage.Builder getUsageBuilder() { bitField0_ |= 0x00000008; @@ -1613,7 +1584,7 @@ public io.pinecone.proto.Usage.Builder getUsageBuilder() { * The usage for this operation. * * - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; */ public io.pinecone.proto.UsageOrBuilder getUsageOrBuilder() { if (usageBuilder_ != null) { @@ -1628,13 +1599,13 @@ public io.pinecone.proto.UsageOrBuilder getUsageOrBuilder() { * The usage for this operation. * * - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.Usage, io.pinecone.proto.Usage.Builder, io.pinecone.proto.UsageOrBuilder> getUsageFieldBuilder() { if (usageBuilder_ == null) { - usageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + usageBuilder_ = new com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.Usage, io.pinecone.proto.Usage.Builder, io.pinecone.proto.UsageOrBuilder>( getUsage(), getParentForChildren(), @@ -1643,18 +1614,6 @@ public io.pinecone.proto.UsageOrBuilder getUsageOrBuilder() { } return usageBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:QueryResponse) } diff --git a/src/main/java/io/pinecone/proto/QueryResponseOrBuilder.java b/src/main/java/io/pinecone/proto/QueryResponseOrBuilder.java index 87598b7f..e788ff68 100644 --- a/src/main/java/io/pinecone/proto/QueryResponseOrBuilder.java +++ b/src/main/java/io/pinecone/proto/QueryResponseOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface QueryResponseOrBuilder extends @@ -13,7 +14,7 @@ public interface QueryResponseOrBuilder extends * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated java.util.List getResultsList(); @@ -22,7 +23,7 @@ public interface QueryResponseOrBuilder extends * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated io.pinecone.proto.SingleQueryResults getResults(int index); /** @@ -30,7 +31,7 @@ public interface QueryResponseOrBuilder extends * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated int getResultsCount(); /** @@ -38,7 +39,7 @@ public interface QueryResponseOrBuilder extends * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated java.util.List getResultsOrBuilderList(); @@ -47,7 +48,7 @@ public interface QueryResponseOrBuilder extends * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * * - * repeated .SingleQueryResults results = 1 [deprecated = true]; + * repeated .SingleQueryResults results = 1 [json_name = "results", deprecated = true]; */ @java.lang.Deprecated io.pinecone.proto.SingleQueryResultsOrBuilder getResultsOrBuilder( int index); @@ -57,7 +58,7 @@ public interface QueryResponseOrBuilder extends * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ java.util.List getMatchesList(); @@ -66,7 +67,7 @@ public interface QueryResponseOrBuilder extends * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ io.pinecone.proto.ScoredVector getMatches(int index); /** @@ -74,7 +75,7 @@ public interface QueryResponseOrBuilder extends * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ int getMatchesCount(); /** @@ -82,7 +83,7 @@ public interface QueryResponseOrBuilder extends * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ java.util.List getMatchesOrBuilderList(); @@ -91,7 +92,7 @@ public interface QueryResponseOrBuilder extends * The matches for the vectors. * * - * repeated .ScoredVector matches = 2; + * repeated .ScoredVector matches = 2 [json_name = "matches"]; */ io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder( int index); @@ -101,7 +102,7 @@ io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder( * The namespace for the vectors. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The namespace. */ java.lang.String getNamespace(); @@ -110,7 +111,7 @@ io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder( * The namespace for the vectors. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The bytes for namespace. */ com.google.protobuf.ByteString @@ -121,7 +122,7 @@ io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder( * The usage for this operation. * * - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; * @return Whether the usage field is set. */ boolean hasUsage(); @@ -130,7 +131,7 @@ io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder( * The usage for this operation. * * - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; * @return The usage. */ io.pinecone.proto.Usage getUsage(); @@ -139,7 +140,7 @@ io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder( * The usage for this operation. * * - * optional .Usage usage = 4; + * optional .Usage usage = 4 [json_name = "usage"]; */ io.pinecone.proto.UsageOrBuilder getUsageOrBuilder(); } diff --git a/src/main/java/io/pinecone/proto/QueryVector.java b/src/main/java/io/pinecone/proto/QueryVector.java index 1a20a394..d10060f9 100644 --- a/src/main/java/io/pinecone/proto/QueryVector.java +++ b/src/main/java/io/pinecone/proto/QueryVector.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** @@ -12,12 +13,21 @@ * Protobuf type {@code QueryVector} */ public final class QueryVector extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:QueryVector) QueryVectorOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + QueryVector.class.getName()); + } // Use QueryVector.newBuilder() to construct. - private QueryVector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private QueryVector(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private QueryVector() { @@ -25,22 +35,15 @@ private QueryVector() { namespace_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new QueryVector(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryVector_descriptor; + return io.pinecone.proto.DbData202501.internal_static_QueryVector_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryVector_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_QueryVector_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.QueryVector.class, io.pinecone.proto.QueryVector.Builder.class); } @@ -52,10 +55,10 @@ protected java.lang.Object newInstance( emptyFloatList(); /** *
-   * The query vector values. This should be the same length as the dimension of the index being queried.
+   * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
    * 
* - * repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 1 [json_name = "values"]; * @return A list containing the values. */ @java.lang.Override @@ -65,10 +68,10 @@ protected java.lang.Object newInstance( } /** *
-   * The query vector values. This should be the same length as the dimension of the index being queried.
+   * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
    * 
* - * repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 1 [json_name = "values"]; * @return The count of values. */ public int getValuesCount() { @@ -76,10 +79,10 @@ public int getValuesCount() { } /** *
-   * The query vector values. This should be the same length as the dimension of the index being queried.
+   * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
    * 
* - * repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 1 [json_name = "values"]; * @param index The index of the element to return. * @return The values at the given index. */ @@ -95,7 +98,7 @@ public float getValues(int index) { * The query sparse values. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; * @return Whether the sparseValues field is set. */ @java.lang.Override @@ -107,7 +110,7 @@ public boolean hasSparseValues() { * The query sparse values. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; * @return The sparseValues. */ @java.lang.Override @@ -119,7 +122,7 @@ public io.pinecone.proto.SparseValues getSparseValues() { * The query sparse values. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ @java.lang.Override public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { @@ -133,7 +136,7 @@ public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { * An override for the number of results to return for this query vector. * * - * uint32 top_k = 2; + * uint32 top_k = 2 [json_name = "topK"]; * @return The topK. */ @java.lang.Override @@ -149,7 +152,7 @@ public int getTopK() { * An override the namespace to search. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The namespace. */ @java.lang.Override @@ -170,7 +173,7 @@ public java.lang.String getNamespace() { * An override the namespace to search. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The bytes for namespace. */ @java.lang.Override @@ -195,7 +198,7 @@ public java.lang.String getNamespace() { * An override for the metadata filter to apply. This replaces the request-level filter. * * - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; * @return Whether the filter field is set. */ @java.lang.Override @@ -207,7 +210,7 @@ public boolean hasFilter() { * An override for the metadata filter to apply. This replaces the request-level filter. * * - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; * @return The filter. */ @java.lang.Override @@ -219,7 +222,7 @@ public com.google.protobuf.Struct getFilter() { * An override for the metadata filter to apply. This replaces the request-level filter. * * - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; */ @java.lang.Override public com.google.protobuf.StructOrBuilder getFilterOrBuilder() { @@ -251,8 +254,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (topK_ != 0) { output.writeUInt32(2, topK_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, namespace_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(4, getFilter()); @@ -284,8 +287,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, topK_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, namespace_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -392,20 +395,20 @@ public static io.pinecone.proto.QueryVector parseFrom( } public static io.pinecone.proto.QueryVector parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.QueryVector parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.QueryVector parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -413,20 +416,20 @@ public static io.pinecone.proto.QueryVector parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.QueryVector parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.QueryVector parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -446,7 +449,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -458,18 +461,18 @@ protected Builder newBuilderForType( * Protobuf type {@code QueryVector} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:QueryVector) io.pinecone.proto.QueryVectorOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryVector_descriptor; + return io.pinecone.proto.DbData202501.internal_static_QueryVector_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryVector_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_QueryVector_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.QueryVector.class, io.pinecone.proto.QueryVector.Builder.class); } @@ -480,12 +483,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getSparseValuesFieldBuilder(); getFilterFieldBuilder(); @@ -514,7 +517,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryVector_descriptor; + return io.pinecone.proto.DbData202501.internal_static_QueryVector_descriptor; } @java.lang.Override @@ -567,38 +570,6 @@ private void buildPartial0(io.pinecone.proto.QueryVector result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.QueryVector) { @@ -735,10 +706,10 @@ private void ensureValuesIsMutable(int capacity) { } /** *
-     * The query vector values. This should be the same length as the dimension of the index being queried.
+     * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
      * 
* - * repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 1 [json_name = "values"]; * @return A list containing the values. */ public java.util.List @@ -748,10 +719,10 @@ private void ensureValuesIsMutable(int capacity) { } /** *
-     * The query vector values. This should be the same length as the dimension of the index being queried.
+     * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
      * 
* - * repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 1 [json_name = "values"]; * @return The count of values. */ public int getValuesCount() { @@ -759,10 +730,10 @@ public int getValuesCount() { } /** *
-     * The query vector values. This should be the same length as the dimension of the index being queried.
+     * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
      * 
* - * repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 1 [json_name = "values"]; * @param index The index of the element to return. * @return The values at the given index. */ @@ -771,10 +742,10 @@ public float getValues(int index) { } /** *
-     * The query vector values. This should be the same length as the dimension of the index being queried.
+     * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
      * 
* - * repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 1 [json_name = "values"]; * @param index The index to set the value at. * @param value The values to set. * @return This builder for chaining. @@ -790,10 +761,10 @@ public Builder setValues( } /** *
-     * The query vector values. This should be the same length as the dimension of the index being queried.
+     * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
      * 
* - * repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 1 [json_name = "values"]; * @param value The values to add. * @return This builder for chaining. */ @@ -807,10 +778,10 @@ public Builder addValues(float value) { } /** *
-     * The query vector values. This should be the same length as the dimension of the index being queried.
+     * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
      * 
* - * repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 1 [json_name = "values"]; * @param values The values to add. * @return This builder for chaining. */ @@ -825,10 +796,10 @@ public Builder addAllValues( } /** *
-     * The query vector values. This should be the same length as the dimension of the index being queried.
+     * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
      * 
* - * repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 1 [json_name = "values"]; * @return This builder for chaining. */ public Builder clearValues() { @@ -839,14 +810,14 @@ public Builder clearValues() { } private io.pinecone.proto.SparseValues sparseValues_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder> sparseValuesBuilder_; /** *
      * The query sparse values.
      * 
* - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; * @return Whether the sparseValues field is set. */ public boolean hasSparseValues() { @@ -857,7 +828,7 @@ public boolean hasSparseValues() { * The query sparse values. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; * @return The sparseValues. */ public io.pinecone.proto.SparseValues getSparseValues() { @@ -872,7 +843,7 @@ public io.pinecone.proto.SparseValues getSparseValues() { * The query sparse values. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ public Builder setSparseValues(io.pinecone.proto.SparseValues value) { if (sparseValuesBuilder_ == null) { @@ -892,7 +863,7 @@ public Builder setSparseValues(io.pinecone.proto.SparseValues value) { * The query sparse values. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ public Builder setSparseValues( io.pinecone.proto.SparseValues.Builder builderForValue) { @@ -910,7 +881,7 @@ public Builder setSparseValues( * The query sparse values. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ public Builder mergeSparseValues(io.pinecone.proto.SparseValues value) { if (sparseValuesBuilder_ == null) { @@ -935,7 +906,7 @@ public Builder mergeSparseValues(io.pinecone.proto.SparseValues value) { * The query sparse values. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ public Builder clearSparseValues() { bitField0_ = (bitField0_ & ~0x00000002); @@ -952,7 +923,7 @@ public Builder clearSparseValues() { * The query sparse values. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ public io.pinecone.proto.SparseValues.Builder getSparseValuesBuilder() { bitField0_ |= 0x00000002; @@ -964,7 +935,7 @@ public io.pinecone.proto.SparseValues.Builder getSparseValuesBuilder() { * The query sparse values. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { if (sparseValuesBuilder_ != null) { @@ -979,13 +950,13 @@ public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { * The query sparse values. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder> getSparseValuesFieldBuilder() { if (sparseValuesBuilder_ == null) { - sparseValuesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + sparseValuesBuilder_ = new com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder>( getSparseValues(), getParentForChildren(), @@ -1001,7 +972,7 @@ public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { * An override for the number of results to return for this query vector. * * - * uint32 top_k = 2; + * uint32 top_k = 2 [json_name = "topK"]; * @return The topK. */ @java.lang.Override @@ -1013,7 +984,7 @@ public int getTopK() { * An override for the number of results to return for this query vector. * * - * uint32 top_k = 2; + * uint32 top_k = 2 [json_name = "topK"]; * @param value The topK to set. * @return This builder for chaining. */ @@ -1029,7 +1000,7 @@ public Builder setTopK(int value) { * An override for the number of results to return for this query vector. * * - * uint32 top_k = 2; + * uint32 top_k = 2 [json_name = "topK"]; * @return This builder for chaining. */ public Builder clearTopK() { @@ -1045,7 +1016,7 @@ public Builder clearTopK() { * An override the namespace to search. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The namespace. */ public java.lang.String getNamespace() { @@ -1065,7 +1036,7 @@ public java.lang.String getNamespace() { * An override the namespace to search. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The bytes for namespace. */ public com.google.protobuf.ByteString @@ -1086,7 +1057,7 @@ public java.lang.String getNamespace() { * An override the namespace to search. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @param value The namespace to set. * @return This builder for chaining. */ @@ -1103,7 +1074,7 @@ public Builder setNamespace( * An override the namespace to search. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return This builder for chaining. */ public Builder clearNamespace() { @@ -1117,7 +1088,7 @@ public Builder clearNamespace() { * An override the namespace to search. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @param value The bytes for namespace to set. * @return This builder for chaining. */ @@ -1132,14 +1103,14 @@ public Builder setNamespaceBytes( } private com.google.protobuf.Struct filter_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> filterBuilder_; /** *
      * An override for the metadata filter to apply. This replaces the request-level filter.
      * 
* - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; * @return Whether the filter field is set. */ public boolean hasFilter() { @@ -1150,7 +1121,7 @@ public boolean hasFilter() { * An override for the metadata filter to apply. This replaces the request-level filter. * * - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; * @return The filter. */ public com.google.protobuf.Struct getFilter() { @@ -1165,7 +1136,7 @@ public com.google.protobuf.Struct getFilter() { * An override for the metadata filter to apply. This replaces the request-level filter. * * - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; */ public Builder setFilter(com.google.protobuf.Struct value) { if (filterBuilder_ == null) { @@ -1185,7 +1156,7 @@ public Builder setFilter(com.google.protobuf.Struct value) { * An override for the metadata filter to apply. This replaces the request-level filter. * * - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; */ public Builder setFilter( com.google.protobuf.Struct.Builder builderForValue) { @@ -1203,7 +1174,7 @@ public Builder setFilter( * An override for the metadata filter to apply. This replaces the request-level filter. * * - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; */ public Builder mergeFilter(com.google.protobuf.Struct value) { if (filterBuilder_ == null) { @@ -1228,7 +1199,7 @@ public Builder mergeFilter(com.google.protobuf.Struct value) { * An override for the metadata filter to apply. This replaces the request-level filter. * * - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; */ public Builder clearFilter() { bitField0_ = (bitField0_ & ~0x00000010); @@ -1245,7 +1216,7 @@ public Builder clearFilter() { * An override for the metadata filter to apply. This replaces the request-level filter. * * - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; */ public com.google.protobuf.Struct.Builder getFilterBuilder() { bitField0_ |= 0x00000010; @@ -1257,7 +1228,7 @@ public com.google.protobuf.Struct.Builder getFilterBuilder() { * An override for the metadata filter to apply. This replaces the request-level filter. * * - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; */ public com.google.protobuf.StructOrBuilder getFilterOrBuilder() { if (filterBuilder_ != null) { @@ -1272,13 +1243,13 @@ public com.google.protobuf.StructOrBuilder getFilterOrBuilder() { * An override for the metadata filter to apply. This replaces the request-level filter. * * - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> getFilterFieldBuilder() { if (filterBuilder_ == null) { - filterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + filterBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( getFilter(), getParentForChildren(), @@ -1287,18 +1258,6 @@ public com.google.protobuf.StructOrBuilder getFilterOrBuilder() { } return filterBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:QueryVector) } diff --git a/src/main/java/io/pinecone/proto/QueryVectorOrBuilder.java b/src/main/java/io/pinecone/proto/QueryVectorOrBuilder.java index 68830d96..0f521850 100644 --- a/src/main/java/io/pinecone/proto/QueryVectorOrBuilder.java +++ b/src/main/java/io/pinecone/proto/QueryVectorOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface QueryVectorOrBuilder extends @@ -10,28 +11,28 @@ public interface QueryVectorOrBuilder extends /** *
-   * The query vector values. This should be the same length as the dimension of the index being queried.
+   * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
    * 
* - * repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 1 [json_name = "values"]; * @return A list containing the values. */ java.util.List getValuesList(); /** *
-   * The query vector values. This should be the same length as the dimension of the index being queried.
+   * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
    * 
* - * repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 1 [json_name = "values"]; * @return The count of values. */ int getValuesCount(); /** *
-   * The query vector values. This should be the same length as the dimension of the index being queried.
+   * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
    * 
* - * repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 1 [json_name = "values"]; * @param index The index of the element to return. * @return The values at the given index. */ @@ -42,7 +43,7 @@ public interface QueryVectorOrBuilder extends * The query sparse values. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; * @return Whether the sparseValues field is set. */ boolean hasSparseValues(); @@ -51,7 +52,7 @@ public interface QueryVectorOrBuilder extends * The query sparse values. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; * @return The sparseValues. */ io.pinecone.proto.SparseValues getSparseValues(); @@ -60,7 +61,7 @@ public interface QueryVectorOrBuilder extends * The query sparse values. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder(); @@ -69,7 +70,7 @@ public interface QueryVectorOrBuilder extends * An override for the number of results to return for this query vector. * * - * uint32 top_k = 2; + * uint32 top_k = 2 [json_name = "topK"]; * @return The topK. */ int getTopK(); @@ -79,7 +80,7 @@ public interface QueryVectorOrBuilder extends * An override the namespace to search. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The namespace. */ java.lang.String getNamespace(); @@ -88,7 +89,7 @@ public interface QueryVectorOrBuilder extends * An override the namespace to search. * * - * string namespace = 3; + * string namespace = 3 [json_name = "namespace"]; * @return The bytes for namespace. */ com.google.protobuf.ByteString @@ -99,7 +100,7 @@ public interface QueryVectorOrBuilder extends * An override for the metadata filter to apply. This replaces the request-level filter. * * - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; * @return Whether the filter field is set. */ boolean hasFilter(); @@ -108,7 +109,7 @@ public interface QueryVectorOrBuilder extends * An override for the metadata filter to apply. This replaces the request-level filter. * * - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; * @return The filter. */ com.google.protobuf.Struct getFilter(); @@ -117,7 +118,7 @@ public interface QueryVectorOrBuilder extends * An override for the metadata filter to apply. This replaces the request-level filter. * * - * .google.protobuf.Struct filter = 4; + * .google.protobuf.Struct filter = 4 [json_name = "filter"]; */ com.google.protobuf.StructOrBuilder getFilterOrBuilder(); } diff --git a/src/main/java/io/pinecone/proto/RequestUnion.java b/src/main/java/io/pinecone/proto/RequestUnion.java index 15eeb780..6b16be33 100644 --- a/src/main/java/io/pinecone/proto/RequestUnion.java +++ b/src/main/java/io/pinecone/proto/RequestUnion.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** @@ -13,33 +14,35 @@ * Protobuf type {@code RequestUnion} */ public final class RequestUnion extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:RequestUnion) RequestUnionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + RequestUnion.class.getName()); + } // Use RequestUnion.newBuilder() to construct. - private RequestUnion(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private RequestUnion(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private RequestUnion() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RequestUnion(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_RequestUnion_descriptor; + return io.pinecone.proto.DbData202501.internal_static_RequestUnion_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_RequestUnion_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_RequestUnion_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.RequestUnion.class, io.pinecone.proto.RequestUnion.Builder.class); } @@ -90,7 +93,7 @@ public int getNumber() { public static final int UPSERT_FIELD_NUMBER = 1; /** - * .UpsertRequest upsert = 1; + * .UpsertRequest upsert = 1 [json_name = "upsert"]; * @return Whether the upsert field is set. */ @java.lang.Override @@ -98,7 +101,7 @@ public boolean hasUpsert() { return requestUnionInnerCase_ == 1; } /** - * .UpsertRequest upsert = 1; + * .UpsertRequest upsert = 1 [json_name = "upsert"]; * @return The upsert. */ @java.lang.Override @@ -109,7 +112,7 @@ public io.pinecone.proto.UpsertRequest getUpsert() { return io.pinecone.proto.UpsertRequest.getDefaultInstance(); } /** - * .UpsertRequest upsert = 1; + * .UpsertRequest upsert = 1 [json_name = "upsert"]; */ @java.lang.Override public io.pinecone.proto.UpsertRequestOrBuilder getUpsertOrBuilder() { @@ -121,7 +124,7 @@ public io.pinecone.proto.UpsertRequestOrBuilder getUpsertOrBuilder() { public static final int DELETE_FIELD_NUMBER = 2; /** - * .DeleteRequest delete = 2; + * .DeleteRequest delete = 2 [json_name = "delete"]; * @return Whether the delete field is set. */ @java.lang.Override @@ -129,7 +132,7 @@ public boolean hasDelete() { return requestUnionInnerCase_ == 2; } /** - * .DeleteRequest delete = 2; + * .DeleteRequest delete = 2 [json_name = "delete"]; * @return The delete. */ @java.lang.Override @@ -140,7 +143,7 @@ public io.pinecone.proto.DeleteRequest getDelete() { return io.pinecone.proto.DeleteRequest.getDefaultInstance(); } /** - * .DeleteRequest delete = 2; + * .DeleteRequest delete = 2 [json_name = "delete"]; */ @java.lang.Override public io.pinecone.proto.DeleteRequestOrBuilder getDeleteOrBuilder() { @@ -152,7 +155,7 @@ public io.pinecone.proto.DeleteRequestOrBuilder getDeleteOrBuilder() { public static final int UPDATE_FIELD_NUMBER = 3; /** - * .UpdateRequest update = 3; + * .UpdateRequest update = 3 [json_name = "update"]; * @return Whether the update field is set. */ @java.lang.Override @@ -160,7 +163,7 @@ public boolean hasUpdate() { return requestUnionInnerCase_ == 3; } /** - * .UpdateRequest update = 3; + * .UpdateRequest update = 3 [json_name = "update"]; * @return The update. */ @java.lang.Override @@ -171,7 +174,7 @@ public io.pinecone.proto.UpdateRequest getUpdate() { return io.pinecone.proto.UpdateRequest.getDefaultInstance(); } /** - * .UpdateRequest update = 3; + * .UpdateRequest update = 3 [json_name = "update"]; */ @java.lang.Override public io.pinecone.proto.UpdateRequestOrBuilder getUpdateOrBuilder() { @@ -323,20 +326,20 @@ public static io.pinecone.proto.RequestUnion parseFrom( } public static io.pinecone.proto.RequestUnion parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.RequestUnion parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.RequestUnion parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -344,20 +347,20 @@ public static io.pinecone.proto.RequestUnion parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.RequestUnion parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.RequestUnion parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -377,7 +380,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -390,18 +393,18 @@ protected Builder newBuilderForType( * Protobuf type {@code RequestUnion} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:RequestUnion) io.pinecone.proto.RequestUnionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_RequestUnion_descriptor; + return io.pinecone.proto.DbData202501.internal_static_RequestUnion_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_RequestUnion_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_RequestUnion_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.RequestUnion.class, io.pinecone.proto.RequestUnion.Builder.class); } @@ -412,7 +415,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -437,7 +440,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_RequestUnion_descriptor; + return io.pinecone.proto.DbData202501.internal_static_RequestUnion_descriptor; } @java.lang.Override @@ -484,38 +487,6 @@ private void buildPartialOneofs(io.pinecone.proto.RequestUnion result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.RequestUnion) { @@ -624,10 +595,10 @@ public Builder clearRequestUnionInner() { private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.UpsertRequest, io.pinecone.proto.UpsertRequest.Builder, io.pinecone.proto.UpsertRequestOrBuilder> upsertBuilder_; /** - * .UpsertRequest upsert = 1; + * .UpsertRequest upsert = 1 [json_name = "upsert"]; * @return Whether the upsert field is set. */ @java.lang.Override @@ -635,7 +606,7 @@ public boolean hasUpsert() { return requestUnionInnerCase_ == 1; } /** - * .UpsertRequest upsert = 1; + * .UpsertRequest upsert = 1 [json_name = "upsert"]; * @return The upsert. */ @java.lang.Override @@ -653,7 +624,7 @@ public io.pinecone.proto.UpsertRequest getUpsert() { } } /** - * .UpsertRequest upsert = 1; + * .UpsertRequest upsert = 1 [json_name = "upsert"]; */ public Builder setUpsert(io.pinecone.proto.UpsertRequest value) { if (upsertBuilder_ == null) { @@ -669,7 +640,7 @@ public Builder setUpsert(io.pinecone.proto.UpsertRequest value) { return this; } /** - * .UpsertRequest upsert = 1; + * .UpsertRequest upsert = 1 [json_name = "upsert"]; */ public Builder setUpsert( io.pinecone.proto.UpsertRequest.Builder builderForValue) { @@ -683,7 +654,7 @@ public Builder setUpsert( return this; } /** - * .UpsertRequest upsert = 1; + * .UpsertRequest upsert = 1 [json_name = "upsert"]; */ public Builder mergeUpsert(io.pinecone.proto.UpsertRequest value) { if (upsertBuilder_ == null) { @@ -706,7 +677,7 @@ public Builder mergeUpsert(io.pinecone.proto.UpsertRequest value) { return this; } /** - * .UpsertRequest upsert = 1; + * .UpsertRequest upsert = 1 [json_name = "upsert"]; */ public Builder clearUpsert() { if (upsertBuilder_ == null) { @@ -725,13 +696,13 @@ public Builder clearUpsert() { return this; } /** - * .UpsertRequest upsert = 1; + * .UpsertRequest upsert = 1 [json_name = "upsert"]; */ public io.pinecone.proto.UpsertRequest.Builder getUpsertBuilder() { return getUpsertFieldBuilder().getBuilder(); } /** - * .UpsertRequest upsert = 1; + * .UpsertRequest upsert = 1 [json_name = "upsert"]; */ @java.lang.Override public io.pinecone.proto.UpsertRequestOrBuilder getUpsertOrBuilder() { @@ -745,16 +716,16 @@ public io.pinecone.proto.UpsertRequestOrBuilder getUpsertOrBuilder() { } } /** - * .UpsertRequest upsert = 1; + * .UpsertRequest upsert = 1 [json_name = "upsert"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.UpsertRequest, io.pinecone.proto.UpsertRequest.Builder, io.pinecone.proto.UpsertRequestOrBuilder> getUpsertFieldBuilder() { if (upsertBuilder_ == null) { if (!(requestUnionInnerCase_ == 1)) { requestUnionInner_ = io.pinecone.proto.UpsertRequest.getDefaultInstance(); } - upsertBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + upsertBuilder_ = new com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.UpsertRequest, io.pinecone.proto.UpsertRequest.Builder, io.pinecone.proto.UpsertRequestOrBuilder>( (io.pinecone.proto.UpsertRequest) requestUnionInner_, getParentForChildren(), @@ -766,10 +737,10 @@ public io.pinecone.proto.UpsertRequestOrBuilder getUpsertOrBuilder() { return upsertBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.DeleteRequest, io.pinecone.proto.DeleteRequest.Builder, io.pinecone.proto.DeleteRequestOrBuilder> deleteBuilder_; /** - * .DeleteRequest delete = 2; + * .DeleteRequest delete = 2 [json_name = "delete"]; * @return Whether the delete field is set. */ @java.lang.Override @@ -777,7 +748,7 @@ public boolean hasDelete() { return requestUnionInnerCase_ == 2; } /** - * .DeleteRequest delete = 2; + * .DeleteRequest delete = 2 [json_name = "delete"]; * @return The delete. */ @java.lang.Override @@ -795,7 +766,7 @@ public io.pinecone.proto.DeleteRequest getDelete() { } } /** - * .DeleteRequest delete = 2; + * .DeleteRequest delete = 2 [json_name = "delete"]; */ public Builder setDelete(io.pinecone.proto.DeleteRequest value) { if (deleteBuilder_ == null) { @@ -811,7 +782,7 @@ public Builder setDelete(io.pinecone.proto.DeleteRequest value) { return this; } /** - * .DeleteRequest delete = 2; + * .DeleteRequest delete = 2 [json_name = "delete"]; */ public Builder setDelete( io.pinecone.proto.DeleteRequest.Builder builderForValue) { @@ -825,7 +796,7 @@ public Builder setDelete( return this; } /** - * .DeleteRequest delete = 2; + * .DeleteRequest delete = 2 [json_name = "delete"]; */ public Builder mergeDelete(io.pinecone.proto.DeleteRequest value) { if (deleteBuilder_ == null) { @@ -848,7 +819,7 @@ public Builder mergeDelete(io.pinecone.proto.DeleteRequest value) { return this; } /** - * .DeleteRequest delete = 2; + * .DeleteRequest delete = 2 [json_name = "delete"]; */ public Builder clearDelete() { if (deleteBuilder_ == null) { @@ -867,13 +838,13 @@ public Builder clearDelete() { return this; } /** - * .DeleteRequest delete = 2; + * .DeleteRequest delete = 2 [json_name = "delete"]; */ public io.pinecone.proto.DeleteRequest.Builder getDeleteBuilder() { return getDeleteFieldBuilder().getBuilder(); } /** - * .DeleteRequest delete = 2; + * .DeleteRequest delete = 2 [json_name = "delete"]; */ @java.lang.Override public io.pinecone.proto.DeleteRequestOrBuilder getDeleteOrBuilder() { @@ -887,16 +858,16 @@ public io.pinecone.proto.DeleteRequestOrBuilder getDeleteOrBuilder() { } } /** - * .DeleteRequest delete = 2; + * .DeleteRequest delete = 2 [json_name = "delete"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.DeleteRequest, io.pinecone.proto.DeleteRequest.Builder, io.pinecone.proto.DeleteRequestOrBuilder> getDeleteFieldBuilder() { if (deleteBuilder_ == null) { if (!(requestUnionInnerCase_ == 2)) { requestUnionInner_ = io.pinecone.proto.DeleteRequest.getDefaultInstance(); } - deleteBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + deleteBuilder_ = new com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.DeleteRequest, io.pinecone.proto.DeleteRequest.Builder, io.pinecone.proto.DeleteRequestOrBuilder>( (io.pinecone.proto.DeleteRequest) requestUnionInner_, getParentForChildren(), @@ -908,10 +879,10 @@ public io.pinecone.proto.DeleteRequestOrBuilder getDeleteOrBuilder() { return deleteBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.UpdateRequest, io.pinecone.proto.UpdateRequest.Builder, io.pinecone.proto.UpdateRequestOrBuilder> updateBuilder_; /** - * .UpdateRequest update = 3; + * .UpdateRequest update = 3 [json_name = "update"]; * @return Whether the update field is set. */ @java.lang.Override @@ -919,7 +890,7 @@ public boolean hasUpdate() { return requestUnionInnerCase_ == 3; } /** - * .UpdateRequest update = 3; + * .UpdateRequest update = 3 [json_name = "update"]; * @return The update. */ @java.lang.Override @@ -937,7 +908,7 @@ public io.pinecone.proto.UpdateRequest getUpdate() { } } /** - * .UpdateRequest update = 3; + * .UpdateRequest update = 3 [json_name = "update"]; */ public Builder setUpdate(io.pinecone.proto.UpdateRequest value) { if (updateBuilder_ == null) { @@ -953,7 +924,7 @@ public Builder setUpdate(io.pinecone.proto.UpdateRequest value) { return this; } /** - * .UpdateRequest update = 3; + * .UpdateRequest update = 3 [json_name = "update"]; */ public Builder setUpdate( io.pinecone.proto.UpdateRequest.Builder builderForValue) { @@ -967,7 +938,7 @@ public Builder setUpdate( return this; } /** - * .UpdateRequest update = 3; + * .UpdateRequest update = 3 [json_name = "update"]; */ public Builder mergeUpdate(io.pinecone.proto.UpdateRequest value) { if (updateBuilder_ == null) { @@ -990,7 +961,7 @@ public Builder mergeUpdate(io.pinecone.proto.UpdateRequest value) { return this; } /** - * .UpdateRequest update = 3; + * .UpdateRequest update = 3 [json_name = "update"]; */ public Builder clearUpdate() { if (updateBuilder_ == null) { @@ -1009,13 +980,13 @@ public Builder clearUpdate() { return this; } /** - * .UpdateRequest update = 3; + * .UpdateRequest update = 3 [json_name = "update"]; */ public io.pinecone.proto.UpdateRequest.Builder getUpdateBuilder() { return getUpdateFieldBuilder().getBuilder(); } /** - * .UpdateRequest update = 3; + * .UpdateRequest update = 3 [json_name = "update"]; */ @java.lang.Override public io.pinecone.proto.UpdateRequestOrBuilder getUpdateOrBuilder() { @@ -1029,16 +1000,16 @@ public io.pinecone.proto.UpdateRequestOrBuilder getUpdateOrBuilder() { } } /** - * .UpdateRequest update = 3; + * .UpdateRequest update = 3 [json_name = "update"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.UpdateRequest, io.pinecone.proto.UpdateRequest.Builder, io.pinecone.proto.UpdateRequestOrBuilder> getUpdateFieldBuilder() { if (updateBuilder_ == null) { if (!(requestUnionInnerCase_ == 3)) { requestUnionInner_ = io.pinecone.proto.UpdateRequest.getDefaultInstance(); } - updateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + updateBuilder_ = new com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.UpdateRequest, io.pinecone.proto.UpdateRequest.Builder, io.pinecone.proto.UpdateRequestOrBuilder>( (io.pinecone.proto.UpdateRequest) requestUnionInner_, getParentForChildren(), @@ -1049,18 +1020,6 @@ public io.pinecone.proto.UpdateRequestOrBuilder getUpdateOrBuilder() { onChanged(); return updateBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:RequestUnion) } diff --git a/src/main/java/io/pinecone/proto/RequestUnionOrBuilder.java b/src/main/java/io/pinecone/proto/RequestUnionOrBuilder.java index 762fa0c2..4702896f 100644 --- a/src/main/java/io/pinecone/proto/RequestUnionOrBuilder.java +++ b/src/main/java/io/pinecone/proto/RequestUnionOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface RequestUnionOrBuilder extends @@ -9,47 +10,47 @@ public interface RequestUnionOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * .UpsertRequest upsert = 1; + * .UpsertRequest upsert = 1 [json_name = "upsert"]; * @return Whether the upsert field is set. */ boolean hasUpsert(); /** - * .UpsertRequest upsert = 1; + * .UpsertRequest upsert = 1 [json_name = "upsert"]; * @return The upsert. */ io.pinecone.proto.UpsertRequest getUpsert(); /** - * .UpsertRequest upsert = 1; + * .UpsertRequest upsert = 1 [json_name = "upsert"]; */ io.pinecone.proto.UpsertRequestOrBuilder getUpsertOrBuilder(); /** - * .DeleteRequest delete = 2; + * .DeleteRequest delete = 2 [json_name = "delete"]; * @return Whether the delete field is set. */ boolean hasDelete(); /** - * .DeleteRequest delete = 2; + * .DeleteRequest delete = 2 [json_name = "delete"]; * @return The delete. */ io.pinecone.proto.DeleteRequest getDelete(); /** - * .DeleteRequest delete = 2; + * .DeleteRequest delete = 2 [json_name = "delete"]; */ io.pinecone.proto.DeleteRequestOrBuilder getDeleteOrBuilder(); /** - * .UpdateRequest update = 3; + * .UpdateRequest update = 3 [json_name = "update"]; * @return Whether the update field is set. */ boolean hasUpdate(); /** - * .UpdateRequest update = 3; + * .UpdateRequest update = 3 [json_name = "update"]; * @return The update. */ io.pinecone.proto.UpdateRequest getUpdate(); /** - * .UpdateRequest update = 3; + * .UpdateRequest update = 3 [json_name = "update"]; */ io.pinecone.proto.UpdateRequestOrBuilder getUpdateOrBuilder(); diff --git a/src/main/java/io/pinecone/proto/ScoredVector.java b/src/main/java/io/pinecone/proto/ScoredVector.java index 87407144..b9ffb635 100644 --- a/src/main/java/io/pinecone/proto/ScoredVector.java +++ b/src/main/java/io/pinecone/proto/ScoredVector.java @@ -1,19 +1,29 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** * Protobuf type {@code ScoredVector} */ public final class ScoredVector extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:ScoredVector) ScoredVectorOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + ScoredVector.class.getName()); + } // Use ScoredVector.newBuilder() to construct. - private ScoredVector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ScoredVector(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ScoredVector() { @@ -21,22 +31,15 @@ private ScoredVector() { values_ = emptyFloatList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ScoredVector(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_ScoredVector_descriptor; + return io.pinecone.proto.DbData202501.internal_static_ScoredVector_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_ScoredVector_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_ScoredVector_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.ScoredVector.class, io.pinecone.proto.ScoredVector.Builder.class); } @@ -50,7 +53,7 @@ protected java.lang.Object newInstance( * This is the vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @return The id. */ @java.lang.Override @@ -71,7 +74,7 @@ public java.lang.String getId() { * This is the vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @return The bytes for id. */ @java.lang.Override @@ -96,7 +99,7 @@ public java.lang.String getId() { * This is a measure of similarity between this vector and the query vector. The higher the score, the more they are similar. * * - * float score = 2; + * float score = 2 [json_name = "score"]; * @return The score. */ @java.lang.Override @@ -113,7 +116,7 @@ public float getScore() { * This is the vector data, if it is requested. * * - * repeated float values = 3; + * repeated float values = 3 [json_name = "values"]; * @return A list containing the values. */ @java.lang.Override @@ -126,7 +129,7 @@ public float getScore() { * This is the vector data, if it is requested. * * - * repeated float values = 3; + * repeated float values = 3 [json_name = "values"]; * @return The count of values. */ public int getValuesCount() { @@ -137,7 +140,7 @@ public int getValuesCount() { * This is the vector data, if it is requested. * * - * repeated float values = 3; + * repeated float values = 3 [json_name = "values"]; * @param index The index of the element to return. * @return The values at the given index. */ @@ -153,7 +156,7 @@ public float getValues(int index) { * This is the sparse data, if it is requested. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; * @return Whether the sparseValues field is set. */ @java.lang.Override @@ -165,7 +168,7 @@ public boolean hasSparseValues() { * This is the sparse data, if it is requested. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; * @return The sparseValues. */ @java.lang.Override @@ -177,7 +180,7 @@ public io.pinecone.proto.SparseValues getSparseValues() { * This is the sparse data, if it is requested. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ @java.lang.Override public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { @@ -191,7 +194,7 @@ public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { * This is the metadata, if it is requested. * * - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 4 [json_name = "metadata"]; * @return Whether the metadata field is set. */ @java.lang.Override @@ -203,7 +206,7 @@ public boolean hasMetadata() { * This is the metadata, if it is requested. * * - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 4 [json_name = "metadata"]; * @return The metadata. */ @java.lang.Override @@ -215,7 +218,7 @@ public com.google.protobuf.Struct getMetadata() { * This is the metadata, if it is requested. * * - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 4 [json_name = "metadata"]; */ @java.lang.Override public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { @@ -237,8 +240,8 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); } if (java.lang.Float.floatToRawIntBits(score_) != 0) { output.writeFloat(2, score_); @@ -265,8 +268,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); } if (java.lang.Float.floatToRawIntBits(score_) != 0) { size += com.google.protobuf.CodedOutputStream @@ -390,20 +393,20 @@ public static io.pinecone.proto.ScoredVector parseFrom( } public static io.pinecone.proto.ScoredVector parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.ScoredVector parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.ScoredVector parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -411,20 +414,20 @@ public static io.pinecone.proto.ScoredVector parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.ScoredVector parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.ScoredVector parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -444,7 +447,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -452,18 +455,18 @@ protected Builder newBuilderForType( * Protobuf type {@code ScoredVector} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:ScoredVector) io.pinecone.proto.ScoredVectorOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_ScoredVector_descriptor; + return io.pinecone.proto.DbData202501.internal_static_ScoredVector_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_ScoredVector_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_ScoredVector_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.ScoredVector.class, io.pinecone.proto.ScoredVector.Builder.class); } @@ -474,12 +477,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getSparseValuesFieldBuilder(); getMetadataFieldBuilder(); @@ -508,7 +511,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_ScoredVector_descriptor; + return io.pinecone.proto.DbData202501.internal_static_ScoredVector_descriptor; } @java.lang.Override @@ -561,38 +564,6 @@ private void buildPartial0(io.pinecone.proto.ScoredVector result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.ScoredVector) { @@ -720,7 +691,7 @@ public Builder mergeFrom( * This is the vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @return The id. */ public java.lang.String getId() { @@ -740,7 +711,7 @@ public java.lang.String getId() { * This is the vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @return The bytes for id. */ public com.google.protobuf.ByteString @@ -761,7 +732,7 @@ public java.lang.String getId() { * This is the vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @param value The id to set. * @return This builder for chaining. */ @@ -778,7 +749,7 @@ public Builder setId( * This is the vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @return This builder for chaining. */ public Builder clearId() { @@ -792,7 +763,7 @@ public Builder clearId() { * This is the vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @param value The bytes for id to set. * @return This builder for chaining. */ @@ -812,7 +783,7 @@ public Builder setIdBytes( * This is a measure of similarity between this vector and the query vector. The higher the score, the more they are similar. * * - * float score = 2; + * float score = 2 [json_name = "score"]; * @return The score. */ @java.lang.Override @@ -824,7 +795,7 @@ public float getScore() { * This is a measure of similarity between this vector and the query vector. The higher the score, the more they are similar. * * - * float score = 2; + * float score = 2 [json_name = "score"]; * @param value The score to set. * @return This builder for chaining. */ @@ -840,7 +811,7 @@ public Builder setScore(float value) { * This is a measure of similarity between this vector and the query vector. The higher the score, the more they are similar. * * - * float score = 2; + * float score = 2 [json_name = "score"]; * @return This builder for chaining. */ public Builder clearScore() { @@ -868,7 +839,7 @@ private void ensureValuesIsMutable(int capacity) { * This is the vector data, if it is requested. * * - * repeated float values = 3; + * repeated float values = 3 [json_name = "values"]; * @return A list containing the values. */ public java.util.List @@ -881,7 +852,7 @@ private void ensureValuesIsMutable(int capacity) { * This is the vector data, if it is requested. * * - * repeated float values = 3; + * repeated float values = 3 [json_name = "values"]; * @return The count of values. */ public int getValuesCount() { @@ -892,7 +863,7 @@ public int getValuesCount() { * This is the vector data, if it is requested. * * - * repeated float values = 3; + * repeated float values = 3 [json_name = "values"]; * @param index The index of the element to return. * @return The values at the given index. */ @@ -904,7 +875,7 @@ public float getValues(int index) { * This is the vector data, if it is requested. * * - * repeated float values = 3; + * repeated float values = 3 [json_name = "values"]; * @param index The index to set the value at. * @param value The values to set. * @return This builder for chaining. @@ -923,7 +894,7 @@ public Builder setValues( * This is the vector data, if it is requested. * * - * repeated float values = 3; + * repeated float values = 3 [json_name = "values"]; * @param value The values to add. * @return This builder for chaining. */ @@ -940,7 +911,7 @@ public Builder addValues(float value) { * This is the vector data, if it is requested. * * - * repeated float values = 3; + * repeated float values = 3 [json_name = "values"]; * @param values The values to add. * @return This builder for chaining. */ @@ -958,7 +929,7 @@ public Builder addAllValues( * This is the vector data, if it is requested. * * - * repeated float values = 3; + * repeated float values = 3 [json_name = "values"]; * @return This builder for chaining. */ public Builder clearValues() { @@ -969,14 +940,14 @@ public Builder clearValues() { } private io.pinecone.proto.SparseValues sparseValues_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder> sparseValuesBuilder_; /** *
      * This is the sparse data, if it is requested.
      * 
* - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; * @return Whether the sparseValues field is set. */ public boolean hasSparseValues() { @@ -987,7 +958,7 @@ public boolean hasSparseValues() { * This is the sparse data, if it is requested. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; * @return The sparseValues. */ public io.pinecone.proto.SparseValues getSparseValues() { @@ -1002,7 +973,7 @@ public io.pinecone.proto.SparseValues getSparseValues() { * This is the sparse data, if it is requested. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ public Builder setSparseValues(io.pinecone.proto.SparseValues value) { if (sparseValuesBuilder_ == null) { @@ -1022,7 +993,7 @@ public Builder setSparseValues(io.pinecone.proto.SparseValues value) { * This is the sparse data, if it is requested. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ public Builder setSparseValues( io.pinecone.proto.SparseValues.Builder builderForValue) { @@ -1040,7 +1011,7 @@ public Builder setSparseValues( * This is the sparse data, if it is requested. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ public Builder mergeSparseValues(io.pinecone.proto.SparseValues value) { if (sparseValuesBuilder_ == null) { @@ -1065,7 +1036,7 @@ public Builder mergeSparseValues(io.pinecone.proto.SparseValues value) { * This is the sparse data, if it is requested. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ public Builder clearSparseValues() { bitField0_ = (bitField0_ & ~0x00000008); @@ -1082,7 +1053,7 @@ public Builder clearSparseValues() { * This is the sparse data, if it is requested. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ public io.pinecone.proto.SparseValues.Builder getSparseValuesBuilder() { bitField0_ |= 0x00000008; @@ -1094,7 +1065,7 @@ public io.pinecone.proto.SparseValues.Builder getSparseValuesBuilder() { * This is the sparse data, if it is requested. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { if (sparseValuesBuilder_ != null) { @@ -1109,13 +1080,13 @@ public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { * This is the sparse data, if it is requested. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder> getSparseValuesFieldBuilder() { if (sparseValuesBuilder_ == null) { - sparseValuesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + sparseValuesBuilder_ = new com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder>( getSparseValues(), getParentForChildren(), @@ -1126,14 +1097,14 @@ public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { } private com.google.protobuf.Struct metadata_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> metadataBuilder_; /** *
      * This is the metadata, if it is requested.
      * 
* - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 4 [json_name = "metadata"]; * @return Whether the metadata field is set. */ public boolean hasMetadata() { @@ -1144,7 +1115,7 @@ public boolean hasMetadata() { * This is the metadata, if it is requested. * * - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 4 [json_name = "metadata"]; * @return The metadata. */ public com.google.protobuf.Struct getMetadata() { @@ -1159,7 +1130,7 @@ public com.google.protobuf.Struct getMetadata() { * This is the metadata, if it is requested. * * - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 4 [json_name = "metadata"]; */ public Builder setMetadata(com.google.protobuf.Struct value) { if (metadataBuilder_ == null) { @@ -1179,7 +1150,7 @@ public Builder setMetadata(com.google.protobuf.Struct value) { * This is the metadata, if it is requested. * * - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 4 [json_name = "metadata"]; */ public Builder setMetadata( com.google.protobuf.Struct.Builder builderForValue) { @@ -1197,7 +1168,7 @@ public Builder setMetadata( * This is the metadata, if it is requested. * * - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 4 [json_name = "metadata"]; */ public Builder mergeMetadata(com.google.protobuf.Struct value) { if (metadataBuilder_ == null) { @@ -1222,7 +1193,7 @@ public Builder mergeMetadata(com.google.protobuf.Struct value) { * This is the metadata, if it is requested. * * - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 4 [json_name = "metadata"]; */ public Builder clearMetadata() { bitField0_ = (bitField0_ & ~0x00000010); @@ -1239,7 +1210,7 @@ public Builder clearMetadata() { * This is the metadata, if it is requested. * * - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 4 [json_name = "metadata"]; */ public com.google.protobuf.Struct.Builder getMetadataBuilder() { bitField0_ |= 0x00000010; @@ -1251,7 +1222,7 @@ public com.google.protobuf.Struct.Builder getMetadataBuilder() { * This is the metadata, if it is requested. * * - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 4 [json_name = "metadata"]; */ public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { if (metadataBuilder_ != null) { @@ -1266,13 +1237,13 @@ public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { * This is the metadata, if it is requested. * * - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 4 [json_name = "metadata"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> getMetadataFieldBuilder() { if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( getMetadata(), getParentForChildren(), @@ -1281,18 +1252,6 @@ public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { } return metadataBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:ScoredVector) } diff --git a/src/main/java/io/pinecone/proto/ScoredVectorOrBuilder.java b/src/main/java/io/pinecone/proto/ScoredVectorOrBuilder.java index 86f5ee39..835b9b94 100644 --- a/src/main/java/io/pinecone/proto/ScoredVectorOrBuilder.java +++ b/src/main/java/io/pinecone/proto/ScoredVectorOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface ScoredVectorOrBuilder extends @@ -13,7 +14,7 @@ public interface ScoredVectorOrBuilder extends * This is the vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @return The id. */ java.lang.String getId(); @@ -22,7 +23,7 @@ public interface ScoredVectorOrBuilder extends * This is the vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @return The bytes for id. */ com.google.protobuf.ByteString @@ -33,7 +34,7 @@ public interface ScoredVectorOrBuilder extends * This is a measure of similarity between this vector and the query vector. The higher the score, the more they are similar. * * - * float score = 2; + * float score = 2 [json_name = "score"]; * @return The score. */ float getScore(); @@ -43,7 +44,7 @@ public interface ScoredVectorOrBuilder extends * This is the vector data, if it is requested. * * - * repeated float values = 3; + * repeated float values = 3 [json_name = "values"]; * @return A list containing the values. */ java.util.List getValuesList(); @@ -52,7 +53,7 @@ public interface ScoredVectorOrBuilder extends * This is the vector data, if it is requested. * * - * repeated float values = 3; + * repeated float values = 3 [json_name = "values"]; * @return The count of values. */ int getValuesCount(); @@ -61,7 +62,7 @@ public interface ScoredVectorOrBuilder extends * This is the vector data, if it is requested. * * - * repeated float values = 3; + * repeated float values = 3 [json_name = "values"]; * @param index The index of the element to return. * @return The values at the given index. */ @@ -72,7 +73,7 @@ public interface ScoredVectorOrBuilder extends * This is the sparse data, if it is requested. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; * @return Whether the sparseValues field is set. */ boolean hasSparseValues(); @@ -81,7 +82,7 @@ public interface ScoredVectorOrBuilder extends * This is the sparse data, if it is requested. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; * @return The sparseValues. */ io.pinecone.proto.SparseValues getSparseValues(); @@ -90,7 +91,7 @@ public interface ScoredVectorOrBuilder extends * This is the sparse data, if it is requested. * * - * .SparseValues sparse_values = 5; + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder(); @@ -99,7 +100,7 @@ public interface ScoredVectorOrBuilder extends * This is the metadata, if it is requested. * * - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 4 [json_name = "metadata"]; * @return Whether the metadata field is set. */ boolean hasMetadata(); @@ -108,7 +109,7 @@ public interface ScoredVectorOrBuilder extends * This is the metadata, if it is requested. * * - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 4 [json_name = "metadata"]; * @return The metadata. */ com.google.protobuf.Struct getMetadata(); @@ -117,7 +118,7 @@ public interface ScoredVectorOrBuilder extends * This is the metadata, if it is requested. * * - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 4 [json_name = "metadata"]; */ com.google.protobuf.StructOrBuilder getMetadataOrBuilder(); } diff --git a/src/main/java/io/pinecone/proto/SingleQueryResults.java b/src/main/java/io/pinecone/proto/SingleQueryResults.java index 0c3f9c58..6a0cc940 100644 --- a/src/main/java/io/pinecone/proto/SingleQueryResults.java +++ b/src/main/java/io/pinecone/proto/SingleQueryResults.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** @@ -12,12 +13,21 @@ * Protobuf type {@code SingleQueryResults} */ public final class SingleQueryResults extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:SingleQueryResults) SingleQueryResultsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + SingleQueryResults.class.getName()); + } // Use SingleQueryResults.newBuilder() to construct. - private SingleQueryResults(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SingleQueryResults(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private SingleQueryResults() { @@ -25,22 +35,15 @@ private SingleQueryResults() { namespace_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SingleQueryResults(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_SingleQueryResults_descriptor; + return io.pinecone.proto.DbData202501.internal_static_SingleQueryResults_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_SingleQueryResults_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_SingleQueryResults_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.SingleQueryResults.class, io.pinecone.proto.SingleQueryResults.Builder.class); } @@ -53,7 +56,7 @@ protected java.lang.Object newInstance( * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ @java.lang.Override public java.util.List getMatchesList() { @@ -64,7 +67,7 @@ public java.util.List getMatchesList() { * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ @java.lang.Override public java.util.List @@ -76,7 +79,7 @@ public java.util.List getMatchesList() { * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ @java.lang.Override public int getMatchesCount() { @@ -87,7 +90,7 @@ public int getMatchesCount() { * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ @java.lang.Override public io.pinecone.proto.ScoredVector getMatches(int index) { @@ -98,7 +101,7 @@ public io.pinecone.proto.ScoredVector getMatches(int index) { * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ @java.lang.Override public io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder( @@ -114,7 +117,7 @@ public io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder( * The namespace for the vectors. * * - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The namespace. */ @java.lang.Override @@ -135,7 +138,7 @@ public java.lang.String getNamespace() { * The namespace for the vectors. * * - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The bytes for namespace. */ @java.lang.Override @@ -170,8 +173,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < matches_.size(); i++) { output.writeMessage(1, matches_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, namespace_); } getUnknownFields().writeTo(output); } @@ -186,8 +189,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, matches_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, namespace_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -264,20 +267,20 @@ public static io.pinecone.proto.SingleQueryResults parseFrom( } public static io.pinecone.proto.SingleQueryResults parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.SingleQueryResults parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.SingleQueryResults parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -285,20 +288,20 @@ public static io.pinecone.proto.SingleQueryResults parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.SingleQueryResults parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.SingleQueryResults parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -318,7 +321,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -330,18 +333,18 @@ protected Builder newBuilderForType( * Protobuf type {@code SingleQueryResults} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:SingleQueryResults) io.pinecone.proto.SingleQueryResultsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_SingleQueryResults_descriptor; + return io.pinecone.proto.DbData202501.internal_static_SingleQueryResults_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_SingleQueryResults_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_SingleQueryResults_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.SingleQueryResults.class, io.pinecone.proto.SingleQueryResults.Builder.class); } @@ -352,7 +355,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -374,7 +377,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_SingleQueryResults_descriptor; + return io.pinecone.proto.DbData202501.internal_static_SingleQueryResults_descriptor; } @java.lang.Override @@ -419,38 +422,6 @@ private void buildPartial0(io.pinecone.proto.SingleQueryResults result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.SingleQueryResults) { @@ -482,7 +453,7 @@ public Builder mergeFrom(io.pinecone.proto.SingleQueryResults other) { matches_ = other.matches_; bitField0_ = (bitField0_ & ~0x00000001); matchesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getMatchesFieldBuilder() : null; } else { matchesBuilder_.addAllMessages(other.matches_); @@ -564,7 +535,7 @@ private void ensureMatchesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< io.pinecone.proto.ScoredVector, io.pinecone.proto.ScoredVector.Builder, io.pinecone.proto.ScoredVectorOrBuilder> matchesBuilder_; /** @@ -572,7 +543,7 @@ private void ensureMatchesIsMutable() { * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ public java.util.List getMatchesList() { if (matchesBuilder_ == null) { @@ -586,7 +557,7 @@ public java.util.List getMatchesList() { * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ public int getMatchesCount() { if (matchesBuilder_ == null) { @@ -600,7 +571,7 @@ public int getMatchesCount() { * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ public io.pinecone.proto.ScoredVector getMatches(int index) { if (matchesBuilder_ == null) { @@ -614,7 +585,7 @@ public io.pinecone.proto.ScoredVector getMatches(int index) { * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ public Builder setMatches( int index, io.pinecone.proto.ScoredVector value) { @@ -635,7 +606,7 @@ public Builder setMatches( * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ public Builder setMatches( int index, io.pinecone.proto.ScoredVector.Builder builderForValue) { @@ -653,7 +624,7 @@ public Builder setMatches( * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ public Builder addMatches(io.pinecone.proto.ScoredVector value) { if (matchesBuilder_ == null) { @@ -673,7 +644,7 @@ public Builder addMatches(io.pinecone.proto.ScoredVector value) { * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ public Builder addMatches( int index, io.pinecone.proto.ScoredVector value) { @@ -694,7 +665,7 @@ public Builder addMatches( * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ public Builder addMatches( io.pinecone.proto.ScoredVector.Builder builderForValue) { @@ -712,7 +683,7 @@ public Builder addMatches( * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ public Builder addMatches( int index, io.pinecone.proto.ScoredVector.Builder builderForValue) { @@ -730,7 +701,7 @@ public Builder addMatches( * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ public Builder addAllMatches( java.lang.Iterable values) { @@ -749,7 +720,7 @@ public Builder addAllMatches( * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ public Builder clearMatches() { if (matchesBuilder_ == null) { @@ -766,7 +737,7 @@ public Builder clearMatches() { * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ public Builder removeMatches(int index) { if (matchesBuilder_ == null) { @@ -783,7 +754,7 @@ public Builder removeMatches(int index) { * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ public io.pinecone.proto.ScoredVector.Builder getMatchesBuilder( int index) { @@ -794,7 +765,7 @@ public io.pinecone.proto.ScoredVector.Builder getMatchesBuilder( * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ public io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder( int index) { @@ -808,7 +779,7 @@ public io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder( * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ public java.util.List getMatchesOrBuilderList() { @@ -823,7 +794,7 @@ public io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder( * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ public io.pinecone.proto.ScoredVector.Builder addMatchesBuilder() { return getMatchesFieldBuilder().addBuilder( @@ -834,7 +805,7 @@ public io.pinecone.proto.ScoredVector.Builder addMatchesBuilder() { * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ public io.pinecone.proto.ScoredVector.Builder addMatchesBuilder( int index) { @@ -846,17 +817,17 @@ public io.pinecone.proto.ScoredVector.Builder addMatchesBuilder( * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ public java.util.List getMatchesBuilderList() { return getMatchesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< io.pinecone.proto.ScoredVector, io.pinecone.proto.ScoredVector.Builder, io.pinecone.proto.ScoredVectorOrBuilder> getMatchesFieldBuilder() { if (matchesBuilder_ == null) { - matchesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + matchesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< io.pinecone.proto.ScoredVector, io.pinecone.proto.ScoredVector.Builder, io.pinecone.proto.ScoredVectorOrBuilder>( matches_, ((bitField0_ & 0x00000001) != 0), @@ -873,7 +844,7 @@ public io.pinecone.proto.ScoredVector.Builder addMatchesBuilder( * The namespace for the vectors. * * - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The namespace. */ public java.lang.String getNamespace() { @@ -893,7 +864,7 @@ public java.lang.String getNamespace() { * The namespace for the vectors. * * - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The bytes for namespace. */ public com.google.protobuf.ByteString @@ -914,7 +885,7 @@ public java.lang.String getNamespace() { * The namespace for the vectors. * * - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @param value The namespace to set. * @return This builder for chaining. */ @@ -931,7 +902,7 @@ public Builder setNamespace( * The namespace for the vectors. * * - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return This builder for chaining. */ public Builder clearNamespace() { @@ -945,7 +916,7 @@ public Builder clearNamespace() { * The namespace for the vectors. * * - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @param value The bytes for namespace to set. * @return This builder for chaining. */ @@ -958,18 +929,6 @@ public Builder setNamespaceBytes( onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:SingleQueryResults) } diff --git a/src/main/java/io/pinecone/proto/SingleQueryResultsOrBuilder.java b/src/main/java/io/pinecone/proto/SingleQueryResultsOrBuilder.java index 89c6bb97..6f4951f6 100644 --- a/src/main/java/io/pinecone/proto/SingleQueryResultsOrBuilder.java +++ b/src/main/java/io/pinecone/proto/SingleQueryResultsOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface SingleQueryResultsOrBuilder extends @@ -13,7 +14,7 @@ public interface SingleQueryResultsOrBuilder extends * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ java.util.List getMatchesList(); @@ -22,7 +23,7 @@ public interface SingleQueryResultsOrBuilder extends * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ io.pinecone.proto.ScoredVector getMatches(int index); /** @@ -30,7 +31,7 @@ public interface SingleQueryResultsOrBuilder extends * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ int getMatchesCount(); /** @@ -38,7 +39,7 @@ public interface SingleQueryResultsOrBuilder extends * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ java.util.List getMatchesOrBuilderList(); @@ -47,7 +48,7 @@ public interface SingleQueryResultsOrBuilder extends * The matches for the vectors. * * - * repeated .ScoredVector matches = 1; + * repeated .ScoredVector matches = 1 [json_name = "matches"]; */ io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder( int index); @@ -57,7 +58,7 @@ io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder( * The namespace for the vectors. * * - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The namespace. */ java.lang.String getNamespace(); @@ -66,7 +67,7 @@ io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder( * The namespace for the vectors. * * - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The bytes for namespace. */ com.google.protobuf.ByteString diff --git a/src/main/java/io/pinecone/proto/SparseValues.java b/src/main/java/io/pinecone/proto/SparseValues.java index b5b9b629..a8be01e2 100644 --- a/src/main/java/io/pinecone/proto/SparseValues.java +++ b/src/main/java/io/pinecone/proto/SparseValues.java @@ -1,19 +1,29 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** * Protobuf type {@code SparseValues} */ public final class SparseValues extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:SparseValues) SparseValuesOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + SparseValues.class.getName()); + } // Use SparseValues.newBuilder() to construct. - private SparseValues(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SparseValues(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private SparseValues() { @@ -21,22 +31,15 @@ private SparseValues() { values_ = emptyFloatList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SparseValues(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_SparseValues_descriptor; + return io.pinecone.proto.DbData202501.internal_static_SparseValues_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_SparseValues_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_SparseValues_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.SparseValues.class, io.pinecone.proto.SparseValues.Builder.class); } @@ -46,7 +49,7 @@ protected java.lang.Object newInstance( private com.google.protobuf.Internal.IntList indices_ = emptyIntList(); /** - * repeated uint32 indices = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated uint32 indices = 1 [json_name = "indices", (.google.api.field_behavior) = REQUIRED]; * @return A list containing the indices. */ @java.lang.Override @@ -55,14 +58,14 @@ protected java.lang.Object newInstance( return indices_; } /** - * repeated uint32 indices = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated uint32 indices = 1 [json_name = "indices", (.google.api.field_behavior) = REQUIRED]; * @return The count of indices. */ public int getIndicesCount() { return indices_.size(); } /** - * repeated uint32 indices = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated uint32 indices = 1 [json_name = "indices", (.google.api.field_behavior) = REQUIRED]; * @param index The index of the element to return. * @return The indices at the given index. */ @@ -76,7 +79,7 @@ public int getIndices(int index) { private com.google.protobuf.Internal.FloatList values_ = emptyFloatList(); /** - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values", (.google.api.field_behavior) = REQUIRED]; * @return A list containing the values. */ @java.lang.Override @@ -85,14 +88,14 @@ public int getIndices(int index) { return values_; } /** - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values", (.google.api.field_behavior) = REQUIRED]; * @return The count of values. */ public int getValuesCount() { return values_.size(); } /** - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values", (.google.api.field_behavior) = REQUIRED]; * @param index The index of the element to return. * @return The values at the given index. */ @@ -241,20 +244,20 @@ public static io.pinecone.proto.SparseValues parseFrom( } public static io.pinecone.proto.SparseValues parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.SparseValues parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.SparseValues parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -262,20 +265,20 @@ public static io.pinecone.proto.SparseValues parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.SparseValues parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.SparseValues parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -295,7 +298,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -303,18 +306,18 @@ protected Builder newBuilderForType( * Protobuf type {@code SparseValues} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:SparseValues) io.pinecone.proto.SparseValuesOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_SparseValues_descriptor; + return io.pinecone.proto.DbData202501.internal_static_SparseValues_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_SparseValues_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_SparseValues_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.SparseValues.class, io.pinecone.proto.SparseValues.Builder.class); } @@ -325,7 +328,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -341,7 +344,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_SparseValues_descriptor; + return io.pinecone.proto.DbData202501.internal_static_SparseValues_descriptor; } @java.lang.Override @@ -378,38 +381,6 @@ private void buildPartial0(io.pinecone.proto.SparseValues result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.SparseValues) { @@ -528,7 +499,7 @@ private void ensureIndicesIsMutable() { bitField0_ |= 0x00000001; } /** - * repeated uint32 indices = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated uint32 indices = 1 [json_name = "indices", (.google.api.field_behavior) = REQUIRED]; * @return A list containing the indices. */ public java.util.List @@ -537,14 +508,14 @@ private void ensureIndicesIsMutable() { return indices_; } /** - * repeated uint32 indices = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated uint32 indices = 1 [json_name = "indices", (.google.api.field_behavior) = REQUIRED]; * @return The count of indices. */ public int getIndicesCount() { return indices_.size(); } /** - * repeated uint32 indices = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated uint32 indices = 1 [json_name = "indices", (.google.api.field_behavior) = REQUIRED]; * @param index The index of the element to return. * @return The indices at the given index. */ @@ -552,7 +523,7 @@ public int getIndices(int index) { return indices_.getInt(index); } /** - * repeated uint32 indices = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated uint32 indices = 1 [json_name = "indices", (.google.api.field_behavior) = REQUIRED]; * @param index The index to set the value at. * @param value The indices to set. * @return This builder for chaining. @@ -567,7 +538,7 @@ public Builder setIndices( return this; } /** - * repeated uint32 indices = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated uint32 indices = 1 [json_name = "indices", (.google.api.field_behavior) = REQUIRED]; * @param value The indices to add. * @return This builder for chaining. */ @@ -580,7 +551,7 @@ public Builder addIndices(int value) { return this; } /** - * repeated uint32 indices = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated uint32 indices = 1 [json_name = "indices", (.google.api.field_behavior) = REQUIRED]; * @param values The indices to add. * @return This builder for chaining. */ @@ -594,7 +565,7 @@ public Builder addAllIndices( return this; } /** - * repeated uint32 indices = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated uint32 indices = 1 [json_name = "indices", (.google.api.field_behavior) = REQUIRED]; * @return This builder for chaining. */ public Builder clearIndices() { @@ -618,7 +589,7 @@ private void ensureValuesIsMutable(int capacity) { bitField0_ |= 0x00000002; } /** - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values", (.google.api.field_behavior) = REQUIRED]; * @return A list containing the values. */ public java.util.List @@ -627,14 +598,14 @@ private void ensureValuesIsMutable(int capacity) { return values_; } /** - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values", (.google.api.field_behavior) = REQUIRED]; * @return The count of values. */ public int getValuesCount() { return values_.size(); } /** - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values", (.google.api.field_behavior) = REQUIRED]; * @param index The index of the element to return. * @return The values at the given index. */ @@ -642,7 +613,7 @@ public float getValues(int index) { return values_.getFloat(index); } /** - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values", (.google.api.field_behavior) = REQUIRED]; * @param index The index to set the value at. * @param value The values to set. * @return This builder for chaining. @@ -657,7 +628,7 @@ public Builder setValues( return this; } /** - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values", (.google.api.field_behavior) = REQUIRED]; * @param value The values to add. * @return This builder for chaining. */ @@ -670,7 +641,7 @@ public Builder addValues(float value) { return this; } /** - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values", (.google.api.field_behavior) = REQUIRED]; * @param values The values to add. * @return This builder for chaining. */ @@ -684,7 +655,7 @@ public Builder addAllValues( return this; } /** - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values", (.google.api.field_behavior) = REQUIRED]; * @return This builder for chaining. */ public Builder clearValues() { @@ -693,18 +664,6 @@ public Builder clearValues() { onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:SparseValues) } diff --git a/src/main/java/io/pinecone/proto/SparseValuesOrBuilder.java b/src/main/java/io/pinecone/proto/SparseValuesOrBuilder.java index c84424ea..129f43f7 100644 --- a/src/main/java/io/pinecone/proto/SparseValuesOrBuilder.java +++ b/src/main/java/io/pinecone/proto/SparseValuesOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface SparseValuesOrBuilder extends @@ -9,34 +10,34 @@ public interface SparseValuesOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * repeated uint32 indices = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated uint32 indices = 1 [json_name = "indices", (.google.api.field_behavior) = REQUIRED]; * @return A list containing the indices. */ java.util.List getIndicesList(); /** - * repeated uint32 indices = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated uint32 indices = 1 [json_name = "indices", (.google.api.field_behavior) = REQUIRED]; * @return The count of indices. */ int getIndicesCount(); /** - * repeated uint32 indices = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated uint32 indices = 1 [json_name = "indices", (.google.api.field_behavior) = REQUIRED]; * @param index The index of the element to return. * @return The indices at the given index. */ int getIndices(int index); /** - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values", (.google.api.field_behavior) = REQUIRED]; * @return A list containing the values. */ java.util.List getValuesList(); /** - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values", (.google.api.field_behavior) = REQUIRED]; * @return The count of values. */ int getValuesCount(); /** - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values", (.google.api.field_behavior) = REQUIRED]; * @param index The index of the element to return. * @return The values at the given index. */ diff --git a/src/main/java/io/pinecone/proto/UpdateRequest.java b/src/main/java/io/pinecone/proto/UpdateRequest.java index 00ba6c0e..eb0f0f79 100644 --- a/src/main/java/io/pinecone/proto/UpdateRequest.java +++ b/src/main/java/io/pinecone/proto/UpdateRequest.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** @@ -12,12 +13,21 @@ * Protobuf type {@code UpdateRequest} */ public final class UpdateRequest extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:UpdateRequest) UpdateRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + UpdateRequest.class.getName()); + } // Use UpdateRequest.newBuilder() to construct. - private UpdateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpdateRequest() { @@ -26,22 +36,15 @@ private UpdateRequest() { namespace_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpdateRequest_descriptor; + return io.pinecone.proto.DbData202501.internal_static_UpdateRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpdateRequest_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_UpdateRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.UpdateRequest.class, io.pinecone.proto.UpdateRequest.Builder.class); } @@ -55,7 +58,7 @@ protected java.lang.Object newInstance( * Vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @return The id. */ @java.lang.Override @@ -76,7 +79,7 @@ public java.lang.String getId() { * Vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @return The bytes for id. */ @java.lang.Override @@ -103,7 +106,7 @@ public java.lang.String getId() { * Vector data. * * - * repeated float values = 2; + * repeated float values = 2 [json_name = "values"]; * @return A list containing the values. */ @java.lang.Override @@ -116,7 +119,7 @@ public java.lang.String getId() { * Vector data. * * - * repeated float values = 2; + * repeated float values = 2 [json_name = "values"]; * @return The count of values. */ public int getValuesCount() { @@ -127,7 +130,7 @@ public int getValuesCount() { * Vector data. * * - * repeated float values = 2; + * repeated float values = 2 [json_name = "values"]; * @param index The index of the element to return. * @return The values at the given index. */ @@ -139,7 +142,11 @@ public float getValues(int index) { public static final int SPARSE_VALUES_FIELD_NUMBER = 5; private io.pinecone.proto.SparseValues sparseValues_; /** - * .SparseValues sparse_values = 5; + *
+   * Sparse vector data.
+   * 
+ * + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; * @return Whether the sparseValues field is set. */ @java.lang.Override @@ -147,7 +154,11 @@ public boolean hasSparseValues() { return ((bitField0_ & 0x00000001) != 0); } /** - * .SparseValues sparse_values = 5; + *
+   * Sparse vector data.
+   * 
+ * + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; * @return The sparseValues. */ @java.lang.Override @@ -155,7 +166,11 @@ public io.pinecone.proto.SparseValues getSparseValues() { return sparseValues_ == null ? io.pinecone.proto.SparseValues.getDefaultInstance() : sparseValues_; } /** - * .SparseValues sparse_values = 5; + *
+   * Sparse vector data.
+   * 
+ * + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ @java.lang.Override public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { @@ -166,10 +181,10 @@ public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { private com.google.protobuf.Struct setMetadata_; /** *
-   * Metadata to *set* for the vector.
+   * Metadata to set for the vector.
    * 
* - * .google.protobuf.Struct set_metadata = 3; + * .google.protobuf.Struct set_metadata = 3 [json_name = "setMetadata"]; * @return Whether the setMetadata field is set. */ @java.lang.Override @@ -178,10 +193,10 @@ public boolean hasSetMetadata() { } /** *
-   * Metadata to *set* for the vector.
+   * Metadata to set for the vector.
    * 
* - * .google.protobuf.Struct set_metadata = 3; + * .google.protobuf.Struct set_metadata = 3 [json_name = "setMetadata"]; * @return The setMetadata. */ @java.lang.Override @@ -190,10 +205,10 @@ public com.google.protobuf.Struct getSetMetadata() { } /** *
-   * Metadata to *set* for the vector.
+   * Metadata to set for the vector.
    * 
* - * .google.protobuf.Struct set_metadata = 3; + * .google.protobuf.Struct set_metadata = 3 [json_name = "setMetadata"]; */ @java.lang.Override public com.google.protobuf.StructOrBuilder getSetMetadataOrBuilder() { @@ -205,10 +220,10 @@ public com.google.protobuf.StructOrBuilder getSetMetadataOrBuilder() { private volatile java.lang.Object namespace_ = ""; /** *
-   * Namespace name where to update the vector.
+   * The namespace containing the vector to update.
    * 
* - * string namespace = 4; + * string namespace = 4 [json_name = "namespace"]; * @return The namespace. */ @java.lang.Override @@ -226,10 +241,10 @@ public java.lang.String getNamespace() { } /** *
-   * Namespace name where to update the vector.
+   * The namespace containing the vector to update.
    * 
* - * string namespace = 4; + * string namespace = 4 [json_name = "namespace"]; * @return The bytes for namespace. */ @java.lang.Override @@ -262,8 +277,8 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); } if (getValuesList().size() > 0) { output.writeUInt32NoTag(18); @@ -275,8 +290,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(3, getSetMetadata()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, namespace_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getSparseValues()); @@ -290,8 +305,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); } { int dataSize = 0; @@ -308,8 +323,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getSetMetadata()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, namespace_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -412,20 +427,20 @@ public static io.pinecone.proto.UpdateRequest parseFrom( } public static io.pinecone.proto.UpdateRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.UpdateRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.UpdateRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -433,20 +448,20 @@ public static io.pinecone.proto.UpdateRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.UpdateRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.UpdateRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -466,7 +481,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -478,18 +493,18 @@ protected Builder newBuilderForType( * Protobuf type {@code UpdateRequest} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:UpdateRequest) io.pinecone.proto.UpdateRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpdateRequest_descriptor; + return io.pinecone.proto.DbData202501.internal_static_UpdateRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpdateRequest_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_UpdateRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.UpdateRequest.class, io.pinecone.proto.UpdateRequest.Builder.class); } @@ -500,12 +515,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getSparseValuesFieldBuilder(); getSetMetadataFieldBuilder(); @@ -534,7 +549,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpdateRequest_descriptor; + return io.pinecone.proto.DbData202501.internal_static_UpdateRequest_descriptor; } @java.lang.Override @@ -587,38 +602,6 @@ private void buildPartial0(io.pinecone.proto.UpdateRequest result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.UpdateRequest) { @@ -748,7 +731,7 @@ public Builder mergeFrom( * Vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @return The id. */ public java.lang.String getId() { @@ -768,7 +751,7 @@ public java.lang.String getId() { * Vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @return The bytes for id. */ public com.google.protobuf.ByteString @@ -789,7 +772,7 @@ public java.lang.String getId() { * Vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @param value The id to set. * @return This builder for chaining. */ @@ -806,7 +789,7 @@ public Builder setId( * Vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @return This builder for chaining. */ public Builder clearId() { @@ -820,7 +803,7 @@ public Builder clearId() { * Vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @param value The bytes for id to set. * @return This builder for chaining. */ @@ -852,7 +835,7 @@ private void ensureValuesIsMutable(int capacity) { * Vector data. * * - * repeated float values = 2; + * repeated float values = 2 [json_name = "values"]; * @return A list containing the values. */ public java.util.List @@ -865,7 +848,7 @@ private void ensureValuesIsMutable(int capacity) { * Vector data. * * - * repeated float values = 2; + * repeated float values = 2 [json_name = "values"]; * @return The count of values. */ public int getValuesCount() { @@ -876,7 +859,7 @@ public int getValuesCount() { * Vector data. * * - * repeated float values = 2; + * repeated float values = 2 [json_name = "values"]; * @param index The index of the element to return. * @return The values at the given index. */ @@ -888,7 +871,7 @@ public float getValues(int index) { * Vector data. * * - * repeated float values = 2; + * repeated float values = 2 [json_name = "values"]; * @param index The index to set the value at. * @param value The values to set. * @return This builder for chaining. @@ -907,7 +890,7 @@ public Builder setValues( * Vector data. * * - * repeated float values = 2; + * repeated float values = 2 [json_name = "values"]; * @param value The values to add. * @return This builder for chaining. */ @@ -924,7 +907,7 @@ public Builder addValues(float value) { * Vector data. * * - * repeated float values = 2; + * repeated float values = 2 [json_name = "values"]; * @param values The values to add. * @return This builder for chaining. */ @@ -942,7 +925,7 @@ public Builder addAllValues( * Vector data. * * - * repeated float values = 2; + * repeated float values = 2 [json_name = "values"]; * @return This builder for chaining. */ public Builder clearValues() { @@ -953,17 +936,25 @@ public Builder clearValues() { } private io.pinecone.proto.SparseValues sparseValues_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder> sparseValuesBuilder_; /** - * .SparseValues sparse_values = 5; + *
+     * Sparse vector data.
+     * 
+ * + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; * @return Whether the sparseValues field is set. */ public boolean hasSparseValues() { return ((bitField0_ & 0x00000004) != 0); } /** - * .SparseValues sparse_values = 5; + *
+     * Sparse vector data.
+     * 
+ * + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; * @return The sparseValues. */ public io.pinecone.proto.SparseValues getSparseValues() { @@ -974,7 +965,11 @@ public io.pinecone.proto.SparseValues getSparseValues() { } } /** - * .SparseValues sparse_values = 5; + *
+     * Sparse vector data.
+     * 
+ * + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ public Builder setSparseValues(io.pinecone.proto.SparseValues value) { if (sparseValuesBuilder_ == null) { @@ -990,7 +985,11 @@ public Builder setSparseValues(io.pinecone.proto.SparseValues value) { return this; } /** - * .SparseValues sparse_values = 5; + *
+     * Sparse vector data.
+     * 
+ * + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ public Builder setSparseValues( io.pinecone.proto.SparseValues.Builder builderForValue) { @@ -1004,7 +1003,11 @@ public Builder setSparseValues( return this; } /** - * .SparseValues sparse_values = 5; + *
+     * Sparse vector data.
+     * 
+ * + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ public Builder mergeSparseValues(io.pinecone.proto.SparseValues value) { if (sparseValuesBuilder_ == null) { @@ -1025,7 +1028,11 @@ public Builder mergeSparseValues(io.pinecone.proto.SparseValues value) { return this; } /** - * .SparseValues sparse_values = 5; + *
+     * Sparse vector data.
+     * 
+ * + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ public Builder clearSparseValues() { bitField0_ = (bitField0_ & ~0x00000004); @@ -1038,7 +1045,11 @@ public Builder clearSparseValues() { return this; } /** - * .SparseValues sparse_values = 5; + *
+     * Sparse vector data.
+     * 
+ * + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ public io.pinecone.proto.SparseValues.Builder getSparseValuesBuilder() { bitField0_ |= 0x00000004; @@ -1046,7 +1057,11 @@ public io.pinecone.proto.SparseValues.Builder getSparseValuesBuilder() { return getSparseValuesFieldBuilder().getBuilder(); } /** - * .SparseValues sparse_values = 5; + *
+     * Sparse vector data.
+     * 
+ * + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { if (sparseValuesBuilder_ != null) { @@ -1057,13 +1072,17 @@ public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { } } /** - * .SparseValues sparse_values = 5; + *
+     * Sparse vector data.
+     * 
+ * + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder> getSparseValuesFieldBuilder() { if (sparseValuesBuilder_ == null) { - sparseValuesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + sparseValuesBuilder_ = new com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder>( getSparseValues(), getParentForChildren(), @@ -1074,14 +1093,14 @@ public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { } private com.google.protobuf.Struct setMetadata_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> setMetadataBuilder_; /** *
-     * Metadata to *set* for the vector.
+     * Metadata to set for the vector.
      * 
* - * .google.protobuf.Struct set_metadata = 3; + * .google.protobuf.Struct set_metadata = 3 [json_name = "setMetadata"]; * @return Whether the setMetadata field is set. */ public boolean hasSetMetadata() { @@ -1089,10 +1108,10 @@ public boolean hasSetMetadata() { } /** *
-     * Metadata to *set* for the vector.
+     * Metadata to set for the vector.
      * 
* - * .google.protobuf.Struct set_metadata = 3; + * .google.protobuf.Struct set_metadata = 3 [json_name = "setMetadata"]; * @return The setMetadata. */ public com.google.protobuf.Struct getSetMetadata() { @@ -1104,10 +1123,10 @@ public com.google.protobuf.Struct getSetMetadata() { } /** *
-     * Metadata to *set* for the vector.
+     * Metadata to set for the vector.
      * 
* - * .google.protobuf.Struct set_metadata = 3; + * .google.protobuf.Struct set_metadata = 3 [json_name = "setMetadata"]; */ public Builder setSetMetadata(com.google.protobuf.Struct value) { if (setMetadataBuilder_ == null) { @@ -1124,10 +1143,10 @@ public Builder setSetMetadata(com.google.protobuf.Struct value) { } /** *
-     * Metadata to *set* for the vector.
+     * Metadata to set for the vector.
      * 
* - * .google.protobuf.Struct set_metadata = 3; + * .google.protobuf.Struct set_metadata = 3 [json_name = "setMetadata"]; */ public Builder setSetMetadata( com.google.protobuf.Struct.Builder builderForValue) { @@ -1142,10 +1161,10 @@ public Builder setSetMetadata( } /** *
-     * Metadata to *set* for the vector.
+     * Metadata to set for the vector.
      * 
* - * .google.protobuf.Struct set_metadata = 3; + * .google.protobuf.Struct set_metadata = 3 [json_name = "setMetadata"]; */ public Builder mergeSetMetadata(com.google.protobuf.Struct value) { if (setMetadataBuilder_ == null) { @@ -1167,10 +1186,10 @@ public Builder mergeSetMetadata(com.google.protobuf.Struct value) { } /** *
-     * Metadata to *set* for the vector.
+     * Metadata to set for the vector.
      * 
* - * .google.protobuf.Struct set_metadata = 3; + * .google.protobuf.Struct set_metadata = 3 [json_name = "setMetadata"]; */ public Builder clearSetMetadata() { bitField0_ = (bitField0_ & ~0x00000008); @@ -1184,10 +1203,10 @@ public Builder clearSetMetadata() { } /** *
-     * Metadata to *set* for the vector.
+     * Metadata to set for the vector.
      * 
* - * .google.protobuf.Struct set_metadata = 3; + * .google.protobuf.Struct set_metadata = 3 [json_name = "setMetadata"]; */ public com.google.protobuf.Struct.Builder getSetMetadataBuilder() { bitField0_ |= 0x00000008; @@ -1196,10 +1215,10 @@ public com.google.protobuf.Struct.Builder getSetMetadataBuilder() { } /** *
-     * Metadata to *set* for the vector.
+     * Metadata to set for the vector.
      * 
* - * .google.protobuf.Struct set_metadata = 3; + * .google.protobuf.Struct set_metadata = 3 [json_name = "setMetadata"]; */ public com.google.protobuf.StructOrBuilder getSetMetadataOrBuilder() { if (setMetadataBuilder_ != null) { @@ -1211,16 +1230,16 @@ public com.google.protobuf.StructOrBuilder getSetMetadataOrBuilder() { } /** *
-     * Metadata to *set* for the vector.
+     * Metadata to set for the vector.
      * 
* - * .google.protobuf.Struct set_metadata = 3; + * .google.protobuf.Struct set_metadata = 3 [json_name = "setMetadata"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> getSetMetadataFieldBuilder() { if (setMetadataBuilder_ == null) { - setMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + setMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( getSetMetadata(), getParentForChildren(), @@ -1233,10 +1252,10 @@ public com.google.protobuf.StructOrBuilder getSetMetadataOrBuilder() { private java.lang.Object namespace_ = ""; /** *
-     * Namespace name where to update the vector.
+     * The namespace containing the vector to update.
      * 
* - * string namespace = 4; + * string namespace = 4 [json_name = "namespace"]; * @return The namespace. */ public java.lang.String getNamespace() { @@ -1253,10 +1272,10 @@ public java.lang.String getNamespace() { } /** *
-     * Namespace name where to update the vector.
+     * The namespace containing the vector to update.
      * 
* - * string namespace = 4; + * string namespace = 4 [json_name = "namespace"]; * @return The bytes for namespace. */ public com.google.protobuf.ByteString @@ -1274,10 +1293,10 @@ public java.lang.String getNamespace() { } /** *
-     * Namespace name where to update the vector.
+     * The namespace containing the vector to update.
      * 
* - * string namespace = 4; + * string namespace = 4 [json_name = "namespace"]; * @param value The namespace to set. * @return This builder for chaining. */ @@ -1291,10 +1310,10 @@ public Builder setNamespace( } /** *
-     * Namespace name where to update the vector.
+     * The namespace containing the vector to update.
      * 
* - * string namespace = 4; + * string namespace = 4 [json_name = "namespace"]; * @return This builder for chaining. */ public Builder clearNamespace() { @@ -1305,10 +1324,10 @@ public Builder clearNamespace() { } /** *
-     * Namespace name where to update the vector.
+     * The namespace containing the vector to update.
      * 
* - * string namespace = 4; + * string namespace = 4 [json_name = "namespace"]; * @param value The bytes for namespace to set. * @return This builder for chaining. */ @@ -1321,18 +1340,6 @@ public Builder setNamespaceBytes( onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:UpdateRequest) } diff --git a/src/main/java/io/pinecone/proto/UpdateRequestOrBuilder.java b/src/main/java/io/pinecone/proto/UpdateRequestOrBuilder.java index 1be7d985..53686dcb 100644 --- a/src/main/java/io/pinecone/proto/UpdateRequestOrBuilder.java +++ b/src/main/java/io/pinecone/proto/UpdateRequestOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface UpdateRequestOrBuilder extends @@ -13,7 +14,7 @@ public interface UpdateRequestOrBuilder extends * Vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @return The id. */ java.lang.String getId(); @@ -22,7 +23,7 @@ public interface UpdateRequestOrBuilder extends * Vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @return The bytes for id. */ com.google.protobuf.ByteString @@ -33,7 +34,7 @@ public interface UpdateRequestOrBuilder extends * Vector data. * * - * repeated float values = 2; + * repeated float values = 2 [json_name = "values"]; * @return A list containing the values. */ java.util.List getValuesList(); @@ -42,7 +43,7 @@ public interface UpdateRequestOrBuilder extends * Vector data. * * - * repeated float values = 2; + * repeated float values = 2 [json_name = "values"]; * @return The count of values. */ int getValuesCount(); @@ -51,69 +52,81 @@ public interface UpdateRequestOrBuilder extends * Vector data. * * - * repeated float values = 2; + * repeated float values = 2 [json_name = "values"]; * @param index The index of the element to return. * @return The values at the given index. */ float getValues(int index); /** - * .SparseValues sparse_values = 5; + *
+   * Sparse vector data.
+   * 
+ * + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; * @return Whether the sparseValues field is set. */ boolean hasSparseValues(); /** - * .SparseValues sparse_values = 5; + *
+   * Sparse vector data.
+   * 
+ * + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; * @return The sparseValues. */ io.pinecone.proto.SparseValues getSparseValues(); /** - * .SparseValues sparse_values = 5; + *
+   * Sparse vector data.
+   * 
+ * + * .SparseValues sparse_values = 5 [json_name = "sparseValues"]; */ io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder(); /** *
-   * Metadata to *set* for the vector.
+   * Metadata to set for the vector.
    * 
* - * .google.protobuf.Struct set_metadata = 3; + * .google.protobuf.Struct set_metadata = 3 [json_name = "setMetadata"]; * @return Whether the setMetadata field is set. */ boolean hasSetMetadata(); /** *
-   * Metadata to *set* for the vector.
+   * Metadata to set for the vector.
    * 
* - * .google.protobuf.Struct set_metadata = 3; + * .google.protobuf.Struct set_metadata = 3 [json_name = "setMetadata"]; * @return The setMetadata. */ com.google.protobuf.Struct getSetMetadata(); /** *
-   * Metadata to *set* for the vector.
+   * Metadata to set for the vector.
    * 
* - * .google.protobuf.Struct set_metadata = 3; + * .google.protobuf.Struct set_metadata = 3 [json_name = "setMetadata"]; */ com.google.protobuf.StructOrBuilder getSetMetadataOrBuilder(); /** *
-   * Namespace name where to update the vector.
+   * The namespace containing the vector to update.
    * 
* - * string namespace = 4; + * string namespace = 4 [json_name = "namespace"]; * @return The namespace. */ java.lang.String getNamespace(); /** *
-   * Namespace name where to update the vector.
+   * The namespace containing the vector to update.
    * 
* - * string namespace = 4; + * string namespace = 4 [json_name = "namespace"]; * @return The bytes for namespace. */ com.google.protobuf.ByteString diff --git a/src/main/java/io/pinecone/proto/UpdateResponse.java b/src/main/java/io/pinecone/proto/UpdateResponse.java index ae612368..6e26057c 100644 --- a/src/main/java/io/pinecone/proto/UpdateResponse.java +++ b/src/main/java/io/pinecone/proto/UpdateResponse.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** @@ -12,33 +13,35 @@ * Protobuf type {@code UpdateResponse} */ public final class UpdateResponse extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:UpdateResponse) UpdateResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + UpdateResponse.class.getName()); + } // Use UpdateResponse.newBuilder() to construct. - private UpdateResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpdateResponse() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpdateResponse_descriptor; + return io.pinecone.proto.DbData202501.internal_static_UpdateResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpdateResponse_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_UpdateResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.UpdateResponse.class, io.pinecone.proto.UpdateResponse.Builder.class); } @@ -131,20 +134,20 @@ public static io.pinecone.proto.UpdateResponse parseFrom( } public static io.pinecone.proto.UpdateResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.UpdateResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.UpdateResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -152,20 +155,20 @@ public static io.pinecone.proto.UpdateResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.UpdateResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.UpdateResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -185,7 +188,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -197,18 +200,18 @@ protected Builder newBuilderForType( * Protobuf type {@code UpdateResponse} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:UpdateResponse) io.pinecone.proto.UpdateResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpdateResponse_descriptor; + return io.pinecone.proto.DbData202501.internal_static_UpdateResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpdateResponse_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_UpdateResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.UpdateResponse.class, io.pinecone.proto.UpdateResponse.Builder.class); } @@ -219,7 +222,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -232,7 +235,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpdateResponse_descriptor; + return io.pinecone.proto.DbData202501.internal_static_UpdateResponse_descriptor; } @java.lang.Override @@ -256,38 +259,6 @@ public io.pinecone.proto.UpdateResponse buildPartial() { return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.UpdateResponse) { @@ -341,18 +312,6 @@ public Builder mergeFrom( } // finally return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:UpdateResponse) } diff --git a/src/main/java/io/pinecone/proto/UpdateResponseOrBuilder.java b/src/main/java/io/pinecone/proto/UpdateResponseOrBuilder.java index d7940240..ae9cb65b 100644 --- a/src/main/java/io/pinecone/proto/UpdateResponseOrBuilder.java +++ b/src/main/java/io/pinecone/proto/UpdateResponseOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface UpdateResponseOrBuilder extends diff --git a/src/main/java/io/pinecone/proto/UpsertRequest.java b/src/main/java/io/pinecone/proto/UpsertRequest.java index 21f30cff..8a0ebd45 100644 --- a/src/main/java/io/pinecone/proto/UpsertRequest.java +++ b/src/main/java/io/pinecone/proto/UpsertRequest.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** @@ -12,12 +13,21 @@ * Protobuf type {@code UpsertRequest} */ public final class UpsertRequest extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:UpsertRequest) UpsertRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + UpsertRequest.class.getName()); + } // Use UpsertRequest.newBuilder() to construct. - private UpsertRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpsertRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpsertRequest() { @@ -25,22 +35,15 @@ private UpsertRequest() { namespace_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpsertRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpsertRequest_descriptor; + return io.pinecone.proto.DbData202501.internal_static_UpsertRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpsertRequest_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_UpsertRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.UpsertRequest.class, io.pinecone.proto.UpsertRequest.Builder.class); } @@ -53,7 +56,7 @@ protected java.lang.Object newInstance( * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ @java.lang.Override public java.util.List getVectorsList() { @@ -64,7 +67,7 @@ public java.util.List getVectorsList() { * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ @java.lang.Override public java.util.List @@ -76,7 +79,7 @@ public java.util.List getVectorsList() { * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ @java.lang.Override public int getVectorsCount() { @@ -87,7 +90,7 @@ public int getVectorsCount() { * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ @java.lang.Override public io.pinecone.proto.Vector getVectors(int index) { @@ -98,7 +101,7 @@ public io.pinecone.proto.Vector getVectors(int index) { * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ @java.lang.Override public io.pinecone.proto.VectorOrBuilder getVectorsOrBuilder( @@ -111,10 +114,10 @@ public io.pinecone.proto.VectorOrBuilder getVectorsOrBuilder( private volatile java.lang.Object namespace_ = ""; /** *
-   * This is the namespace name where you upsert vectors.
+   * The namespace where you upsert vectors.
    * 
* - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The namespace. */ @java.lang.Override @@ -132,10 +135,10 @@ public java.lang.String getNamespace() { } /** *
-   * This is the namespace name where you upsert vectors.
+   * The namespace where you upsert vectors.
    * 
* - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The bytes for namespace. */ @java.lang.Override @@ -170,8 +173,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < vectors_.size(); i++) { output.writeMessage(1, vectors_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, namespace_); } getUnknownFields().writeTo(output); } @@ -186,8 +189,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, vectors_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, namespace_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, namespace_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -264,20 +267,20 @@ public static io.pinecone.proto.UpsertRequest parseFrom( } public static io.pinecone.proto.UpsertRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.UpsertRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.UpsertRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -285,20 +288,20 @@ public static io.pinecone.proto.UpsertRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.UpsertRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.UpsertRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -318,7 +321,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -330,18 +333,18 @@ protected Builder newBuilderForType( * Protobuf type {@code UpsertRequest} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:UpsertRequest) io.pinecone.proto.UpsertRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpsertRequest_descriptor; + return io.pinecone.proto.DbData202501.internal_static_UpsertRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpsertRequest_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_UpsertRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.UpsertRequest.class, io.pinecone.proto.UpsertRequest.Builder.class); } @@ -352,7 +355,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -374,7 +377,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpsertRequest_descriptor; + return io.pinecone.proto.DbData202501.internal_static_UpsertRequest_descriptor; } @java.lang.Override @@ -419,38 +422,6 @@ private void buildPartial0(io.pinecone.proto.UpsertRequest result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.UpsertRequest) { @@ -482,7 +453,7 @@ public Builder mergeFrom(io.pinecone.proto.UpsertRequest other) { vectors_ = other.vectors_; bitField0_ = (bitField0_ & ~0x00000001); vectorsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getVectorsFieldBuilder() : null; } else { vectorsBuilder_.addAllMessages(other.vectors_); @@ -564,7 +535,7 @@ private void ensureVectorsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< io.pinecone.proto.Vector, io.pinecone.proto.Vector.Builder, io.pinecone.proto.VectorOrBuilder> vectorsBuilder_; /** @@ -572,7 +543,7 @@ private void ensureVectorsIsMutable() { * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ public java.util.List getVectorsList() { if (vectorsBuilder_ == null) { @@ -586,7 +557,7 @@ public java.util.List getVectorsList() { * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ public int getVectorsCount() { if (vectorsBuilder_ == null) { @@ -600,7 +571,7 @@ public int getVectorsCount() { * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ public io.pinecone.proto.Vector getVectors(int index) { if (vectorsBuilder_ == null) { @@ -614,7 +585,7 @@ public io.pinecone.proto.Vector getVectors(int index) { * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ public Builder setVectors( int index, io.pinecone.proto.Vector value) { @@ -635,7 +606,7 @@ public Builder setVectors( * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ public Builder setVectors( int index, io.pinecone.proto.Vector.Builder builderForValue) { @@ -653,7 +624,7 @@ public Builder setVectors( * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ public Builder addVectors(io.pinecone.proto.Vector value) { if (vectorsBuilder_ == null) { @@ -673,7 +644,7 @@ public Builder addVectors(io.pinecone.proto.Vector value) { * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ public Builder addVectors( int index, io.pinecone.proto.Vector value) { @@ -694,7 +665,7 @@ public Builder addVectors( * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ public Builder addVectors( io.pinecone.proto.Vector.Builder builderForValue) { @@ -712,7 +683,7 @@ public Builder addVectors( * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ public Builder addVectors( int index, io.pinecone.proto.Vector.Builder builderForValue) { @@ -730,7 +701,7 @@ public Builder addVectors( * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ public Builder addAllVectors( java.lang.Iterable values) { @@ -749,7 +720,7 @@ public Builder addAllVectors( * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ public Builder clearVectors() { if (vectorsBuilder_ == null) { @@ -766,7 +737,7 @@ public Builder clearVectors() { * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ public Builder removeVectors(int index) { if (vectorsBuilder_ == null) { @@ -783,7 +754,7 @@ public Builder removeVectors(int index) { * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ public io.pinecone.proto.Vector.Builder getVectorsBuilder( int index) { @@ -794,7 +765,7 @@ public io.pinecone.proto.Vector.Builder getVectorsBuilder( * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ public io.pinecone.proto.VectorOrBuilder getVectorsOrBuilder( int index) { @@ -808,7 +779,7 @@ public io.pinecone.proto.VectorOrBuilder getVectorsOrBuilder( * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ public java.util.List getVectorsOrBuilderList() { @@ -823,7 +794,7 @@ public io.pinecone.proto.VectorOrBuilder getVectorsOrBuilder( * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ public io.pinecone.proto.Vector.Builder addVectorsBuilder() { return getVectorsFieldBuilder().addBuilder( @@ -834,7 +805,7 @@ public io.pinecone.proto.Vector.Builder addVectorsBuilder() { * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ public io.pinecone.proto.Vector.Builder addVectorsBuilder( int index) { @@ -846,17 +817,17 @@ public io.pinecone.proto.Vector.Builder addVectorsBuilder( * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ public java.util.List getVectorsBuilderList() { return getVectorsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< io.pinecone.proto.Vector, io.pinecone.proto.Vector.Builder, io.pinecone.proto.VectorOrBuilder> getVectorsFieldBuilder() { if (vectorsBuilder_ == null) { - vectorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + vectorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< io.pinecone.proto.Vector, io.pinecone.proto.Vector.Builder, io.pinecone.proto.VectorOrBuilder>( vectors_, ((bitField0_ & 0x00000001) != 0), @@ -870,10 +841,10 @@ public io.pinecone.proto.Vector.Builder addVectorsBuilder( private java.lang.Object namespace_ = ""; /** *
-     * This is the namespace name where you upsert vectors.
+     * The namespace where you upsert vectors.
      * 
* - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The namespace. */ public java.lang.String getNamespace() { @@ -890,10 +861,10 @@ public java.lang.String getNamespace() { } /** *
-     * This is the namespace name where you upsert vectors.
+     * The namespace where you upsert vectors.
      * 
* - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The bytes for namespace. */ public com.google.protobuf.ByteString @@ -911,10 +882,10 @@ public java.lang.String getNamespace() { } /** *
-     * This is the namespace name where you upsert vectors.
+     * The namespace where you upsert vectors.
      * 
* - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @param value The namespace to set. * @return This builder for chaining. */ @@ -928,10 +899,10 @@ public Builder setNamespace( } /** *
-     * This is the namespace name where you upsert vectors.
+     * The namespace where you upsert vectors.
      * 
* - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return This builder for chaining. */ public Builder clearNamespace() { @@ -942,10 +913,10 @@ public Builder clearNamespace() { } /** *
-     * This is the namespace name where you upsert vectors.
+     * The namespace where you upsert vectors.
      * 
* - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @param value The bytes for namespace to set. * @return This builder for chaining. */ @@ -958,18 +929,6 @@ public Builder setNamespaceBytes( onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:UpsertRequest) } diff --git a/src/main/java/io/pinecone/proto/UpsertRequestOrBuilder.java b/src/main/java/io/pinecone/proto/UpsertRequestOrBuilder.java index 5358f584..890f6739 100644 --- a/src/main/java/io/pinecone/proto/UpsertRequestOrBuilder.java +++ b/src/main/java/io/pinecone/proto/UpsertRequestOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface UpsertRequestOrBuilder extends @@ -13,7 +14,7 @@ public interface UpsertRequestOrBuilder extends * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ java.util.List getVectorsList(); @@ -22,7 +23,7 @@ public interface UpsertRequestOrBuilder extends * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ io.pinecone.proto.Vector getVectors(int index); /** @@ -30,7 +31,7 @@ public interface UpsertRequestOrBuilder extends * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ int getVectorsCount(); /** @@ -38,7 +39,7 @@ public interface UpsertRequestOrBuilder extends * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ java.util.List getVectorsOrBuilderList(); @@ -47,26 +48,26 @@ public interface UpsertRequestOrBuilder extends * An array containing the vectors to upsert. Recommended batch limit is 100 vectors. * * - * repeated .Vector vectors = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated .Vector vectors = 1 [json_name = "vectors", (.google.api.field_behavior) = REQUIRED]; */ io.pinecone.proto.VectorOrBuilder getVectorsOrBuilder( int index); /** *
-   * This is the namespace name where you upsert vectors.
+   * The namespace where you upsert vectors.
    * 
* - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The namespace. */ java.lang.String getNamespace(); /** *
-   * This is the namespace name where you upsert vectors.
+   * The namespace where you upsert vectors.
    * 
* - * string namespace = 2; + * string namespace = 2 [json_name = "namespace"]; * @return The bytes for namespace. */ com.google.protobuf.ByteString diff --git a/src/main/java/io/pinecone/proto/UpsertResponse.java b/src/main/java/io/pinecone/proto/UpsertResponse.java index 3544043d..ea4717b9 100644 --- a/src/main/java/io/pinecone/proto/UpsertResponse.java +++ b/src/main/java/io/pinecone/proto/UpsertResponse.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** @@ -12,33 +13,35 @@ * Protobuf type {@code UpsertResponse} */ public final class UpsertResponse extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:UpsertResponse) UpsertResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + UpsertResponse.class.getName()); + } // Use UpsertResponse.newBuilder() to construct. - private UpsertResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpsertResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpsertResponse() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpsertResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpsertResponse_descriptor; + return io.pinecone.proto.DbData202501.internal_static_UpsertResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpsertResponse_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_UpsertResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.UpsertResponse.class, io.pinecone.proto.UpsertResponse.Builder.class); } @@ -50,7 +53,7 @@ protected java.lang.Object newInstance( * The number of vectors upserted. * * - * uint32 upserted_count = 1; + * uint32 upserted_count = 1 [json_name = "upsertedCount"]; * @return The upsertedCount. */ @java.lang.Override @@ -157,20 +160,20 @@ public static io.pinecone.proto.UpsertResponse parseFrom( } public static io.pinecone.proto.UpsertResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.UpsertResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.UpsertResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -178,20 +181,20 @@ public static io.pinecone.proto.UpsertResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.UpsertResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.UpsertResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -211,7 +214,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -223,18 +226,18 @@ protected Builder newBuilderForType( * Protobuf type {@code UpsertResponse} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:UpsertResponse) io.pinecone.proto.UpsertResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpsertResponse_descriptor; + return io.pinecone.proto.DbData202501.internal_static_UpsertResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpsertResponse_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_UpsertResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.UpsertResponse.class, io.pinecone.proto.UpsertResponse.Builder.class); } @@ -245,7 +248,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -260,7 +263,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpsertResponse_descriptor; + return io.pinecone.proto.DbData202501.internal_static_UpsertResponse_descriptor; } @java.lang.Override @@ -292,38 +295,6 @@ private void buildPartial0(io.pinecone.proto.UpsertResponse result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.UpsertResponse) { @@ -393,7 +364,7 @@ public Builder mergeFrom( * The number of vectors upserted. * * - * uint32 upserted_count = 1; + * uint32 upserted_count = 1 [json_name = "upsertedCount"]; * @return The upsertedCount. */ @java.lang.Override @@ -405,7 +376,7 @@ public int getUpsertedCount() { * The number of vectors upserted. * * - * uint32 upserted_count = 1; + * uint32 upserted_count = 1 [json_name = "upsertedCount"]; * @param value The upsertedCount to set. * @return This builder for chaining. */ @@ -421,7 +392,7 @@ public Builder setUpsertedCount(int value) { * The number of vectors upserted. * * - * uint32 upserted_count = 1; + * uint32 upserted_count = 1 [json_name = "upsertedCount"]; * @return This builder for chaining. */ public Builder clearUpsertedCount() { @@ -430,18 +401,6 @@ public Builder clearUpsertedCount() { onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:UpsertResponse) } diff --git a/src/main/java/io/pinecone/proto/UpsertResponseOrBuilder.java b/src/main/java/io/pinecone/proto/UpsertResponseOrBuilder.java index 09d1134c..cbc4b8d2 100644 --- a/src/main/java/io/pinecone/proto/UpsertResponseOrBuilder.java +++ b/src/main/java/io/pinecone/proto/UpsertResponseOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface UpsertResponseOrBuilder extends @@ -13,7 +14,7 @@ public interface UpsertResponseOrBuilder extends * The number of vectors upserted. * * - * uint32 upserted_count = 1; + * uint32 upserted_count = 1 [json_name = "upsertedCount"]; * @return The upsertedCount. */ int getUpsertedCount(); diff --git a/src/main/java/io/pinecone/proto/Usage.java b/src/main/java/io/pinecone/proto/Usage.java index 37bfcc02..f4e4a0d8 100644 --- a/src/main/java/io/pinecone/proto/Usage.java +++ b/src/main/java/io/pinecone/proto/Usage.java @@ -1,40 +1,43 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** * Protobuf type {@code Usage} */ public final class Usage extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:Usage) UsageOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + Usage.class.getName()); + } // Use Usage.newBuilder() to construct. - private Usage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Usage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Usage() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Usage(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_Usage_descriptor; + return io.pinecone.proto.DbData202501.internal_static_Usage_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_Usage_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_Usage_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.Usage.class, io.pinecone.proto.Usage.Builder.class); } @@ -47,7 +50,7 @@ protected java.lang.Object newInstance( * The number of read units consumed by this operation. * * - * optional uint32 read_units = 1; + * optional uint32 read_units = 1 [json_name = "readUnits"]; * @return Whether the readUnits field is set. */ @java.lang.Override @@ -59,7 +62,7 @@ public boolean hasReadUnits() { * The number of read units consumed by this operation. * * - * optional uint32 read_units = 1; + * optional uint32 read_units = 1 [json_name = "readUnits"]; * @return The readUnits. */ @java.lang.Override @@ -171,20 +174,20 @@ public static io.pinecone.proto.Usage parseFrom( } public static io.pinecone.proto.Usage parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.Usage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.Usage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -192,20 +195,20 @@ public static io.pinecone.proto.Usage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.Usage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.Usage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -225,7 +228,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -233,18 +236,18 @@ protected Builder newBuilderForType( * Protobuf type {@code Usage} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:Usage) io.pinecone.proto.UsageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_Usage_descriptor; + return io.pinecone.proto.DbData202501.internal_static_Usage_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_Usage_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_Usage_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.Usage.class, io.pinecone.proto.Usage.Builder.class); } @@ -255,7 +258,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -270,7 +273,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_Usage_descriptor; + return io.pinecone.proto.DbData202501.internal_static_Usage_descriptor; } @java.lang.Override @@ -305,38 +308,6 @@ private void buildPartial0(io.pinecone.proto.Usage result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.Usage) { @@ -406,7 +377,7 @@ public Builder mergeFrom( * The number of read units consumed by this operation. * * - * optional uint32 read_units = 1; + * optional uint32 read_units = 1 [json_name = "readUnits"]; * @return Whether the readUnits field is set. */ @java.lang.Override @@ -418,7 +389,7 @@ public boolean hasReadUnits() { * The number of read units consumed by this operation. * * - * optional uint32 read_units = 1; + * optional uint32 read_units = 1 [json_name = "readUnits"]; * @return The readUnits. */ @java.lang.Override @@ -430,7 +401,7 @@ public int getReadUnits() { * The number of read units consumed by this operation. * * - * optional uint32 read_units = 1; + * optional uint32 read_units = 1 [json_name = "readUnits"]; * @param value The readUnits to set. * @return This builder for chaining. */ @@ -446,7 +417,7 @@ public Builder setReadUnits(int value) { * The number of read units consumed by this operation. * * - * optional uint32 read_units = 1; + * optional uint32 read_units = 1 [json_name = "readUnits"]; * @return This builder for chaining. */ public Builder clearReadUnits() { @@ -455,18 +426,6 @@ public Builder clearReadUnits() { onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:Usage) } diff --git a/src/main/java/io/pinecone/proto/UsageOrBuilder.java b/src/main/java/io/pinecone/proto/UsageOrBuilder.java index 4041601a..5b042f44 100644 --- a/src/main/java/io/pinecone/proto/UsageOrBuilder.java +++ b/src/main/java/io/pinecone/proto/UsageOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface UsageOrBuilder extends @@ -13,7 +14,7 @@ public interface UsageOrBuilder extends * The number of read units consumed by this operation. * * - * optional uint32 read_units = 1; + * optional uint32 read_units = 1 [json_name = "readUnits"]; * @return Whether the readUnits field is set. */ boolean hasReadUnits(); @@ -22,7 +23,7 @@ public interface UsageOrBuilder extends * The number of read units consumed by this operation. * * - * optional uint32 read_units = 1; + * optional uint32 read_units = 1 [json_name = "readUnits"]; * @return The readUnits. */ int getReadUnits(); diff --git a/src/main/java/io/pinecone/proto/Vector.java b/src/main/java/io/pinecone/proto/Vector.java index 7d3f8a15..ea090371 100644 --- a/src/main/java/io/pinecone/proto/Vector.java +++ b/src/main/java/io/pinecone/proto/Vector.java @@ -1,19 +1,29 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; /** * Protobuf type {@code Vector} */ public final class Vector extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:Vector) VectorOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + Vector.class.getName()); + } // Use Vector.newBuilder() to construct. - private Vector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Vector(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Vector() { @@ -21,22 +31,15 @@ private Vector() { values_ = emptyFloatList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Vector(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_Vector_descriptor; + return io.pinecone.proto.DbData202501.internal_static_Vector_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_Vector_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_Vector_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.Vector.class, io.pinecone.proto.Vector.Builder.class); } @@ -50,7 +53,7 @@ protected java.lang.Object newInstance( * This is the vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @return The id. */ @java.lang.Override @@ -71,7 +74,7 @@ public java.lang.String getId() { * This is the vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @return The bytes for id. */ @java.lang.Override @@ -98,7 +101,7 @@ public java.lang.String getId() { * This is the vector data included in the request. * * - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values"]; * @return A list containing the values. */ @java.lang.Override @@ -111,7 +114,7 @@ public java.lang.String getId() { * This is the vector data included in the request. * * - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values"]; * @return The count of values. */ public int getValuesCount() { @@ -122,7 +125,7 @@ public int getValuesCount() { * This is the vector data included in the request. * * - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values"]; * @param index The index of the element to return. * @return The values at the given index. */ @@ -134,7 +137,11 @@ public float getValues(int index) { public static final int SPARSE_VALUES_FIELD_NUMBER = 4; private io.pinecone.proto.SparseValues sparseValues_; /** - * .SparseValues sparse_values = 4; + *
+   * This is the sparse data included in the request. Can only be specified if `sparse` index.
+   * 
+ * + * .SparseValues sparse_values = 4 [json_name = "sparseValues"]; * @return Whether the sparseValues field is set. */ @java.lang.Override @@ -142,7 +149,11 @@ public boolean hasSparseValues() { return ((bitField0_ & 0x00000001) != 0); } /** - * .SparseValues sparse_values = 4; + *
+   * This is the sparse data included in the request. Can only be specified if `sparse` index.
+   * 
+ * + * .SparseValues sparse_values = 4 [json_name = "sparseValues"]; * @return The sparseValues. */ @java.lang.Override @@ -150,7 +161,11 @@ public io.pinecone.proto.SparseValues getSparseValues() { return sparseValues_ == null ? io.pinecone.proto.SparseValues.getDefaultInstance() : sparseValues_; } /** - * .SparseValues sparse_values = 4; + *
+   * This is the sparse data included in the request. Can only be specified if `sparse` index.
+   * 
+ * + * .SparseValues sparse_values = 4 [json_name = "sparseValues"]; */ @java.lang.Override public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { @@ -164,7 +179,7 @@ public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { * This is the metadata included in the request. * * - * .google.protobuf.Struct metadata = 3; + * .google.protobuf.Struct metadata = 3 [json_name = "metadata"]; * @return Whether the metadata field is set. */ @java.lang.Override @@ -176,7 +191,7 @@ public boolean hasMetadata() { * This is the metadata included in the request. * * - * .google.protobuf.Struct metadata = 3; + * .google.protobuf.Struct metadata = 3 [json_name = "metadata"]; * @return The metadata. */ @java.lang.Override @@ -188,7 +203,7 @@ public com.google.protobuf.Struct getMetadata() { * This is the metadata included in the request. * * - * .google.protobuf.Struct metadata = 3; + * .google.protobuf.Struct metadata = 3 [json_name = "metadata"]; */ @java.lang.Override public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { @@ -210,8 +225,8 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); } if (getValuesList().size() > 0) { output.writeUInt32NoTag(18); @@ -235,8 +250,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); } { int dataSize = 0; @@ -350,20 +365,20 @@ public static io.pinecone.proto.Vector parseFrom( } public static io.pinecone.proto.Vector parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.Vector parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.Vector parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -371,20 +386,20 @@ public static io.pinecone.proto.Vector parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.pinecone.proto.Vector parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static io.pinecone.proto.Vector parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -404,7 +419,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -412,18 +427,18 @@ protected Builder newBuilderForType( * Protobuf type {@code Vector} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:Vector) io.pinecone.proto.VectorOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_Vector_descriptor; + return io.pinecone.proto.DbData202501.internal_static_Vector_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_Vector_fieldAccessorTable + return io.pinecone.proto.DbData202501.internal_static_Vector_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.Vector.class, io.pinecone.proto.Vector.Builder.class); } @@ -434,12 +449,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getSparseValuesFieldBuilder(); getMetadataFieldBuilder(); @@ -467,7 +482,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.pinecone.proto.VectorServiceOuterClass.internal_static_Vector_descriptor; + return io.pinecone.proto.DbData202501.internal_static_Vector_descriptor; } @java.lang.Override @@ -517,38 +532,6 @@ private void buildPartial0(io.pinecone.proto.Vector result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.pinecone.proto.Vector) { @@ -668,7 +651,7 @@ public Builder mergeFrom( * This is the vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @return The id. */ public java.lang.String getId() { @@ -688,7 +671,7 @@ public java.lang.String getId() { * This is the vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @return The bytes for id. */ public com.google.protobuf.ByteString @@ -709,7 +692,7 @@ public java.lang.String getId() { * This is the vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @param value The id to set. * @return This builder for chaining. */ @@ -726,7 +709,7 @@ public Builder setId( * This is the vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @return This builder for chaining. */ public Builder clearId() { @@ -740,7 +723,7 @@ public Builder clearId() { * This is the vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @param value The bytes for id to set. * @return This builder for chaining. */ @@ -772,7 +755,7 @@ private void ensureValuesIsMutable(int capacity) { * This is the vector data included in the request. * * - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values"]; * @return A list containing the values. */ public java.util.List @@ -785,7 +768,7 @@ private void ensureValuesIsMutable(int capacity) { * This is the vector data included in the request. * * - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values"]; * @return The count of values. */ public int getValuesCount() { @@ -796,7 +779,7 @@ public int getValuesCount() { * This is the vector data included in the request. * * - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values"]; * @param index The index of the element to return. * @return The values at the given index. */ @@ -808,7 +791,7 @@ public float getValues(int index) { * This is the vector data included in the request. * * - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values"]; * @param index The index to set the value at. * @param value The values to set. * @return This builder for chaining. @@ -827,7 +810,7 @@ public Builder setValues( * This is the vector data included in the request. * * - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values"]; * @param value The values to add. * @return This builder for chaining. */ @@ -844,7 +827,7 @@ public Builder addValues(float value) { * This is the vector data included in the request. * * - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values"]; * @param values The values to add. * @return This builder for chaining. */ @@ -862,7 +845,7 @@ public Builder addAllValues( * This is the vector data included in the request. * * - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values"]; * @return This builder for chaining. */ public Builder clearValues() { @@ -873,17 +856,25 @@ public Builder clearValues() { } private io.pinecone.proto.SparseValues sparseValues_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder> sparseValuesBuilder_; /** - * .SparseValues sparse_values = 4; + *
+     * This is the sparse data included in the request. Can only be specified if `sparse` index.
+     * 
+ * + * .SparseValues sparse_values = 4 [json_name = "sparseValues"]; * @return Whether the sparseValues field is set. */ public boolean hasSparseValues() { return ((bitField0_ & 0x00000004) != 0); } /** - * .SparseValues sparse_values = 4; + *
+     * This is the sparse data included in the request. Can only be specified if `sparse` index.
+     * 
+ * + * .SparseValues sparse_values = 4 [json_name = "sparseValues"]; * @return The sparseValues. */ public io.pinecone.proto.SparseValues getSparseValues() { @@ -894,7 +885,11 @@ public io.pinecone.proto.SparseValues getSparseValues() { } } /** - * .SparseValues sparse_values = 4; + *
+     * This is the sparse data included in the request. Can only be specified if `sparse` index.
+     * 
+ * + * .SparseValues sparse_values = 4 [json_name = "sparseValues"]; */ public Builder setSparseValues(io.pinecone.proto.SparseValues value) { if (sparseValuesBuilder_ == null) { @@ -910,7 +905,11 @@ public Builder setSparseValues(io.pinecone.proto.SparseValues value) { return this; } /** - * .SparseValues sparse_values = 4; + *
+     * This is the sparse data included in the request. Can only be specified if `sparse` index.
+     * 
+ * + * .SparseValues sparse_values = 4 [json_name = "sparseValues"]; */ public Builder setSparseValues( io.pinecone.proto.SparseValues.Builder builderForValue) { @@ -924,7 +923,11 @@ public Builder setSparseValues( return this; } /** - * .SparseValues sparse_values = 4; + *
+     * This is the sparse data included in the request. Can only be specified if `sparse` index.
+     * 
+ * + * .SparseValues sparse_values = 4 [json_name = "sparseValues"]; */ public Builder mergeSparseValues(io.pinecone.proto.SparseValues value) { if (sparseValuesBuilder_ == null) { @@ -945,7 +948,11 @@ public Builder mergeSparseValues(io.pinecone.proto.SparseValues value) { return this; } /** - * .SparseValues sparse_values = 4; + *
+     * This is the sparse data included in the request. Can only be specified if `sparse` index.
+     * 
+ * + * .SparseValues sparse_values = 4 [json_name = "sparseValues"]; */ public Builder clearSparseValues() { bitField0_ = (bitField0_ & ~0x00000004); @@ -958,7 +965,11 @@ public Builder clearSparseValues() { return this; } /** - * .SparseValues sparse_values = 4; + *
+     * This is the sparse data included in the request. Can only be specified if `sparse` index.
+     * 
+ * + * .SparseValues sparse_values = 4 [json_name = "sparseValues"]; */ public io.pinecone.proto.SparseValues.Builder getSparseValuesBuilder() { bitField0_ |= 0x00000004; @@ -966,7 +977,11 @@ public io.pinecone.proto.SparseValues.Builder getSparseValuesBuilder() { return getSparseValuesFieldBuilder().getBuilder(); } /** - * .SparseValues sparse_values = 4; + *
+     * This is the sparse data included in the request. Can only be specified if `sparse` index.
+     * 
+ * + * .SparseValues sparse_values = 4 [json_name = "sparseValues"]; */ public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { if (sparseValuesBuilder_ != null) { @@ -977,13 +992,17 @@ public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { } } /** - * .SparseValues sparse_values = 4; + *
+     * This is the sparse data included in the request. Can only be specified if `sparse` index.
+     * 
+ * + * .SparseValues sparse_values = 4 [json_name = "sparseValues"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder> getSparseValuesFieldBuilder() { if (sparseValuesBuilder_ == null) { - sparseValuesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + sparseValuesBuilder_ = new com.google.protobuf.SingleFieldBuilder< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder>( getSparseValues(), getParentForChildren(), @@ -994,14 +1013,14 @@ public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { } private com.google.protobuf.Struct metadata_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> metadataBuilder_; /** *
      * This is the metadata included in the request.
      * 
* - * .google.protobuf.Struct metadata = 3; + * .google.protobuf.Struct metadata = 3 [json_name = "metadata"]; * @return Whether the metadata field is set. */ public boolean hasMetadata() { @@ -1012,7 +1031,7 @@ public boolean hasMetadata() { * This is the metadata included in the request. * * - * .google.protobuf.Struct metadata = 3; + * .google.protobuf.Struct metadata = 3 [json_name = "metadata"]; * @return The metadata. */ public com.google.protobuf.Struct getMetadata() { @@ -1027,7 +1046,7 @@ public com.google.protobuf.Struct getMetadata() { * This is the metadata included in the request. * * - * .google.protobuf.Struct metadata = 3; + * .google.protobuf.Struct metadata = 3 [json_name = "metadata"]; */ public Builder setMetadata(com.google.protobuf.Struct value) { if (metadataBuilder_ == null) { @@ -1047,7 +1066,7 @@ public Builder setMetadata(com.google.protobuf.Struct value) { * This is the metadata included in the request. * * - * .google.protobuf.Struct metadata = 3; + * .google.protobuf.Struct metadata = 3 [json_name = "metadata"]; */ public Builder setMetadata( com.google.protobuf.Struct.Builder builderForValue) { @@ -1065,7 +1084,7 @@ public Builder setMetadata( * This is the metadata included in the request. * * - * .google.protobuf.Struct metadata = 3; + * .google.protobuf.Struct metadata = 3 [json_name = "metadata"]; */ public Builder mergeMetadata(com.google.protobuf.Struct value) { if (metadataBuilder_ == null) { @@ -1090,7 +1109,7 @@ public Builder mergeMetadata(com.google.protobuf.Struct value) { * This is the metadata included in the request. * * - * .google.protobuf.Struct metadata = 3; + * .google.protobuf.Struct metadata = 3 [json_name = "metadata"]; */ public Builder clearMetadata() { bitField0_ = (bitField0_ & ~0x00000008); @@ -1107,7 +1126,7 @@ public Builder clearMetadata() { * This is the metadata included in the request. * * - * .google.protobuf.Struct metadata = 3; + * .google.protobuf.Struct metadata = 3 [json_name = "metadata"]; */ public com.google.protobuf.Struct.Builder getMetadataBuilder() { bitField0_ |= 0x00000008; @@ -1119,7 +1138,7 @@ public com.google.protobuf.Struct.Builder getMetadataBuilder() { * This is the metadata included in the request. * * - * .google.protobuf.Struct metadata = 3; + * .google.protobuf.Struct metadata = 3 [json_name = "metadata"]; */ public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { if (metadataBuilder_ != null) { @@ -1134,13 +1153,13 @@ public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { * This is the metadata included in the request. * * - * .google.protobuf.Struct metadata = 3; + * .google.protobuf.Struct metadata = 3 [json_name = "metadata"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> getMetadataFieldBuilder() { if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( getMetadata(), getParentForChildren(), @@ -1149,18 +1168,6 @@ public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { } return metadataBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:Vector) } diff --git a/src/main/java/io/pinecone/proto/VectorOrBuilder.java b/src/main/java/io/pinecone/proto/VectorOrBuilder.java index fa46327b..c2e3d48d 100644 --- a/src/main/java/io/pinecone/proto/VectorOrBuilder.java +++ b/src/main/java/io/pinecone/proto/VectorOrBuilder.java @@ -1,7 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: vector_service.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: db_data_2025-01.proto +// Protobuf Java Version: 4.29.3 -// Protobuf Java Version: 3.25.3 package io.pinecone.proto; public interface VectorOrBuilder extends @@ -13,7 +14,7 @@ public interface VectorOrBuilder extends * This is the vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @return The id. */ java.lang.String getId(); @@ -22,7 +23,7 @@ public interface VectorOrBuilder extends * This is the vector's unique id. * * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [json_name = "id", (.google.api.field_behavior) = REQUIRED]; * @return The bytes for id. */ com.google.protobuf.ByteString @@ -33,7 +34,7 @@ public interface VectorOrBuilder extends * This is the vector data included in the request. * * - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values"]; * @return A list containing the values. */ java.util.List getValuesList(); @@ -42,7 +43,7 @@ public interface VectorOrBuilder extends * This is the vector data included in the request. * * - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values"]; * @return The count of values. */ int getValuesCount(); @@ -51,24 +52,36 @@ public interface VectorOrBuilder extends * This is the vector data included in the request. * * - * repeated float values = 2 [(.google.api.field_behavior) = REQUIRED]; + * repeated float values = 2 [json_name = "values"]; * @param index The index of the element to return. * @return The values at the given index. */ float getValues(int index); /** - * .SparseValues sparse_values = 4; + *
+   * This is the sparse data included in the request. Can only be specified if `sparse` index.
+   * 
+ * + * .SparseValues sparse_values = 4 [json_name = "sparseValues"]; * @return Whether the sparseValues field is set. */ boolean hasSparseValues(); /** - * .SparseValues sparse_values = 4; + *
+   * This is the sparse data included in the request. Can only be specified if `sparse` index.
+   * 
+ * + * .SparseValues sparse_values = 4 [json_name = "sparseValues"]; * @return The sparseValues. */ io.pinecone.proto.SparseValues getSparseValues(); /** - * .SparseValues sparse_values = 4; + *
+   * This is the sparse data included in the request. Can only be specified if `sparse` index.
+   * 
+ * + * .SparseValues sparse_values = 4 [json_name = "sparseValues"]; */ io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder(); @@ -77,7 +90,7 @@ public interface VectorOrBuilder extends * This is the metadata included in the request. * * - * .google.protobuf.Struct metadata = 3; + * .google.protobuf.Struct metadata = 3 [json_name = "metadata"]; * @return Whether the metadata field is set. */ boolean hasMetadata(); @@ -86,7 +99,7 @@ public interface VectorOrBuilder extends * This is the metadata included in the request. * * - * .google.protobuf.Struct metadata = 3; + * .google.protobuf.Struct metadata = 3 [json_name = "metadata"]; * @return The metadata. */ com.google.protobuf.Struct getMetadata(); @@ -95,7 +108,7 @@ public interface VectorOrBuilder extends * This is the metadata included in the request. * * - * .google.protobuf.Struct metadata = 3; + * .google.protobuf.Struct metadata = 3 [json_name = "metadata"]; */ com.google.protobuf.StructOrBuilder getMetadataOrBuilder(); } diff --git a/src/main/java/io/pinecone/proto/VectorServiceGrpc.java b/src/main/java/io/pinecone/proto/VectorServiceGrpc.java index 00ab4541..e8efe2b3 100644 --- a/src/main/java/io/pinecone/proto/VectorServiceGrpc.java +++ b/src/main/java/io/pinecone/proto/VectorServiceGrpc.java @@ -9,8 +9,8 @@ * */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.62.2)", - comments = "Source: vector_service.proto") + value = "by gRPC proto compiler (version 1.69.1)", + comments = "Source: db_data_2025-01.proto") @io.grpc.stub.annotations.GrpcGenerated public final class VectorServiceGrpc { @@ -291,8 +291,8 @@ public interface AsyncService { /** *
      * Upsert vectors
-     * The `upsert` operation writes vectors into a namespace. If a new value is upserted for an existing vector ID, it will overwrite the previous value.
-     * For guidance and examples, see [Upsert data](https://docs.pinecone.io/docs/upsert-data).
+     * Writes vectors into a namespace. If a new value is upserted for an existing vector ID, it will overwrite the previous value.
+     * For guidance and examples, see [Upsert data](https://docs.pinecone.io/guides/data/upsert-data).
      * 
*/ default void upsert(io.pinecone.proto.UpsertRequest request, @@ -303,8 +303,8 @@ default void upsert(io.pinecone.proto.UpsertRequest request, /** *
      * Delete vectors
-     * The `delete` operation deletes vectors, by id, from a single namespace.
-     * For guidance and examples, see [Delete data](https://docs.pinecone.io/docs/delete-data).
+     * Delete vectors by id from a single namespace.
+     * For guidance and examples, see [Delete data](https://docs.pinecone.io/guides/data/delete-data).
      * 
*/ default void delete(io.pinecone.proto.DeleteRequest request, @@ -315,8 +315,8 @@ default void delete(io.pinecone.proto.DeleteRequest request, /** *
      * Fetch vectors
-     * The `fetch` operation looks up and returns vectors, by ID, from a single namespace. The returned vectors include the vector data and/or metadata.
-     * For guidance and examples, see [Fetch data](https://docs.pinecone.io/reference/fetch).
+     * Look up and returns vectors by ID from a single namespace. The returned vectors include the vector data and/or metadata.
+     * For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/data/fetch-data).
      * 
*/ default void fetch(io.pinecone.proto.FetchRequest request, @@ -327,10 +327,10 @@ default void fetch(io.pinecone.proto.FetchRequest request, /** *
      * List vector IDs
-     * The `list` operation lists the IDs of vectors in a single namespace of a serverless index. An optional prefix can be passed to limit the results to IDs with a common prefix.
-     * `list` returns up to 100 IDs at a time by default in sorted order (bitwise/"C" collation). If the `limit` parameter is set, `list` returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of IDs. When the response does not include a `pagination_token`, there are no more IDs to return.
-     * For guidance and examples, see [Get record IDs](https://docs.pinecone.io/docs/get-record-ids).
-     * **Note:** `list` is supported only for serverless indexes.
+     * List the IDs of vectors in a single namespace of a serverless index. An optional prefix can be passed to limit the results to IDs with a common prefix.
+     * This returns up to 100 IDs at a time by default in sorted order (bitwise/"C" collation). If the `limit` parameter is set, `list` returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of IDs. When the response does not include a `pagination_token`, there are no more IDs to return.
+     * For guidance and examples, see [List record IDs](https://docs.pinecone.io/guides/data/list-record-ids).
+     * **Note:** This is supported only for serverless indexes.
      * 
*/ default void list(io.pinecone.proto.ListRequest request, @@ -341,8 +341,8 @@ default void list(io.pinecone.proto.ListRequest request, /** *
      * Query vectors
-     * The `query` operation searches a namespace, using a query vector. It retrieves the ids of the most similar items in a namespace, along with their similarity scores.
-     * For guidance and examples, see [Query data](https://docs.pinecone.io/docs/query-data).
+     * Searches a namespace, using a query vector. It retrieves the ids of the most similar items in a namespace, along with their similarity scores.
+     * For guidance and examples, see [Query data](https://docs.pinecone.io/guides/data/query-data).
      * 
*/ default void query(io.pinecone.proto.QueryRequest request, @@ -353,8 +353,8 @@ default void query(io.pinecone.proto.QueryRequest request, /** *
      * Update a vector
-     * The `update` operation updates a vector in a namespace. If a value is included, it will overwrite the previous value. If a `set_metadata` is included, the values of the fields specified in it will be added or overwrite the previous value.
-     * For guidance and examples, see [Update data](https://docs.pinecone.io/reference/update).
+     * Update a vector in a namespace. If a value is included, it will overwrite the previous value. If a `set_metadata` is included, the values of the fields specified in it will be added or overwrite the previous value.
+     * For guidance and examples, see [Update data](https://docs.pinecone.io/guides/data/update-data).
      * 
*/ default void update(io.pinecone.proto.UpdateRequest request, @@ -365,9 +365,8 @@ default void update(io.pinecone.proto.UpdateRequest request, /** *
      * Get index stats
-     * The `describe_index_stats` operation returns statistics about the contents of an index, including the vector count per namespace and the number of dimensions, and the index fullness.
+     * Return statistics about the contents of an index, including the vector count per namespace, the number of dimensions, and the index fullness.
      * Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes.
-     * For pod-based indexes, the index fullness result may be inaccurate during pod resizing; to get the status of a pod resizing process, use [`describe_index`](https://www.pinecone.io/docs/api/operation/describe_index/).
      * 
*/ default void describeIndexStats(io.pinecone.proto.DescribeIndexStatsRequest request, @@ -414,8 +413,8 @@ protected VectorServiceStub build( /** *
      * Upsert vectors
-     * The `upsert` operation writes vectors into a namespace. If a new value is upserted for an existing vector ID, it will overwrite the previous value.
-     * For guidance and examples, see [Upsert data](https://docs.pinecone.io/docs/upsert-data).
+     * Writes vectors into a namespace. If a new value is upserted for an existing vector ID, it will overwrite the previous value.
+     * For guidance and examples, see [Upsert data](https://docs.pinecone.io/guides/data/upsert-data).
      * 
*/ public void upsert(io.pinecone.proto.UpsertRequest request, @@ -427,8 +426,8 @@ public void upsert(io.pinecone.proto.UpsertRequest request, /** *
      * Delete vectors
-     * The `delete` operation deletes vectors, by id, from a single namespace.
-     * For guidance and examples, see [Delete data](https://docs.pinecone.io/docs/delete-data).
+     * Delete vectors by id from a single namespace.
+     * For guidance and examples, see [Delete data](https://docs.pinecone.io/guides/data/delete-data).
      * 
*/ public void delete(io.pinecone.proto.DeleteRequest request, @@ -440,8 +439,8 @@ public void delete(io.pinecone.proto.DeleteRequest request, /** *
      * Fetch vectors
-     * The `fetch` operation looks up and returns vectors, by ID, from a single namespace. The returned vectors include the vector data and/or metadata.
-     * For guidance and examples, see [Fetch data](https://docs.pinecone.io/reference/fetch).
+     * Look up and returns vectors by ID from a single namespace. The returned vectors include the vector data and/or metadata.
+     * For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/data/fetch-data).
      * 
*/ public void fetch(io.pinecone.proto.FetchRequest request, @@ -453,10 +452,10 @@ public void fetch(io.pinecone.proto.FetchRequest request, /** *
      * List vector IDs
-     * The `list` operation lists the IDs of vectors in a single namespace of a serverless index. An optional prefix can be passed to limit the results to IDs with a common prefix.
-     * `list` returns up to 100 IDs at a time by default in sorted order (bitwise/"C" collation). If the `limit` parameter is set, `list` returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of IDs. When the response does not include a `pagination_token`, there are no more IDs to return.
-     * For guidance and examples, see [Get record IDs](https://docs.pinecone.io/docs/get-record-ids).
-     * **Note:** `list` is supported only for serverless indexes.
+     * List the IDs of vectors in a single namespace of a serverless index. An optional prefix can be passed to limit the results to IDs with a common prefix.
+     * This returns up to 100 IDs at a time by default in sorted order (bitwise/"C" collation). If the `limit` parameter is set, `list` returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of IDs. When the response does not include a `pagination_token`, there are no more IDs to return.
+     * For guidance and examples, see [List record IDs](https://docs.pinecone.io/guides/data/list-record-ids).
+     * **Note:** This is supported only for serverless indexes.
      * 
*/ public void list(io.pinecone.proto.ListRequest request, @@ -468,8 +467,8 @@ public void list(io.pinecone.proto.ListRequest request, /** *
      * Query vectors
-     * The `query` operation searches a namespace, using a query vector. It retrieves the ids of the most similar items in a namespace, along with their similarity scores.
-     * For guidance and examples, see [Query data](https://docs.pinecone.io/docs/query-data).
+     * Searches a namespace, using a query vector. It retrieves the ids of the most similar items in a namespace, along with their similarity scores.
+     * For guidance and examples, see [Query data](https://docs.pinecone.io/guides/data/query-data).
      * 
*/ public void query(io.pinecone.proto.QueryRequest request, @@ -481,8 +480,8 @@ public void query(io.pinecone.proto.QueryRequest request, /** *
      * Update a vector
-     * The `update` operation updates a vector in a namespace. If a value is included, it will overwrite the previous value. If a `set_metadata` is included, the values of the fields specified in it will be added or overwrite the previous value.
-     * For guidance and examples, see [Update data](https://docs.pinecone.io/reference/update).
+     * Update a vector in a namespace. If a value is included, it will overwrite the previous value. If a `set_metadata` is included, the values of the fields specified in it will be added or overwrite the previous value.
+     * For guidance and examples, see [Update data](https://docs.pinecone.io/guides/data/update-data).
      * 
*/ public void update(io.pinecone.proto.UpdateRequest request, @@ -494,9 +493,8 @@ public void update(io.pinecone.proto.UpdateRequest request, /** *
      * Get index stats
-     * The `describe_index_stats` operation returns statistics about the contents of an index, including the vector count per namespace and the number of dimensions, and the index fullness.
+     * Return statistics about the contents of an index, including the vector count per namespace, the number of dimensions, and the index fullness.
      * Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes.
-     * For pod-based indexes, the index fullness result may be inaccurate during pod resizing; to get the status of a pod resizing process, use [`describe_index`](https://www.pinecone.io/docs/api/operation/describe_index/).
      * 
*/ public void describeIndexStats(io.pinecone.proto.DescribeIndexStatsRequest request, @@ -529,8 +527,8 @@ protected VectorServiceBlockingStub build( /** *
      * Upsert vectors
-     * The `upsert` operation writes vectors into a namespace. If a new value is upserted for an existing vector ID, it will overwrite the previous value.
-     * For guidance and examples, see [Upsert data](https://docs.pinecone.io/docs/upsert-data).
+     * Writes vectors into a namespace. If a new value is upserted for an existing vector ID, it will overwrite the previous value.
+     * For guidance and examples, see [Upsert data](https://docs.pinecone.io/guides/data/upsert-data).
      * 
*/ public io.pinecone.proto.UpsertResponse upsert(io.pinecone.proto.UpsertRequest request) { @@ -541,8 +539,8 @@ public io.pinecone.proto.UpsertResponse upsert(io.pinecone.proto.UpsertRequest r /** *
      * Delete vectors
-     * The `delete` operation deletes vectors, by id, from a single namespace.
-     * For guidance and examples, see [Delete data](https://docs.pinecone.io/docs/delete-data).
+     * Delete vectors by id from a single namespace.
+     * For guidance and examples, see [Delete data](https://docs.pinecone.io/guides/data/delete-data).
      * 
*/ public io.pinecone.proto.DeleteResponse delete(io.pinecone.proto.DeleteRequest request) { @@ -553,8 +551,8 @@ public io.pinecone.proto.DeleteResponse delete(io.pinecone.proto.DeleteRequest r /** *
      * Fetch vectors
-     * The `fetch` operation looks up and returns vectors, by ID, from a single namespace. The returned vectors include the vector data and/or metadata.
-     * For guidance and examples, see [Fetch data](https://docs.pinecone.io/reference/fetch).
+     * Look up and returns vectors by ID from a single namespace. The returned vectors include the vector data and/or metadata.
+     * For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/data/fetch-data).
      * 
*/ public io.pinecone.proto.FetchResponse fetch(io.pinecone.proto.FetchRequest request) { @@ -565,10 +563,10 @@ public io.pinecone.proto.FetchResponse fetch(io.pinecone.proto.FetchRequest requ /** *
      * List vector IDs
-     * The `list` operation lists the IDs of vectors in a single namespace of a serverless index. An optional prefix can be passed to limit the results to IDs with a common prefix.
-     * `list` returns up to 100 IDs at a time by default in sorted order (bitwise/"C" collation). If the `limit` parameter is set, `list` returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of IDs. When the response does not include a `pagination_token`, there are no more IDs to return.
-     * For guidance and examples, see [Get record IDs](https://docs.pinecone.io/docs/get-record-ids).
-     * **Note:** `list` is supported only for serverless indexes.
+     * List the IDs of vectors in a single namespace of a serverless index. An optional prefix can be passed to limit the results to IDs with a common prefix.
+     * This returns up to 100 IDs at a time by default in sorted order (bitwise/"C" collation). If the `limit` parameter is set, `list` returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of IDs. When the response does not include a `pagination_token`, there are no more IDs to return.
+     * For guidance and examples, see [List record IDs](https://docs.pinecone.io/guides/data/list-record-ids).
+     * **Note:** This is supported only for serverless indexes.
      * 
*/ public io.pinecone.proto.ListResponse list(io.pinecone.proto.ListRequest request) { @@ -579,8 +577,8 @@ public io.pinecone.proto.ListResponse list(io.pinecone.proto.ListRequest request /** *
      * Query vectors
-     * The `query` operation searches a namespace, using a query vector. It retrieves the ids of the most similar items in a namespace, along with their similarity scores.
-     * For guidance and examples, see [Query data](https://docs.pinecone.io/docs/query-data).
+     * Searches a namespace, using a query vector. It retrieves the ids of the most similar items in a namespace, along with their similarity scores.
+     * For guidance and examples, see [Query data](https://docs.pinecone.io/guides/data/query-data).
      * 
*/ public io.pinecone.proto.QueryResponse query(io.pinecone.proto.QueryRequest request) { @@ -591,8 +589,8 @@ public io.pinecone.proto.QueryResponse query(io.pinecone.proto.QueryRequest requ /** *
      * Update a vector
-     * The `update` operation updates a vector in a namespace. If a value is included, it will overwrite the previous value. If a `set_metadata` is included, the values of the fields specified in it will be added or overwrite the previous value.
-     * For guidance and examples, see [Update data](https://docs.pinecone.io/reference/update).
+     * Update a vector in a namespace. If a value is included, it will overwrite the previous value. If a `set_metadata` is included, the values of the fields specified in it will be added or overwrite the previous value.
+     * For guidance and examples, see [Update data](https://docs.pinecone.io/guides/data/update-data).
      * 
*/ public io.pinecone.proto.UpdateResponse update(io.pinecone.proto.UpdateRequest request) { @@ -603,9 +601,8 @@ public io.pinecone.proto.UpdateResponse update(io.pinecone.proto.UpdateRequest r /** *
      * Get index stats
-     * The `describe_index_stats` operation returns statistics about the contents of an index, including the vector count per namespace and the number of dimensions, and the index fullness.
+     * Return statistics about the contents of an index, including the vector count per namespace, the number of dimensions, and the index fullness.
      * Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes.
-     * For pod-based indexes, the index fullness result may be inaccurate during pod resizing; to get the status of a pod resizing process, use [`describe_index`](https://www.pinecone.io/docs/api/operation/describe_index/).
      * 
*/ public io.pinecone.proto.DescribeIndexStatsResponse describeIndexStats(io.pinecone.proto.DescribeIndexStatsRequest request) { @@ -637,8 +634,8 @@ protected VectorServiceFutureStub build( /** *
      * Upsert vectors
-     * The `upsert` operation writes vectors into a namespace. If a new value is upserted for an existing vector ID, it will overwrite the previous value.
-     * For guidance and examples, see [Upsert data](https://docs.pinecone.io/docs/upsert-data).
+     * Writes vectors into a namespace. If a new value is upserted for an existing vector ID, it will overwrite the previous value.
+     * For guidance and examples, see [Upsert data](https://docs.pinecone.io/guides/data/upsert-data).
      * 
*/ public com.google.common.util.concurrent.ListenableFuture upsert( @@ -650,8 +647,8 @@ public com.google.common.util.concurrent.ListenableFuture * Delete vectors - * The `delete` operation deletes vectors, by id, from a single namespace. - * For guidance and examples, see [Delete data](https://docs.pinecone.io/docs/delete-data). + * Delete vectors by id from a single namespace. + * For guidance and examples, see [Delete data](https://docs.pinecone.io/guides/data/delete-data). * */ public com.google.common.util.concurrent.ListenableFuture delete( @@ -663,8 +660,8 @@ public com.google.common.util.concurrent.ListenableFuture * Fetch vectors - * The `fetch` operation looks up and returns vectors, by ID, from a single namespace. The returned vectors include the vector data and/or metadata. - * For guidance and examples, see [Fetch data](https://docs.pinecone.io/reference/fetch). + * Look up and returns vectors by ID from a single namespace. The returned vectors include the vector data and/or metadata. + * For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/data/fetch-data). * */ public com.google.common.util.concurrent.ListenableFuture fetch( @@ -676,10 +673,10 @@ public com.google.common.util.concurrent.ListenableFuture * List vector IDs - * The `list` operation lists the IDs of vectors in a single namespace of a serverless index. An optional prefix can be passed to limit the results to IDs with a common prefix. - * `list` returns up to 100 IDs at a time by default in sorted order (bitwise/"C" collation). If the `limit` parameter is set, `list` returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of IDs. When the response does not include a `pagination_token`, there are no more IDs to return. - * For guidance and examples, see [Get record IDs](https://docs.pinecone.io/docs/get-record-ids). - * **Note:** `list` is supported only for serverless indexes. + * List the IDs of vectors in a single namespace of a serverless index. An optional prefix can be passed to limit the results to IDs with a common prefix. + * This returns up to 100 IDs at a time by default in sorted order (bitwise/"C" collation). If the `limit` parameter is set, `list` returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of IDs. When the response does not include a `pagination_token`, there are no more IDs to return. + * For guidance and examples, see [List record IDs](https://docs.pinecone.io/guides/data/list-record-ids). + * **Note:** This is supported only for serverless indexes. * */ public com.google.common.util.concurrent.ListenableFuture list( @@ -691,8 +688,8 @@ public com.google.common.util.concurrent.ListenableFuture * Query vectors - * The `query` operation searches a namespace, using a query vector. It retrieves the ids of the most similar items in a namespace, along with their similarity scores. - * For guidance and examples, see [Query data](https://docs.pinecone.io/docs/query-data). + * Searches a namespace, using a query vector. It retrieves the ids of the most similar items in a namespace, along with their similarity scores. + * For guidance and examples, see [Query data](https://docs.pinecone.io/guides/data/query-data). * */ public com.google.common.util.concurrent.ListenableFuture query( @@ -704,8 +701,8 @@ public com.google.common.util.concurrent.ListenableFuture * Update a vector - * The `update` operation updates a vector in a namespace. If a value is included, it will overwrite the previous value. If a `set_metadata` is included, the values of the fields specified in it will be added or overwrite the previous value. - * For guidance and examples, see [Update data](https://docs.pinecone.io/reference/update). + * Update a vector in a namespace. If a value is included, it will overwrite the previous value. If a `set_metadata` is included, the values of the fields specified in it will be added or overwrite the previous value. + * For guidance and examples, see [Update data](https://docs.pinecone.io/guides/data/update-data). * */ public com.google.common.util.concurrent.ListenableFuture update( @@ -717,9 +714,8 @@ public com.google.common.util.concurrent.ListenableFuture * Get index stats - * The `describe_index_stats` operation returns statistics about the contents of an index, including the vector count per namespace and the number of dimensions, and the index fullness. + * Return statistics about the contents of an index, including the vector count per namespace, the number of dimensions, and the index fullness. * Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes. - * For pod-based indexes, the index fullness result may be inaccurate during pod resizing; to get the status of a pod resizing process, use [`describe_index`](https://www.pinecone.io/docs/api/operation/describe_index/). * */ public com.google.common.util.concurrent.ListenableFuture describeIndexStats( @@ -858,7 +854,7 @@ private static abstract class VectorServiceBaseDescriptorSupplier @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return io.pinecone.proto.VectorServiceOuterClass.getDescriptor(); + return io.pinecone.proto.DbData202501.getDescriptor(); } @java.lang.Override From fc5f7c08b16c9483df411f913e254204fa18e978 Mon Sep 17 00:00:00 2001 From: Rohan Shah Date: Mon, 3 Feb 2025 11:25:32 -0500 Subject: [PATCH 4/5] Add support to create sparse serverless index method (#175) ## Problem Add support to create sparse serverless index method ## Solution As a part of this PR, added following changes: 1. add createSparseServelessIndex() that doesn't accept dimension and metric as compared to the traditional createServerlessIndex() 2. removed a validation to check for values (part of vector) being null or empty at the time of upsert since values can be an empty array of floats for sparse vector 3. metric is now optional for creating serverless index and will default to cosine for dense index 4. added integration tests ## Type of Change - [ ] Bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update - [ ] Infrastructure change (CI configs, etc) - [ ] Non-code change (docs, etc) - [ ] None of the above: (explain here) ## Test Plan Added integration tests --- README.md | 27 ++++- .../serverless/SparseIndexTest.java | 110 ++++++++++++++++++ .../dataPlane/UpsertErrorTest.java | 24 +--- .../java/io/pinecone/clients/Pinecone.java | 75 +++++++++++- .../io/pinecone/commons/IndexInterface.java | 6 +- .../pinecone/PineconeIndexOperationsTest.java | 13 --- 6 files changed, 214 insertions(+), 41 deletions(-) create mode 100644 src/integration/java/io/pinecone/integration/controlPlane/serverless/SparseIndexTest.java diff --git a/README.md b/README.md index 5c33f801..ee179996 100644 --- a/README.md +++ b/README.md @@ -162,7 +162,7 @@ Operations related to the building and managing of Pinecone indexes are called [ You can use the Java SDK to create two types of indexes: [serverless indexes](https://docs.pinecone.io/guides/indexes/understanding-indexes#serverless-indexes) (recommended for most use cases) and [pod-based indexes](https://docs.pinecone.io/guides/indexes/understanding-indexes#pod-based-indexes) (recommended for high-throughput use cases). -### Create a serverless index +### Create a dense serverless index The following is an example of creating a serverless index in the `us-west-2` region of AWS. For more information on serverless and regional availability, see [Understanding indexes](https://docs.pinecone.io/guides/indexes/understanding-indexes#serverless-indexes). @@ -187,6 +187,31 @@ tags.put("env", "test"); IndexModel indexModel = pinecone.createServerlessIndex(indexName, similarityMetric, dimension, cloud, region, DeletionProtection.ENABLED, tags); ``` +### Create a sparse serverless index + +The following is an example of creating a sparse serverless index in the `us-east-1` region of AWS. For more information on +serverless and regional availability, see [Understanding indexes](https://docs.pinecone.io/guides/indexes/sparse-indexes). + +```java +import io.pinecone.clients.Pinecone; +import org.openapitools.db_control.client.model.IndexModel; +import org.openapitools.db_control.client.model.DeletionProtection; +import java.util.HashMap; +... + +Pinecone pinecone = new Pinecone.Builder("PINECONE_API_KEY").build(); + +String indexName = "example-index"; +int dimension = 1538; +String cloud = "aws"; +String region = "us-east-1"; +HashMap tags = new HashMap<>(); +tags.put("env", "test"); +String vectorType = "sparse"; + +IndexModel indexModel = pinecone.createSparseServelessIndex(indexName, cloud, region, DeletionProtection.ENABLED, tags, vectorType); +``` + ### Create a pod index The following is a minimal example of creating a pod-based index. For all the possible configuration options, see diff --git a/src/integration/java/io/pinecone/integration/controlPlane/serverless/SparseIndexTest.java b/src/integration/java/io/pinecone/integration/controlPlane/serverless/SparseIndexTest.java new file mode 100644 index 00000000..ee749979 --- /dev/null +++ b/src/integration/java/io/pinecone/integration/controlPlane/serverless/SparseIndexTest.java @@ -0,0 +1,110 @@ +package io.pinecone.integration.controlPlane.serverless; + +import io.pinecone.clients.Index; +import io.pinecone.clients.Pinecone; +import io.pinecone.exceptions.PineconeNotFoundException; +import io.pinecone.helpers.RandomStringBuilder; +import io.pinecone.proto.UpsertResponse; +import io.pinecone.unsigned_indices_model.QueryResponseWithUnsignedIndices; +import org.junit.jupiter.api.*; +import org.openapitools.db_control.client.model.DeletionProtection; +import org.openapitools.db_control.client.model.IndexModel; + +import java.util.*; + +import static io.pinecone.helpers.TestUtilities.waitUntilIndexIsReady; +import static org.junit.jupiter.api.Assertions.*; + +@TestMethodOrder(MethodOrderer.OrderAnnotation.class) +public class SparseIndexTest { + static String indexName; + static Pinecone pinecone; + + @BeforeAll + public static void setUp() throws InterruptedException { + indexName = RandomStringBuilder.build("sparse-index", 8); + pinecone = new Pinecone + .Builder(System.getenv("PINECONE_API_KEY")) + .withSourceTag("pinecone_test") + .build(); + } + + @Test + @Order(1) + public void createSparseIndex() { + Map tags = new HashMap<>(); + tags.put("env", "test"); + + // Create sparse Index + IndexModel indexModel = pinecone.createSparseServelessIndex(indexName, + "aws", + "us-east-1", + DeletionProtection.ENABLED, + tags, + "sparse"); + + assertNotNull(indexModel); + assertEquals(indexName, indexModel.getName()); + assertEquals(IndexModel.MetricEnum.DOTPRODUCT, indexModel.getMetric()); + assertEquals(indexModel.getDeletionProtection(), DeletionProtection.ENABLED); + assertEquals(indexModel.getTags(), tags); + assertEquals(indexModel.getVectorType(), "sparse"); + } + + @Test + @Order(2) + public void configureSparseIndex() throws InterruptedException { + String key = "flag"; + String value = "internal"; + Map tags = new HashMap<>(); + tags.put(key, value); + + // Wait until index is ready + waitUntilIndexIsReady(pinecone, indexName, 200000); + + // Disable deletion protection and add more index tags + pinecone.configureServerlessIndex(indexName, DeletionProtection.DISABLED, tags); + Thread.sleep(7000); + + // Describe index to confirm deletion protection is disabled + IndexModel indexModel = pinecone.describeIndex(indexName); + assertEquals(indexModel.getDeletionProtection(), DeletionProtection.DISABLED); + assert indexModel.getTags() != null; + assertEquals(indexModel.getTags().get(key), value); + } + + @Disabled + // @Order(3) + public void upsertAndQueryVectors() { + Index index = pinecone.getIndexConnection(indexName); + String id = "v1"; + ArrayList indices = new ArrayList<>(); + indices.add(1L); + indices.add(2L); + + ArrayList values = new ArrayList<>(); + values.add(1f); + values.add(2f); + + UpsertResponse upsertResponse = index.upsert("v1", Collections.emptyList(), indices, values, null, ""); + assertEquals(upsertResponse.getUpsertedCount(), 1); + + // Query by vector id + QueryResponseWithUnsignedIndices queryResponse = index.queryByVectorId(1, id, true, false); + assertEquals(queryResponse.getMatchesList().size(), 1); + assertEquals(queryResponse.getMatches(0).getId(), id); + assertEquals(queryResponse.getMatches(0).getSparseValuesWithUnsignedIndices().getIndicesWithUnsigned32IntList(), indices); + assertEquals(queryResponse.getMatches(0).getSparseValuesWithUnsignedIndices().getValuesList(), values); + } + + @Test + @Order(4) + public void deleteSparseIndex() throws InterruptedException { + // Delete sparse index + pinecone.deleteIndex(indexName); + Thread.sleep(5000); + + // Confirm the index is deleted by calling describe index which should return resource not found + assertThrows(PineconeNotFoundException.class, () -> pinecone.describeIndex(indexName)); + } +} diff --git a/src/integration/java/io/pinecone/integration/dataPlane/UpsertErrorTest.java b/src/integration/java/io/pinecone/integration/dataPlane/UpsertErrorTest.java index 1cba4d0a..bbe7351f 100644 --- a/src/integration/java/io/pinecone/integration/dataPlane/UpsertErrorTest.java +++ b/src/integration/java/io/pinecone/integration/dataPlane/UpsertErrorTest.java @@ -48,17 +48,7 @@ public void upsertWithApiKeyMissingSyncTest() { index.upsert(null, values); fail("Expecting invalid upsert request exception"); } catch (PineconeException expected) { - assertEquals(expected.getMessage(), "Invalid upsert request. Please ensure that both id and values are provided."); - } - } - - @Test - public void upsertWhenValuesMissingSyncTest() { - try { - index.upsert("some_id", null); - fail("Expecting invalid upsert request exception"); - } catch (PineconeException expected) { - assertEquals(expected.getMessage(), "Invalid upsert request. Please ensure that both id and values are provided."); + assertEquals(expected.getMessage(), "Invalid upsert request. Please ensure that id is provided."); } } @@ -126,17 +116,7 @@ public void upsertWithApiKeyMissingFutureTest() { asyncIndex.upsert(null, values); fail("Expecting invalid upsert request exception"); } catch (PineconeException expected) { - assertTrue(expected.getMessage().contains("ensure that both id and values are provided.")); - } - } - - @Test - public void upsertWhenValuesMissingFutureTest() { - try { - asyncIndex.upsert("some_id", null); - fail("Expecting invalid upsert request exception"); - } catch (PineconeException expected) { - assertTrue(expected.getMessage().contains("ensure that both id and values are provided.")); + assertTrue(expected.getMessage().contains("ensure that id is provided.")); } } diff --git a/src/main/java/io/pinecone/clients/Pinecone.java b/src/main/java/io/pinecone/clients/Pinecone.java index 7e4e7117..6f10623d 100644 --- a/src/main/java/io/pinecone/clients/Pinecone.java +++ b/src/main/java/io/pinecone/clients/Pinecone.java @@ -87,8 +87,9 @@ public IndexModel createServerlessIndex(String indexName, } if (metric == null || metric.isEmpty()) { - throw new PineconeValidationException("Metric cannot be null or empty. Must be one of " + Arrays.toString(CreateIndexRequest.MetricEnum.values())); + metric = "cosine"; } + try { CreateIndexRequest.MetricEnum.fromValue(metric.toLowerCase()); } catch (IllegalArgumentException e) { @@ -142,6 +143,78 @@ public IndexModel createServerlessIndex(String indexName, return indexModel; } + /** + * Creates a new sparse serverless index. + *

+ * Example: + *

{@code
+     *     client.createServerlessIndex("YOUR-INDEX", "cosine", 1536, "aws", "us-west-2", DeletionProtection.ENABLED);
+     * }
+ * + * @param indexName The name of the index to be created. + * @param cloud The cloud provider for the index. + * @param region The cloud region for the index. + * @param deletionProtection Enable or disable deletion protection for the index. + * @param tags A map of tags to associate with the Index. + * @param vectorType The metric type for the index. Must be one of "cosine", "euclidean", or "dotproduct". + * @return {@link IndexModel} representing the created serverless index. + * @throws PineconeException if the API encounters an error during index creation or if any of the arguments are invalid. + */ + public IndexModel createSparseServelessIndex(String indexName, + String cloud, + String region, + DeletionProtection deletionProtection, + Map tags, + String vectorType) throws PineconeException { + if (indexName == null || indexName.isEmpty()) { + throw new PineconeValidationException("Index name cannot be null or empty"); + } + + if (cloud == null || cloud.isEmpty()) { + throw new PineconeValidationException("Cloud cannot be null or empty. Must be one of " + Arrays.toString(ServerlessSpec.CloudEnum.values())); + } + + try { + ServerlessSpec.CloudEnum.fromValue(cloud.toLowerCase()); + } catch (IllegalArgumentException e) { + throw new PineconeValidationException("Cloud cannot be null or empty. Must be one of " + Arrays.toString(ServerlessSpec.CloudEnum.values())); + } + + if (region == null || region.isEmpty()) { + throw new PineconeValidationException("Region cannot be null or empty"); + } + + if(!vectorType.equalsIgnoreCase("sparse") && !vectorType.equalsIgnoreCase("dense")) { + throw new PineconeValidationException("vectorType must be sparse or dense"); + } + + // Convert user string for "cloud" arg into ServerlessSpec.CloudEnum + ServerlessSpec.CloudEnum cloudProvider = ServerlessSpec.CloudEnum.fromValue(cloud.toLowerCase()); + + ServerlessSpec serverlessSpec = new ServerlessSpec().cloud(cloudProvider).region(region); + IndexSpec createServerlessIndexRequestSpec = new IndexSpec().serverless(serverlessSpec); + + IndexModel indexModel = null; + + try { + CreateIndexRequest createIndexRequest = new CreateIndexRequest() + .name(indexName) + .metric(CreateIndexRequest.MetricEnum.DOTPRODUCT) + .spec(createServerlessIndexRequestSpec) + .deletionProtection(deletionProtection) + .vectorType(vectorType); + + if(tags != null && !tags.isEmpty()) { + createIndexRequest.tags(tags); + } + + indexModel = manageIndexesApi.createIndex(createIndexRequest); + } catch (ApiException apiException) { + handleApiException(apiException); + } + return indexModel; + } + /** * Overload for creating a new pods index with environment and podType, the minimum required parameters. *

diff --git a/src/main/java/io/pinecone/commons/IndexInterface.java b/src/main/java/io/pinecone/commons/IndexInterface.java index 50349362..582d6020 100644 --- a/src/main/java/io/pinecone/commons/IndexInterface.java +++ b/src/main/java/io/pinecone/commons/IndexInterface.java @@ -103,12 +103,10 @@ default Vector buildUpsertVector(String id, List sparseIndices, List sparseValues, Struct metadata) { - if (id == null || id.isEmpty() || values == null || values.isEmpty()) { - throw new PineconeValidationException("Invalid upsert request. Please ensure that both id and values are " + - "provided."); + if (id == null || id.isEmpty()) { + throw new PineconeValidationException("Invalid upsert request. Please ensure that id is provided."); } - Vector.Builder vectorBuilder = Vector.newBuilder() .setId(id) .addAllValues(values); diff --git a/src/test/java/io/pinecone/PineconeIndexOperationsTest.java b/src/test/java/io/pinecone/PineconeIndexOperationsTest.java index cf23a15f..b3932ec0 100644 --- a/src/test/java/io/pinecone/PineconeIndexOperationsTest.java +++ b/src/test/java/io/pinecone/PineconeIndexOperationsTest.java @@ -76,19 +76,6 @@ public void testCreateServerlessIndex() throws IOException { () -> client.createServerlessIndex(null, "cosine", 3, "aws", "us-west-2", DeletionProtection.DISABLED, Collections.EMPTY_MAP)); assertEquals("Index name cannot be null or empty", thrownNullIndexName.getMessage()); - PineconeValidationException thrownEmptyMetric = assertThrows(PineconeValidationException.class, - () -> client.createServerlessIndex("testServerlessIndex", "", 3, "aws", "us-west-2", DeletionProtection.DISABLED, Collections.EMPTY_MAP)); - assertEquals("Metric cannot be null or empty. Must be one of " + Arrays.toString(IndexModel.MetricEnum.values()), thrownEmptyMetric.getMessage()); - - PineconeValidationException thrownInvalidMetric = assertThrows(PineconeValidationException.class, - () -> client.createServerlessIndex("testServerlessIndex", "blah", 3, "aws", "us-west-2", DeletionProtection.DISABLED, Collections.EMPTY_MAP)); - assertEquals(String.format("Metric cannot be null or empty. Must be one of " + Arrays.toString(IndexModel.MetricEnum.values())), thrownInvalidMetric.getMessage()); - - PineconeValidationException thrownNullMetric = assertThrows(PineconeValidationException.class, - () -> client.createServerlessIndex("testServerlessIndex", null, 3, "aws", "us-west-2", DeletionProtection.DISABLED, Collections.EMPTY_MAP)); - assertEquals("Metric cannot be null or empty. Must be one of " + Arrays.toString(IndexModel.MetricEnum.values()), - thrownNullMetric.getMessage()); - PineconeValidationException thrownNegativeDimension = assertThrows(PineconeValidationException.class, () -> client.createServerlessIndex("testServerlessIndex", "cosine", -3, "aws", "us-west-2", DeletionProtection.DISABLED, Collections.EMPTY_MAP)); assertEquals("Dimension must be greater than 0. See limits for more info: https://docs.pinecone.io/reference/limits", thrownNegativeDimension.getMessage()); From a8f86af9fcc7ca0027ac570f7a440f6217ecd5d7 Mon Sep 17 00:00:00 2001 From: Rohan Shah Date: Mon, 3 Feb 2025 12:31:45 -0500 Subject: [PATCH 5/5] Prepare to release Java SDK v4.0.0 (#176) ## Problem Prepare to release Java SDK v4.0.0. ## Solution Releasing a major version requires updating: 1. README 2. gradle.properties 3. CHANGELOG.md 4. Constants.java ## Type of Change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update - [ ] Infrastructure change (CI configs, etc) - [X] Non-code change (docs, etc) - [ ] None of the above: (explain here) ## Test Plan NA --- CHANGELOG.md | 4 ++++ LICENSE | 2 +- README.md | 7 +++---- gradle.properties | 2 +- src/main/java/io/pinecone/commons/Constants.java | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cdbbacd3..02b539a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ [comment]: <> (When bumping [pc:VERSION_LATEST_RELEASE] create a new entry below) ### Unreleased version +### 4.0.0 +- Add support for sparse indexes +- Generate code based on 2025-01 open-api spec + ### 3.1.0 - Add support to pass base url for control and data plane operations diff --git a/LICENSE b/LICENSE index 261eeb9e..075fb106 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright 2023 Pinecone Systems, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index ee179996..679cc02e 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Maven: io.pinecone pinecone-client - 3.0.0 + 4.0.0 ``` @@ -23,12 +23,12 @@ Maven: Gradle: ``` -implementation "io.pinecone:pinecone-client:3.0.0" +implementation "io.pinecone:pinecone-client:4.0.0" ``` [comment]: <> (^ [pc:VERSION_LATEST_RELEASE]) -Alternatively, you can use our standalone uberjar [pinecone-client-3.0.0-all.jar](https://repo1.maven.org/maven2/io/pinecone/pinecone-client/3.0.0/pinecone-client-3.0.0-all.jar), which bundles the Pinecone +Alternatively, you can use our standalone uberjar [pinecone-client-4.0.0-all.jar](https://repo1.maven.org/maven2/io/pinecone/pinecone-client/4.0.0/pinecone-client-4.0.0-all.jar), which bundles the Pinecone SDK and all dependencies together. You can include this in your classpath like you do with any 3rd party JAR without having to obtain the *pinecone-client* dependencies separately. @@ -202,7 +202,6 @@ import java.util.HashMap; Pinecone pinecone = new Pinecone.Builder("PINECONE_API_KEY").build(); String indexName = "example-index"; -int dimension = 1538; String cloud = "aws"; String region = "us-east-1"; HashMap tags = new HashMap<>(); diff --git a/gradle.properties b/gradle.properties index a9c6f414..bea2d8da 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -pineconeClientVersion = 3.1.0 +pineconeClientVersion = 4.0.0 diff --git a/src/main/java/io/pinecone/commons/Constants.java b/src/main/java/io/pinecone/commons/Constants.java index 4344f111..5e6a83e4 100644 --- a/src/main/java/io/pinecone/commons/Constants.java +++ b/src/main/java/io/pinecone/commons/Constants.java @@ -1,5 +1,5 @@ package io.pinecone.commons; public class Constants { - public static final String pineconeClientVersion = "v3.1.0"; + public static final String pineconeClientVersion = "v4.0.0"; }