diff --git a/.pipeline/checkstyle-suppressions.xml b/.pipeline/checkstyle-suppressions.xml
index 8dcc891fc..ca22dcf50 100644
--- a/.pipeline/checkstyle-suppressions.xml
+++ b/.pipeline/checkstyle-suppressions.xml
@@ -10,6 +10,8 @@
+
+
diff --git a/.pipeline/spotbugs-exclusions.xml b/.pipeline/spotbugs-exclusions.xml
index 3e709994f..ded4e5eca 100644
--- a/.pipeline/spotbugs-exclusions.xml
+++ b/.pipeline/spotbugs-exclusions.xml
@@ -5,6 +5,8 @@
+
+
diff --git a/README.md b/README.md
index ae63c3e05..55a8085b0 100644
--- a/README.md
+++ b/README.md
@@ -136,6 +136,7 @@ For more detailed information and advanced usage, please refer to the following:
- [
OpenAI Chat Completion](docs/guides/OPENAI_CHAT_COMPLETION.md)
- [
Spring AI Integration](docs/guides/SPRING_AI_INTEGRATION.md)
- [🧰 AI Core Deployment](docs/guides/AI_CORE_DEPLOYMENT.md)
+- [
AI Core Grounding](docs/guides/GROUNDING.md)
For updating versions, please refer to the [**Release Notes**](docs/release-notes/release-notes-0-to-14.md).
diff --git a/docs/guides/GROUNDING.md b/docs/guides/GROUNDING.md
new file mode 100644
index 000000000..f550b1362
--- /dev/null
+++ b/docs/guides/GROUNDING.md
@@ -0,0 +1,155 @@
+# Grounding Services
+
+## Table of Contents
+
+- [Introduction](#introduction)
+ - [Prerequisites](#prerequisites)
+ - [Maven Dependencies](#maven-dependencies)
+- [Usage](#usage)
+ - [Data Ingestion](#data-ingestion)
+ - [Pipeline API](#pipeline-api)
+ - [Vector API](#vector-api)
+ - [Data Retrieval](#retrieval-api)
+ - [Retrieval API](#create-a-deployment)
+ - [Grounding via Orchestration](#grounding-via-orchestration)
+
+## Introduction
+
+This guide provides examples on how to manage data in SAP Document Grounding.
+It's divided into two main sections: Data Ingestion and Data Retrieval.
+
+> [!WARNING]
+> The below examples rely on generated model classes.
+> Please be aware of the [implications described here](/README.md#general-requirements).
+
+## Prerequisites
+
+Before using the Grounding module, ensure that you have met all the general requirements outlined in the [README.md](../../README.md#general-requirements).
+Additionally, include the necessary Maven dependency in your project.
+
+### Maven Dependencies
+
+Add the following dependency to your `pom.xml` file:
+
+```xml
+
+ com.sap.ai.sdk
+ grounding
+ ${ai-sdk.version}
+
+```
+
+See [an example pom in our Spring Boot application](../../sample-code/spring-app/pom.xml)
+
+## Usage
+
+In addition to the prerequisites above, we assume you have already set up the following to carry out the examples in this guide:
+
+- A running instance of SAP AI Core with correctly setup credentials, including a resource group id.
+
+## Data Ingestion
+
+The following APIs are available for data ingestion: Pipeline and Vector.
+
+### Pipeline API
+
+Consider the following code sample to read pipelines, create a new one and get its status:
+
+```java
+var api = new GroundingClient().pipelines();
+var resourceGroupId = "default";
+
+// get all pipelines
+Pipelines pipelines = api.getAllPipelines(resourceGroupId);
+
+// create new pipeline
+var type = "MSSharePoint"; // or "S3" or "SFTP"
+var pipelineSecret = "my-secret-name";
+var config = PipelinePostRequstConfiguration.create().destination(pipelineSecret);
+var request = PipelinePostRequst.create().type(type)._configuration(config);
+PipelineId pipeline = api.createPipeline(resourceGroupId, request);
+
+// get pipeline status
+PipelineStatus status = api.getPipelineStatus(resourceGroupId, pipeline.getPipelineId());
+```
+
+### Vector API
+
+```java
+var api = new GroundingClient().vector();
+var resourceGroupId = "default";
+
+// resolve collection id
+var collectionId = UUID.fromString("12345-123-123-123-0123456abcdef");
+
+var request = DocumentCreateRequest.create()
+ .documents(BaseDocument.create()
+ .chunks(TextOnlyBaseChunk.create()
+ .content("The dog makes _woof_")
+ .metadata(KeyValueListPair.create()
+ .key("animal").value("dog")))
+ .metadata(DocumentKeyValueListPair.create()
+ .key("topic").value("sound")));
+DocumentsListResponse response = api.createDocuments(resourceGroupId, collectionId, request);
+```
+
+Refer to the [DeploymentController.java](../../sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/controllers/DeploymentController.java) in our Spring Boot application for a complete example.
+
+## Data Retrieval
+
+The following APIs are available for data retrieval: Retrieval and Orchestration.
+
+
+### Retrieval API
+
+Consider the following code sample to search for relevant grounding data based on a query:
+
+```java
+var api = new GroundingClient().retrieval();
+var resourceGroupId = "default";
+
+var filter =
+ RetrievalSearchFilter.create()
+ .id("question")
+ .dataRepositoryType(DataRepositoryType.VECTOR)
+ .dataRepositories(List.of("*"))
+ .searchConfiguration(SearchConfiguration.create().maxChunkCount(10));
+var search = RetrievalSearchInput.create().query("What is SAP Cloud SDK for AI?").filters(filter);
+RetievalSearchResults results = api.search(resourceGroupId, search);
+```
+
+### Grounding via Orchestration
+
+You can use the grounding service via orchestration.
+Please find the [documentation on Orchestration client in the dedicated document](ORCHESTRATION_CHAT_COMPLETION.md).
+
+```java
+OrchestrationClient client;
+
+var databaseFilter =
+ DocumentGroundingFilter.create()
+ .dataRepositoryType(DataRepositoryType.VECTOR)
+ .searchConfig(GroundingFilterSearchConfiguration.create().maxChunkCount(3));
+var groundingConfigConfig =
+ GroundingModuleConfigConfig.create()
+ .inputParams(List.of("query"))
+ .outputParam("results")
+ .addFiltersItem(databaseFilter);
+var groundingConfig =
+ GroundingModuleConfig.create()
+ .type(GroundingModuleConfig.TypeEnum.DOCUMENT_GROUNDING_SERVICE)
+ .config(groundingConfigConfig);
+var configWithGrounding =
+ new OrchestrationModuleConfig()
+ .withLlmConfig(GPT_4O)
+ .withGroundingConfig(groundingConfig);
+
+var inputParams = Map.of("query", "What is SAP Cloud SDK for AI?");
+
+var prompt =
+ new OrchestrationPrompt(
+ inputParams,
+ Message.system("Context message with embedded grounding results. {{?results}}"));
+
+OrchestrationChatResponse response = client.chatCompletion(prompt, configWithGrounding);
+```
\ No newline at end of file
diff --git a/grounding/pom.xml b/grounding/pom.xml
new file mode 100644
index 000000000..659f1c7f4
--- /dev/null
+++ b/grounding/pom.xml
@@ -0,0 +1,152 @@
+
+
+ 4.0.0
+
+ com.sap.ai.sdk
+ sdk-parent
+ 1.4.0-SNAPSHOT
+
+ grounding
+ Grounding client
+ SAP Cloud SDK for AI is the official Software Development Kit (SDK) for SAP AI Core, SAP Generative AI Hub, and Orchestration Service. This is the client for the Grounding Service.
+
+ https://github.com/SAP/ai-sdk-java?tab=readme-ov-file#documentation
+
+ SAP SE
+ https://www.sap.com
+
+
+
+ The Apache Software License, Version 2.0
+ https://www.apache.org/licenses/LICENSE-2.0.txt
+
+
+
+
+ SAP
+ cloudsdk@sap.com
+ SAP SE
+ https://www.sap.com
+
+
+
+ ${project.basedir}/../
+ 80%
+ 71%
+ 85%
+ 100%
+ 80%
+ 100%
+
+
+
+
+
+ org.springframework
+ spring-core
+
+
+ org.springframework
+ spring-web
+
+
+
+ com.sap.ai.sdk
+ core
+
+
+ com.sap.cloud.sdk.cloudplatform
+ cloudplatform-connectivity
+
+
+ com.sap.cloud.sdk.datamodel
+ openapi-core
+
+
+ com.google.code.findbugs
+ jsr305
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+
+
+ org.slf4j
+ slf4j-api
+
+
+ com.google.guava
+ guava
+
+
+
+ org.projectlombok
+ lombok
+ provided
+
+
+
+ org.junit.jupiter
+ junit-jupiter-api
+ test
+
+
+ org.wiremock
+ wiremock
+ test
+
+
+ org.assertj
+ assertj-core
+ test
+
+
+
+
+
+ generate
+
+ false
+
+ generate
+
+
+
+
+
+ com.sap.cloud.sdk.datamodel
+ openapi-generator-maven-plugin
+
+ ${project.basedir}/src/main/java
+ beta
+ true
+ COMPILE
+ true
+
+
+
+ orchestration
+
+ generate
+
+ generate-sources
+
+ ${project.basedir}/src/main/resources/spec/grounding.yaml
+ com.sap.ai.sdk.grounding.client
+ com.sap.ai.sdk.grounding.model
+
+ create
+
+ protected
+ true
+ true
+
+
+
+
+
+
+
+
+
+
diff --git a/grounding/src/main/java/com/sap/ai/sdk/grounding/GroundingClient.java b/grounding/src/main/java/com/sap/ai/sdk/grounding/GroundingClient.java
new file mode 100644
index 000000000..526235fe0
--- /dev/null
+++ b/grounding/src/main/java/com/sap/ai/sdk/grounding/GroundingClient.java
@@ -0,0 +1,70 @@
+package com.sap.ai.sdk.grounding;
+
+import com.sap.ai.sdk.core.AiCoreService;
+import com.sap.ai.sdk.grounding.client.PipelinesApi;
+import com.sap.ai.sdk.grounding.client.RetrievalApi;
+import com.sap.ai.sdk.grounding.client.VectorApi;
+import javax.annotation.Nonnull;
+import lombok.AccessLevel;
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import lombok.experimental.Tolerate;
+
+/**
+ * Service class for the Grounding APIs.
+ *
+ * @since 1.3.0
+ */
+@RequiredArgsConstructor(access = AccessLevel.PUBLIC)
+@Getter(value = AccessLevel.PROTECTED)
+public class GroundingClient {
+ @Nonnull private final AiCoreService service;
+ @Nonnull private final String basePath;
+
+ static final String DEFAULT_BASE_PATH = "lm/document-grounding/";
+
+ /** Default constructor. */
+ @Tolerate
+ public GroundingClient() {
+ this(new AiCoreService());
+ }
+
+ /**
+ * Constructor with custom AI Core service instance.
+ *
+ * @param service The instance of AI Core service
+ */
+ public GroundingClient(final @Nonnull AiCoreService service) {
+ this(service, DEFAULT_BASE_PATH);
+ }
+
+ /**
+ * Get the Pipelines API.
+ *
+ * @return The Pipelines API.
+ */
+ @Nonnull
+ public PipelinesApi pipelines() {
+ return new PipelinesApi(getService().getApiClient().setBasePath(getBasePath()));
+ }
+
+ /**
+ * Get the Vector API.
+ *
+ * @return The Vector API.
+ */
+ @Nonnull
+ public VectorApi vector() {
+ return new VectorApi(getService().getApiClient().setBasePath(getBasePath()));
+ }
+
+ /**
+ * Get the Retrieval API.
+ *
+ * @return The Retrieval API.
+ */
+ @Nonnull
+ public RetrievalApi retrieval() {
+ return new RetrievalApi(getService().getApiClient().setBasePath(getBasePath()));
+ }
+}
diff --git a/grounding/src/main/java/com/sap/ai/sdk/grounding/client/PipelinesApi.java b/grounding/src/main/java/com/sap/ai/sdk/grounding/client/PipelinesApi.java
new file mode 100644
index 000000000..c7310e26e
--- /dev/null
+++ b/grounding/src/main/java/com/sap/ai/sdk/grounding/client/PipelinesApi.java
@@ -0,0 +1,410 @@
+package com.sap.ai.sdk.grounding.client;
+
+import com.google.common.annotations.Beta;
+import com.sap.ai.sdk.grounding.model.Pipeline;
+import com.sap.ai.sdk.grounding.model.PipelineId;
+import com.sap.ai.sdk.grounding.model.PipelinePostRequst;
+import com.sap.ai.sdk.grounding.model.PipelineStatus;
+import com.sap.ai.sdk.grounding.model.Pipelines;
+import com.sap.cloud.sdk.cloudplatform.connectivity.Destination;
+import com.sap.cloud.sdk.services.openapi.apiclient.ApiClient;
+import com.sap.cloud.sdk.services.openapi.core.AbstractOpenApiService;
+import com.sap.cloud.sdk.services.openapi.core.OpenApiRequestException;
+import com.sap.cloud.sdk.services.openapi.core.OpenApiResponse;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.MediaType;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.util.UriComponentsBuilder;
+
+/**
+ * Document Grounding Pipeline API in version 0.1.0.
+ *
+ *
SAP AI Core - API Specification AI Data Management api's
+ */
+@Beta
+public class PipelinesApi extends AbstractOpenApiService {
+ /**
+ * Instantiates this API class to invoke operations on the Document Grounding Pipeline API.
+ *
+ * @param httpDestination The destination that API should be used with
+ */
+ public PipelinesApi(@Nonnull final Destination httpDestination) {
+ super(httpDestination);
+ }
+
+ /**
+ * Instantiates this API class to invoke operations on the Document Grounding Pipeline API based
+ * on a given {@link ApiClient}.
+ *
+ * @param apiClient ApiClient to invoke the API on
+ */
+ @Beta
+ public PipelinesApi(@Nonnull final ApiClient apiClient) {
+ super(apiClient);
+ }
+
+ /**
+ * Create a pipeline
+ *
+ *
201 - Returns pipelineId on successful creation.
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ * @param aiResourceGroup The value for the parameter aiResourceGroup
+ * @param pipelinePostRequst The value for the parameter pipelinePostRequst
+ * @return PipelineId
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public PipelineId createPipeline(
+ @Nonnull final String aiResourceGroup, @Nonnull final PipelinePostRequst pipelinePostRequst)
+ throws OpenApiRequestException {
+ final Object localVarPostBody = pipelinePostRequst;
+
+ // verify the required parameter 'aiResourceGroup' is set
+ if (aiResourceGroup == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'aiResourceGroup' when calling createPipeline");
+ }
+
+ // verify the required parameter 'pipelinePostRequst' is set
+ if (pipelinePostRequst == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'pipelinePostRequst' when calling pipelineV1PipelineEndpointsCreatePipeline");
+ }
+
+ final String localVarPath = UriComponentsBuilder.fromPath("/pipelines").build().toUriString();
+
+ final MultiValueMap localVarQueryParams =
+ new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams =
+ new LinkedMultiValueMap();
+
+ if (aiResourceGroup != null)
+ localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));
+
+ final String[] localVarAccepts = {"application/json"};
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {"application/json"};
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] {};
+
+ final ParameterizedTypeReference localVarReturnType =
+ new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ HttpMethod.POST,
+ localVarQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType);
+ }
+
+ /**
+ * Delete a pipeline by pipeline id
+ *
+ * 204 - No Content
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ * @param aiResourceGroup The value for the parameter aiResourceGroup
+ * @param pipelineId The ID of the pipeline to delete.
+ * @return An OpenApiResponse containing the status code of the HttpResponse.
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public OpenApiResponse deletePipelineById(
+ @Nonnull final String aiResourceGroup, @Nonnull final String pipelineId)
+ throws OpenApiRequestException {
+ final Object localVarPostBody = null;
+
+ // verify the required parameter 'aiResourceGroup' is set
+ if (aiResourceGroup == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'aiResourceGroup' when calling deletePipelineById");
+ }
+
+ // verify the required parameter 'pipelineId' is set
+ if (pipelineId == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'pipelineId' when calling deletePipelineById");
+ }
+
+ // create path and map variables
+ final Map localVarPathParams = new HashMap();
+ localVarPathParams.put("pipelineId", pipelineId);
+ final String localVarPath =
+ UriComponentsBuilder.fromPath("/pipelines/{pipelineId}")
+ .buildAndExpand(localVarPathParams)
+ .toUriString();
+
+ final MultiValueMap localVarQueryParams =
+ new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams =
+ new LinkedMultiValueMap();
+
+ if (aiResourceGroup != null)
+ localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));
+
+ final String[] localVarAccepts = {"application/json"};
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {};
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] {};
+
+ final ParameterizedTypeReference localVarReturnType =
+ new ParameterizedTypeReference() {};
+ apiClient.invokeAPI(
+ localVarPath,
+ HttpMethod.DELETE,
+ localVarQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType);
+ return new OpenApiResponse(apiClient);
+ }
+
+ /**
+ * Get all pipelines
+ *
+ * 200 - Returns all pipelines for the tenant.
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ * @param aiResourceGroup (required) The value for the parameter aiResourceGroup
+ * @param $top (optional) Number of results to display
+ * @param $skip (optional) Number of results to be skipped from the ordered list of results
+ * @param $count (optional) When the $count field is set to false, the response contains a count
+ * of the items present in the response. When the $count field is set to true, the response
+ * contains a count of all the items present on the server, and not just the ones in the
+ * response. When the $count field is not passed, it is false by default.
+ * @return Pipelines
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public Pipelines getAllPipelines(
+ @Nonnull final String aiResourceGroup,
+ @Nullable final Integer $top,
+ @Nullable final Integer $skip,
+ @Nullable final Boolean $count)
+ throws OpenApiRequestException {
+ final Object localVarPostBody = null;
+
+ // verify the required parameter 'aiResourceGroup' is set
+ if (aiResourceGroup == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'aiResourceGroup' when calling getAllPipelines");
+ }
+
+ final String localVarPath = UriComponentsBuilder.fromPath("/pipelines").build().toUriString();
+
+ final MultiValueMap localVarQueryParams =
+ new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams =
+ new LinkedMultiValueMap();
+
+ localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "$top", $top));
+ localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "$skip", $skip));
+ localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "$count", $count));
+
+ if (aiResourceGroup != null)
+ localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));
+
+ final String[] localVarAccepts = {"application/json"};
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {};
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] {};
+
+ final ParameterizedTypeReference localVarReturnType =
+ new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ HttpMethod.GET,
+ localVarQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType);
+ }
+
+ /**
+ * Get all pipelines
+ *
+ * 200 - Returns all pipelines for the tenant.
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ * @param aiResourceGroup The value for the parameter aiResourceGroup
+ * @return Pipelines
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public Pipelines getAllPipelines(@Nonnull final String aiResourceGroup)
+ throws OpenApiRequestException {
+ return getAllPipelines(aiResourceGroup, null, null, null);
+ }
+
+ /**
+ * Get details of a pipeline by pipeline id
+ *
+ *
200 - Returns the pipeline for an pipelineId
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ * @param aiResourceGroup The value for the parameter aiResourceGroup
+ * @param pipelineId The ID of the pipeline to get.
+ * @return Pipeline
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public Pipeline getPipelineById(
+ @Nonnull final String aiResourceGroup, @Nonnull final String pipelineId)
+ throws OpenApiRequestException {
+ final Object localVarPostBody = null;
+
+ // verify the required parameter 'aiResourceGroup' is set
+ if (aiResourceGroup == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'aiResourceGroup' when calling getPipelineById");
+ }
+
+ // verify the required parameter 'pipelineId' is set
+ if (pipelineId == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'pipelineId' when calling getPipelineById");
+ }
+
+ // create path and map variables
+ final Map localVarPathParams = new HashMap();
+ localVarPathParams.put("pipelineId", pipelineId);
+ final String localVarPath =
+ UriComponentsBuilder.fromPath("/pipelines/{pipelineId}")
+ .buildAndExpand(localVarPathParams)
+ .toUriString();
+
+ final MultiValueMap localVarQueryParams =
+ new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams =
+ new LinkedMultiValueMap();
+
+ if (aiResourceGroup != null)
+ localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));
+
+ final String[] localVarAccepts = {"application/json"};
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {};
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] {};
+
+ final ParameterizedTypeReference localVarReturnType =
+ new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ HttpMethod.GET,
+ localVarQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType);
+ }
+
+ /**
+ * Get pipeline status by pipeline id
+ *
+ * 200 - Returns the pipeline status for an pipelineId.
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ * @param aiResourceGroup The value for the parameter aiResourceGroup
+ * @param pipelineId The ID of the pipeline to get status.
+ * @return PipelineStatus
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public PipelineStatus getPipelineStatus(
+ @Nonnull final String aiResourceGroup, @Nonnull final String pipelineId)
+ throws OpenApiRequestException {
+ final Object localVarPostBody = null;
+
+ // verify the required parameter 'aiResourceGroup' is set
+ if (aiResourceGroup == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'aiResourceGroup' when calling getPipelineStatus");
+ }
+
+ // verify the required parameter 'pipelineId' is set
+ if (pipelineId == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'pipelineId' when calling getPipelineStatus");
+ }
+
+ // create path and map variables
+ final Map localVarPathParams = new HashMap();
+ localVarPathParams.put("pipelineId", pipelineId);
+ final String localVarPath =
+ UriComponentsBuilder.fromPath("/pipelines/{pipelineId}/status")
+ .buildAndExpand(localVarPathParams)
+ .toUriString();
+
+ final MultiValueMap localVarQueryParams =
+ new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams =
+ new LinkedMultiValueMap();
+
+ if (aiResourceGroup != null)
+ localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));
+
+ final String[] localVarAccepts = {"application/json"};
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {};
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] {};
+
+ final ParameterizedTypeReference localVarReturnType =
+ new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ HttpMethod.GET,
+ localVarQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType);
+ }
+}
diff --git a/grounding/src/main/java/com/sap/ai/sdk/grounding/client/RetrievalApi.java b/grounding/src/main/java/com/sap/ai/sdk/grounding/client/RetrievalApi.java
new file mode 100644
index 000000000..c54345f38
--- /dev/null
+++ b/grounding/src/main/java/com/sap/ai/sdk/grounding/client/RetrievalApi.java
@@ -0,0 +1,287 @@
+package com.sap.ai.sdk.grounding.client;
+
+import com.google.common.annotations.Beta;
+import com.sap.ai.sdk.grounding.model.DataRepositories;
+import com.sap.ai.sdk.grounding.model.DataRepository;
+import com.sap.ai.sdk.grounding.model.RetievalSearchResults;
+import com.sap.ai.sdk.grounding.model.RetrievalSearchInput;
+import com.sap.cloud.sdk.cloudplatform.connectivity.Destination;
+import com.sap.cloud.sdk.services.openapi.apiclient.ApiClient;
+import com.sap.cloud.sdk.services.openapi.core.AbstractOpenApiService;
+import com.sap.cloud.sdk.services.openapi.core.OpenApiRequestException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.MediaType;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.util.UriComponentsBuilder;
+
+/**
+ * Document Grounding Pipeline API in version 0.1.0.
+ *
+ * SAP AI Core - API Specification AI Data Management api's
+ */
+@Beta
+public class RetrievalApi extends AbstractOpenApiService {
+ /**
+ * Instantiates this API class to invoke operations on the Document Grounding Pipeline API.
+ *
+ * @param httpDestination The destination that API should be used with
+ */
+ public RetrievalApi(@Nonnull final Destination httpDestination) {
+ super(httpDestination);
+ }
+
+ /**
+ * Instantiates this API class to invoke operations on the Document Grounding Pipeline API based
+ * on a given {@link ApiClient}.
+ *
+ * @param apiClient ApiClient to invoke the API on
+ */
+ @Beta
+ public RetrievalApi(@Nonnull final ApiClient apiClient) {
+ super(apiClient);
+ }
+
+ /**
+ * List all DataRepository objects.
+ *
+ *
List all DataRepository objects.
+ *
+ *
200 - Successful Response
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ * @param aiResourceGroup (required) The value for the parameter aiResourceGroup
+ * @param $top (optional) Number of results to display
+ * @param $skip (optional) Number of results to be skipped from the ordered list of results
+ * @param $count (optional) When the $count field is set to false, the response contains a count
+ * of the items present in the response. When the $count field is set to true, the response
+ * contains a count of all the items present on the server, and not just the ones in the
+ * response. When the $count field is not passed, it is false by default.
+ * @return DataRepositories
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public DataRepositories getDataRepositories(
+ @Nonnull final String aiResourceGroup,
+ @Nullable final Integer $top,
+ @Nullable final Integer $skip,
+ @Nullable final Boolean $count)
+ throws OpenApiRequestException {
+ final Object localVarPostBody = null;
+
+ // verify the required parameter 'aiResourceGroup' is set
+ if (aiResourceGroup == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'aiResourceGroup' when calling getDataRepositories");
+ }
+
+ final String localVarPath =
+ UriComponentsBuilder.fromPath("/retrieval/dataRepositories").build().toUriString();
+
+ final MultiValueMap localVarQueryParams =
+ new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams =
+ new LinkedMultiValueMap();
+
+ localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "$top", $top));
+ localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "$skip", $skip));
+ localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "$count", $count));
+
+ if (aiResourceGroup != null)
+ localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));
+
+ final String[] localVarAccepts = {"application/json"};
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {};
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] {};
+
+ final ParameterizedTypeReference localVarReturnType =
+ new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ HttpMethod.GET,
+ localVarQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType);
+ }
+
+ /**
+ * List all DataRepository objects.
+ *
+ * List all DataRepository objects.
+ *
+ *
200 - Successful Response
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ * @param aiResourceGroup The value for the parameter aiResourceGroup
+ * @return DataRepositories
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public DataRepositories getDataRepositories(@Nonnull final String aiResourceGroup)
+ throws OpenApiRequestException {
+ return getDataRepositories(aiResourceGroup, null, null, null);
+ }
+
+ /**
+ * List single DataRepository object.
+ *
+ *
List single DataRepository object.
+ *
+ *
200 - Successful Response
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ *
422 - There are validation issues with the data.
+ *
+ *
404 - The specification of the resource was incorrect
+ *
+ * @param aiResourceGroup The value for the parameter aiResourceGroup
+ * @param repositoryId The value for the parameter repositoryId
+ * @return DataRepository
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public DataRepository getDataRepositoryById(
+ @Nonnull final String aiResourceGroup, @Nonnull final UUID repositoryId)
+ throws OpenApiRequestException {
+ final Object localVarPostBody = null;
+
+ // verify the required parameter 'aiResourceGroup' is set
+ if (aiResourceGroup == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'aiResourceGroup' when calling getDataRepositoryById");
+ }
+
+ // verify the required parameter 'repositoryId' is set
+ if (repositoryId == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'repositoryId' when calling getDataRepositoryById");
+ }
+
+ // create path and map variables
+ final Map localVarPathParams = new HashMap();
+ localVarPathParams.put("repositoryId", repositoryId);
+ final String localVarPath =
+ UriComponentsBuilder.fromPath("/retrieval/dataRepositories/{repositoryId}")
+ .buildAndExpand(localVarPathParams)
+ .toUriString();
+
+ final MultiValueMap localVarQueryParams =
+ new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams =
+ new LinkedMultiValueMap();
+
+ if (aiResourceGroup != null)
+ localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));
+
+ final String[] localVarAccepts = {"application/json"};
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {};
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] {};
+
+ final ParameterizedTypeReference localVarReturnType =
+ new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ HttpMethod.GET,
+ localVarQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType);
+ }
+
+ /**
+ * Retrieve relevant content given a query string.
+ *
+ * Retrieve relevant content given a query string.
+ *
+ *
200 - Successful Response
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ *
422 - There are validation issues with the data.
+ *
+ * @param aiResourceGroup The value for the parameter aiResourceGroup
+ * @param retrievalSearchInput The value for the parameter retrievalSearchInput
+ * @return RetievalSearchResults
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public RetievalSearchResults search(
+ @Nonnull final String aiResourceGroup,
+ @Nonnull final RetrievalSearchInput retrievalSearchInput)
+ throws OpenApiRequestException {
+ final Object localVarPostBody = retrievalSearchInput;
+
+ // verify the required parameter 'aiResourceGroup' is set
+ if (aiResourceGroup == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'aiResourceGroup' when calling search");
+ }
+
+ // verify the required parameter 'retrievalSearchInput' is set
+ if (retrievalSearchInput == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'retrievalSearchInput' when calling retrievalV1RetrievalEndpointsSearch");
+ }
+
+ final String localVarPath =
+ UriComponentsBuilder.fromPath("/retrieval/search").build().toUriString();
+
+ final MultiValueMap localVarQueryParams =
+ new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams =
+ new LinkedMultiValueMap();
+
+ if (aiResourceGroup != null)
+ localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));
+
+ final String[] localVarAccepts = {"application/json"};
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {"application/json"};
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] {};
+
+ final ParameterizedTypeReference localVarReturnType =
+ new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ HttpMethod.POST,
+ localVarQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType);
+ }
+}
diff --git a/grounding/src/main/java/com/sap/ai/sdk/grounding/client/VectorApi.java b/grounding/src/main/java/com/sap/ai/sdk/grounding/client/VectorApi.java
new file mode 100644
index 000000000..8a537258b
--- /dev/null
+++ b/grounding/src/main/java/com/sap/ai/sdk/grounding/client/VectorApi.java
@@ -0,0 +1,1052 @@
+package com.sap.ai.sdk.grounding.client;
+
+import com.google.common.annotations.Beta;
+import com.sap.ai.sdk.grounding.model.Collection;
+import com.sap.ai.sdk.grounding.model.CollectionRequest;
+import com.sap.ai.sdk.grounding.model.CollectionsListResponse;
+import com.sap.ai.sdk.grounding.model.DocumentCreateRequest;
+import com.sap.ai.sdk.grounding.model.DocumentResponse;
+import com.sap.ai.sdk.grounding.model.DocumentUpdateRequest;
+import com.sap.ai.sdk.grounding.model.Documents;
+import com.sap.ai.sdk.grounding.model.DocumentsListResponse;
+import com.sap.ai.sdk.grounding.model.SearchResults;
+import com.sap.ai.sdk.grounding.model.TextSearchRequest;
+import com.sap.ai.sdk.grounding.model.VectorV1VectorEndpointsGetCollectionCreationStatus200Response;
+import com.sap.ai.sdk.grounding.model.VectorV1VectorEndpointsGetCollectionDeletionStatus200Response;
+import com.sap.cloud.sdk.cloudplatform.connectivity.Destination;
+import com.sap.cloud.sdk.services.openapi.apiclient.ApiClient;
+import com.sap.cloud.sdk.services.openapi.core.AbstractOpenApiService;
+import com.sap.cloud.sdk.services.openapi.core.OpenApiRequestException;
+import com.sap.cloud.sdk.services.openapi.core.OpenApiResponse;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.MediaType;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.util.UriComponentsBuilder;
+
+/**
+ * Document Grounding Pipeline API in version 0.1.0.
+ *
+ * SAP AI Core - API Specification AI Data Management api's
+ */
+@Beta
+public class VectorApi extends AbstractOpenApiService {
+ /**
+ * Instantiates this API class to invoke operations on the Document Grounding Pipeline API.
+ *
+ * @param httpDestination The destination that API should be used with
+ */
+ public VectorApi(@Nonnull final Destination httpDestination) {
+ super(httpDestination);
+ }
+
+ /**
+ * Instantiates this API class to invoke operations on the Document Grounding Pipeline API based
+ * on a given {@link ApiClient}.
+ *
+ * @param apiClient ApiClient to invoke the API on
+ */
+ @Beta
+ public VectorApi(@Nonnull final ApiClient apiClient) {
+ super(apiClient);
+ }
+
+ /**
+ * Create collection
+ *
+ *
Creates a collection. This operation is asynchronous. Poll the collection resource and check
+ * the status field to understand creation status.
+ *
+ *
202 - Successful Response
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ *
422 - There are validation issues with the data.
+ *
+ * @param aiResourceGroup The value for the parameter aiResourceGroup
+ * @param collectionRequest The value for the parameter collectionRequest
+ * @return An OpenApiResponse containing the status code of the HttpResponse.
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public OpenApiResponse createCollection(
+ @Nonnull final String aiResourceGroup, @Nonnull final CollectionRequest collectionRequest)
+ throws OpenApiRequestException {
+ final Object localVarPostBody = collectionRequest;
+
+ // verify the required parameter 'aiResourceGroup' is set
+ if (aiResourceGroup == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'aiResourceGroup' when calling createCollection");
+ }
+
+ // verify the required parameter 'collectionRequest' is set
+ if (collectionRequest == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'collectionRequest' when calling vectorV1VectorEndpointsCreateCollection");
+ }
+
+ final String localVarPath =
+ UriComponentsBuilder.fromPath("/vector/collections").build().toUriString();
+
+ final MultiValueMap localVarQueryParams =
+ new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams =
+ new LinkedMultiValueMap();
+
+ if (aiResourceGroup != null)
+ localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));
+
+ final String[] localVarAccepts = {"application/json"};
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {"application/json"};
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] {};
+
+ final ParameterizedTypeReference localVarReturnType =
+ new ParameterizedTypeReference() {};
+ apiClient.invokeAPI(
+ localVarPath,
+ HttpMethod.POST,
+ localVarQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType);
+ return new OpenApiResponse(apiClient);
+ }
+
+ /**
+ * Create documents in collection
+ *
+ * Create and stores one or multiple documents into a collection. If omitted, 'id' will
+ * be auto-generated.
+ *
+ *
201 - Successful Response
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ *
404 - The specification of the resource was incorrect
+ *
+ *
422 - There are validation issues with the data.
+ *
+ * @param aiResourceGroup The value for the parameter aiResourceGroup
+ * @param collectionId The value for the parameter collectionId
+ * @param documentCreateRequest The value for the parameter documentCreateRequest
+ * @return DocumentsListResponse
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public DocumentsListResponse createDocuments(
+ @Nonnull final String aiResourceGroup,
+ @Nonnull final UUID collectionId,
+ @Nonnull final DocumentCreateRequest documentCreateRequest)
+ throws OpenApiRequestException {
+ final Object localVarPostBody = documentCreateRequest;
+
+ // verify the required parameter 'aiResourceGroup' is set
+ if (aiResourceGroup == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'aiResourceGroup' when calling createDocuments");
+ }
+
+ // verify the required parameter 'collectionId' is set
+ if (collectionId == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'collectionId' when calling createDocuments");
+ }
+
+ // verify the required parameter 'documentCreateRequest' is set
+ if (documentCreateRequest == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'documentCreateRequest' when calling vectorV1VectorEndpointsCreateDocuments");
+ }
+
+ // create path and map variables
+ final Map localVarPathParams = new HashMap();
+ localVarPathParams.put("collectionId", collectionId);
+ final String localVarPath =
+ UriComponentsBuilder.fromPath("/vector/collections/{collectionId}/documents")
+ .buildAndExpand(localVarPathParams)
+ .toUriString();
+
+ final MultiValueMap localVarQueryParams =
+ new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams =
+ new LinkedMultiValueMap();
+
+ if (aiResourceGroup != null)
+ localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));
+
+ final String[] localVarAccepts = {"application/json"};
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {"application/json"};
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] {};
+
+ final ParameterizedTypeReference localVarReturnType =
+ new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ HttpMethod.POST,
+ localVarQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType);
+ }
+
+ /**
+ * Delete collection by ID
+ *
+ * Deletes a specific collection by ID. This operation is asynchronous. Poll the collection for
+ * a 404 status code.
+ *
+ *
202 - Successful Response
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ *
404 - The specification of the resource was incorrect
+ *
+ *
422 - There are validation issues with the data.
+ *
+ * @param aiResourceGroup The value for the parameter aiResourceGroup
+ * @param collectionId The value for the parameter collectionId
+ * @return An OpenApiResponse containing the status code of the HttpResponse.
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public OpenApiResponse deleteCollectionById(
+ @Nonnull final String aiResourceGroup, @Nonnull final String collectionId)
+ throws OpenApiRequestException {
+ final Object localVarPostBody = null;
+
+ // verify the required parameter 'aiResourceGroup' is set
+ if (aiResourceGroup == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'aiResourceGroup' when calling deleteCollectionById");
+ }
+
+ // verify the required parameter 'collectionId' is set
+ if (collectionId == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'collectionId' when calling deleteCollectionById");
+ }
+
+ // create path and map variables
+ final Map localVarPathParams = new HashMap();
+ localVarPathParams.put("collectionId", collectionId);
+ final String localVarPath =
+ UriComponentsBuilder.fromPath("/vector/collections/{collectionId}")
+ .buildAndExpand(localVarPathParams)
+ .toUriString();
+
+ final MultiValueMap localVarQueryParams =
+ new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams =
+ new LinkedMultiValueMap();
+
+ if (aiResourceGroup != null)
+ localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));
+
+ final String[] localVarAccepts = {"application/json"};
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {};
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] {};
+
+ final ParameterizedTypeReference localVarReturnType =
+ new ParameterizedTypeReference() {};
+ apiClient.invokeAPI(
+ localVarPath,
+ HttpMethod.DELETE,
+ localVarQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType);
+ return new OpenApiResponse(apiClient);
+ }
+
+ /**
+ * Delete a document
+ *
+ * Deletes a specific document of a collection.
+ *
+ *
204 - Successful Response
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ *
404 - The specification of the resource was incorrect
+ *
+ *
422 - There are validation issues with the data.
+ *
+ * @param aiResourceGroup The value for the parameter aiResourceGroup
+ * @param collectionId The value for the parameter collectionId
+ * @param documentId The value for the parameter documentId
+ * @return An OpenApiResponse containing the status code of the HttpResponse.
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public OpenApiResponse deleteDocumentById(
+ @Nonnull final String aiResourceGroup,
+ @Nonnull final UUID collectionId,
+ @Nonnull final UUID documentId)
+ throws OpenApiRequestException {
+ final Object localVarPostBody = null;
+
+ // verify the required parameter 'aiResourceGroup' is set
+ if (aiResourceGroup == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'aiResourceGroup' when calling deleteDocumentById");
+ }
+
+ // verify the required parameter 'collectionId' is set
+ if (collectionId == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'collectionId' when calling deleteDocumentById");
+ }
+
+ // verify the required parameter 'documentId' is set
+ if (documentId == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'documentId' when calling deleteDocumentById");
+ }
+
+ // create path and map variables
+ final Map localVarPathParams = new HashMap();
+ localVarPathParams.put("collectionId", collectionId);
+ localVarPathParams.put("documentId", documentId);
+ final String localVarPath =
+ UriComponentsBuilder.fromPath("/vector/collections/{collectionId}/documents/{documentId}")
+ .buildAndExpand(localVarPathParams)
+ .toUriString();
+
+ final MultiValueMap localVarQueryParams =
+ new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams =
+ new LinkedMultiValueMap();
+
+ if (aiResourceGroup != null)
+ localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));
+
+ final String[] localVarAccepts = {"application/json"};
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {};
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] {};
+
+ final ParameterizedTypeReference localVarReturnType =
+ new ParameterizedTypeReference() {};
+ apiClient.invokeAPI(
+ localVarPath,
+ HttpMethod.DELETE,
+ localVarQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType);
+ return new OpenApiResponse(apiClient);
+ }
+
+ /**
+ * Get collections
+ *
+ * Gets a list of collections.
+ *
+ *
200 - Successful Response
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ * @param aiResourceGroup (required) The value for the parameter aiResourceGroup
+ * @param $top (optional) Number of results to display
+ * @param $skip (optional) Number of results to be skipped from the ordered list of results
+ * @param $count (optional) When the $count field is set to false, the response contains a count
+ * of the items present in the response. When the $count field is set to true, the response
+ * contains a count of all the items present on the server, and not just the ones in the
+ * response. When the $count field is not passed, it is false by default.
+ * @return CollectionsListResponse
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public CollectionsListResponse getAllCollections(
+ @Nonnull final String aiResourceGroup,
+ @Nullable final Integer $top,
+ @Nullable final Integer $skip,
+ @Nullable final Boolean $count)
+ throws OpenApiRequestException {
+ final Object localVarPostBody = null;
+
+ // verify the required parameter 'aiResourceGroup' is set
+ if (aiResourceGroup == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'aiResourceGroup' when calling getAllCollections");
+ }
+
+ final String localVarPath =
+ UriComponentsBuilder.fromPath("/vector/collections").build().toUriString();
+
+ final MultiValueMap localVarQueryParams =
+ new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams =
+ new LinkedMultiValueMap();
+
+ localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "$top", $top));
+ localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "$skip", $skip));
+ localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "$count", $count));
+
+ if (aiResourceGroup != null)
+ localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));
+
+ final String[] localVarAccepts = {"application/json"};
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {};
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] {};
+
+ final ParameterizedTypeReference localVarReturnType =
+ new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ HttpMethod.GET,
+ localVarQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType);
+ }
+
+ /**
+ * Get collections
+ *
+ * Gets a list of collections.
+ *
+ *
200 - Successful Response
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ * @param aiResourceGroup The value for the parameter aiResourceGroup
+ * @return CollectionsListResponse
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public CollectionsListResponse getAllCollections(@Nonnull final String aiResourceGroup)
+ throws OpenApiRequestException {
+ return getAllCollections(aiResourceGroup, null, null, null);
+ }
+
+ /**
+ * Get documents
+ *
+ *
Gets a list of documents of a collection.
+ *
+ *
200 - Successful Response
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ *
404 - The specification of the resource was incorrect
+ *
+ *
422 - There are validation issues with the data.
+ *
+ * @param aiResourceGroup (required) The value for the parameter aiResourceGroup
+ * @param collectionId (required) The value for the parameter collectionId
+ * @param $top (optional) Number of results to display
+ * @param $skip (optional) Number of results to be skipped from the ordered list of results
+ * @param $count (optional) When the $count field is set to false, the response contains a count
+ * of the items present in the response. When the $count field is set to true, the response
+ * contains a count of all the items present on the server, and not just the ones in the
+ * response. When the $count field is not passed, it is false by default.
+ * @return Documents
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public Documents getAllDocuments(
+ @Nonnull final String aiResourceGroup,
+ @Nonnull final UUID collectionId,
+ @Nullable final Integer $top,
+ @Nullable final Integer $skip,
+ @Nullable final Boolean $count)
+ throws OpenApiRequestException {
+ final Object localVarPostBody = null;
+
+ // verify the required parameter 'aiResourceGroup' is set
+ if (aiResourceGroup == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'aiResourceGroup' when calling getAllDocuments");
+ }
+
+ // verify the required parameter 'collectionId' is set
+ if (collectionId == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'collectionId' when calling getAllDocuments");
+ }
+
+ // create path and map variables
+ final Map localVarPathParams = new HashMap();
+ localVarPathParams.put("collectionId", collectionId);
+ final String localVarPath =
+ UriComponentsBuilder.fromPath("/vector/collections/{collectionId}/documents")
+ .buildAndExpand(localVarPathParams)
+ .toUriString();
+
+ final MultiValueMap localVarQueryParams =
+ new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams =
+ new LinkedMultiValueMap();
+
+ localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "$top", $top));
+ localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "$skip", $skip));
+ localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "$count", $count));
+
+ if (aiResourceGroup != null)
+ localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));
+
+ final String[] localVarAccepts = {"application/json"};
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {};
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] {};
+
+ final ParameterizedTypeReference localVarReturnType =
+ new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ HttpMethod.GET,
+ localVarQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType);
+ }
+
+ /**
+ * Get documents
+ *
+ * Gets a list of documents of a collection.
+ *
+ *
200 - Successful Response
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ *
404 - The specification of the resource was incorrect
+ *
+ *
422 - There are validation issues with the data.
+ *
+ * @param aiResourceGroup The value for the parameter aiResourceGroup
+ * @param collectionId The value for the parameter collectionId
+ * @return Documents
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public Documents getAllDocuments(
+ @Nonnull final String aiResourceGroup, @Nonnull final UUID collectionId)
+ throws OpenApiRequestException {
+ return getAllDocuments(aiResourceGroup, collectionId, null, null, null);
+ }
+
+ /**
+ * Get collection by ID
+ *
+ *
Gets a specific collection by ID.
+ *
+ *
200 - Successful Response
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ *
404 - The specification of the resource was incorrect
+ *
+ *
422 - There are validation issues with the data.
+ *
+ * @param aiResourceGroup The value for the parameter aiResourceGroup
+ * @param collectionId The value for the parameter collectionId
+ * @return Collection
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public Collection getCollectionById(
+ @Nonnull final String aiResourceGroup, @Nonnull final UUID collectionId)
+ throws OpenApiRequestException {
+ final Object localVarPostBody = null;
+
+ // verify the required parameter 'aiResourceGroup' is set
+ if (aiResourceGroup == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'aiResourceGroup' when calling getCollectionById");
+ }
+
+ // verify the required parameter 'collectionId' is set
+ if (collectionId == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'collectionId' when calling getCollectionById");
+ }
+
+ // create path and map variables
+ final Map localVarPathParams = new HashMap();
+ localVarPathParams.put("collectionId", collectionId);
+ final String localVarPath =
+ UriComponentsBuilder.fromPath("/vector/collections/{collectionId}")
+ .buildAndExpand(localVarPathParams)
+ .toUriString();
+
+ final MultiValueMap localVarQueryParams =
+ new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams =
+ new LinkedMultiValueMap();
+
+ if (aiResourceGroup != null)
+ localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));
+
+ final String[] localVarAccepts = {"application/json"};
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {};
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] {};
+
+ final ParameterizedTypeReference localVarReturnType =
+ new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ HttpMethod.GET,
+ localVarQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType);
+ }
+
+ /**
+ * Get collection status by ID
+ *
+ * Gets a specific collection status from monitor by ID.
+ *
+ *
200 - Successful Response
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ *
404 - The specification of the resource was incorrect
+ *
+ *
422 - There are validation issues with the data.
+ *
+ * @param aiResourceGroup The value for the parameter aiResourceGroup
+ * @param id The value for the parameter id
+ * @return VectorV1VectorEndpointsGetCollectionCreationStatus200Response
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public VectorV1VectorEndpointsGetCollectionCreationStatus200Response getCollectionCreationStatus(
+ @Nonnull final String aiResourceGroup, @Nonnull final UUID id)
+ throws OpenApiRequestException {
+ final Object localVarPostBody = null;
+
+ // verify the required parameter 'aiResourceGroup' is set
+ if (aiResourceGroup == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'aiResourceGroup' when calling getCollectionCreationStatus");
+ }
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'id' when calling getCollectionCreationStatus");
+ }
+
+ // create path and map variables
+ final Map localVarPathParams = new HashMap();
+ localVarPathParams.put("id", id);
+ final String localVarPath =
+ UriComponentsBuilder.fromPath("/vector/collections/{id}/creationStatus")
+ .buildAndExpand(localVarPathParams)
+ .toUriString();
+
+ final MultiValueMap localVarQueryParams =
+ new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams =
+ new LinkedMultiValueMap();
+
+ if (aiResourceGroup != null)
+ localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));
+
+ final String[] localVarAccepts = {"application/json"};
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {};
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] {};
+
+ final ParameterizedTypeReference
+ localVarReturnType =
+ new ParameterizedTypeReference<
+ VectorV1VectorEndpointsGetCollectionCreationStatus200Response>() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ HttpMethod.GET,
+ localVarQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType);
+ }
+
+ /**
+ * Get collection status by ID
+ *
+ * Gets a specific collection status from monitor by ID.
+ *
+ *
200 - Successful Response
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ *
404 - The specification of the resource was incorrect
+ *
+ *
422 - There are validation issues with the data.
+ *
+ * @param aiResourceGroup The value for the parameter aiResourceGroup
+ * @param id The value for the parameter id
+ * @return VectorV1VectorEndpointsGetCollectionDeletionStatus200Response
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public VectorV1VectorEndpointsGetCollectionDeletionStatus200Response getCollectionDeletionStatus(
+ @Nonnull final String aiResourceGroup, @Nonnull final UUID id)
+ throws OpenApiRequestException {
+ final Object localVarPostBody = null;
+
+ // verify the required parameter 'aiResourceGroup' is set
+ if (aiResourceGroup == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'aiResourceGroup' when calling getCollectionDeletionStatus");
+ }
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'id' when calling getCollectionDeletionStatus");
+ }
+
+ // create path and map variables
+ final Map localVarPathParams = new HashMap();
+ localVarPathParams.put("id", id);
+ final String localVarPath =
+ UriComponentsBuilder.fromPath("/vector/collections/{id}/deletionStatus")
+ .buildAndExpand(localVarPathParams)
+ .toUriString();
+
+ final MultiValueMap localVarQueryParams =
+ new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams =
+ new LinkedMultiValueMap();
+
+ if (aiResourceGroup != null)
+ localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));
+
+ final String[] localVarAccepts = {"application/json"};
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {};
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] {};
+
+ final ParameterizedTypeReference
+ localVarReturnType =
+ new ParameterizedTypeReference<
+ VectorV1VectorEndpointsGetCollectionDeletionStatus200Response>() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ HttpMethod.GET,
+ localVarQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType);
+ }
+
+ /**
+ * Get document by ID
+ *
+ * Gets a specific document in a collection by ID.
+ *
+ *
200 - Successful Response
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ *
404 - The specification of the resource was incorrect
+ *
+ *
422 - There are validation issues with the data.
+ *
+ * @param aiResourceGroup The value for the parameter aiResourceGroup
+ * @param collectionId The value for the parameter collectionId
+ * @param documentId The value for the parameter documentId
+ * @return DocumentResponse
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public DocumentResponse getDocumentById(
+ @Nonnull final String aiResourceGroup,
+ @Nonnull final UUID collectionId,
+ @Nonnull final UUID documentId)
+ throws OpenApiRequestException {
+ final Object localVarPostBody = null;
+
+ // verify the required parameter 'aiResourceGroup' is set
+ if (aiResourceGroup == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'aiResourceGroup' when calling getDocumentById");
+ }
+
+ // verify the required parameter 'collectionId' is set
+ if (collectionId == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'collectionId' when calling getDocumentById");
+ }
+
+ // verify the required parameter 'documentId' is set
+ if (documentId == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'documentId' when calling getDocumentById");
+ }
+
+ // create path and map variables
+ final Map localVarPathParams = new HashMap();
+ localVarPathParams.put("collectionId", collectionId);
+ localVarPathParams.put("documentId", documentId);
+ final String localVarPath =
+ UriComponentsBuilder.fromPath("/vector/collections/{collectionId}/documents/{documentId}")
+ .buildAndExpand(localVarPathParams)
+ .toUriString();
+
+ final MultiValueMap localVarQueryParams =
+ new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams =
+ new LinkedMultiValueMap();
+
+ if (aiResourceGroup != null)
+ localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));
+
+ final String[] localVarAccepts = {"application/json"};
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {};
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] {};
+
+ final ParameterizedTypeReference localVarReturnType =
+ new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ HttpMethod.GET,
+ localVarQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType);
+ }
+
+ /**
+ * Search chunk by vector
+ *
+ * Search chunk by vector
+ *
+ *
200 - Successful Response
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ *
404 - The specification of the resource was incorrect
+ *
+ *
422 - There are validation issues with the data.
+ *
+ * @param aiResourceGroup The value for the parameter aiResourceGroup
+ * @param textSearchRequest The value for the parameter textSearchRequest
+ * @return SearchResults
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public SearchResults search(
+ @Nonnull final String aiResourceGroup, @Nonnull final TextSearchRequest textSearchRequest)
+ throws OpenApiRequestException {
+ final Object localVarPostBody = textSearchRequest;
+
+ // verify the required parameter 'aiResourceGroup' is set
+ if (aiResourceGroup == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'aiResourceGroup' when calling search");
+ }
+
+ // verify the required parameter 'textSearchRequest' is set
+ if (textSearchRequest == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'textSearchRequest' when calling vectorV1VectorEndpointsSearch");
+ }
+
+ final String localVarPath =
+ UriComponentsBuilder.fromPath("/vector/search").build().toUriString();
+
+ final MultiValueMap localVarQueryParams =
+ new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams =
+ new LinkedMultiValueMap();
+
+ if (aiResourceGroup != null)
+ localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));
+
+ final String[] localVarAccepts = {"application/json"};
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {"application/json"};
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] {};
+
+ final ParameterizedTypeReference localVarReturnType =
+ new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ HttpMethod.POST,
+ localVarQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType);
+ }
+
+ /**
+ * Upsert documents in collection
+ *
+ * Upserts the data of multiple documents into a collection.
+ *
+ *
200 - Successful Response
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ *
404 - The specification of the resource was incorrect
+ *
+ *
422 - There are validation issues with the data.
+ *
+ * @param aiResourceGroup The value for the parameter aiResourceGroup
+ * @param collectionId The value for the parameter collectionId
+ * @param documentUpdateRequest The value for the parameter documentUpdateRequest
+ * @return DocumentsListResponse
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public DocumentsListResponse updateDocuments(
+ @Nonnull final String aiResourceGroup,
+ @Nonnull final UUID collectionId,
+ @Nonnull final DocumentUpdateRequest documentUpdateRequest)
+ throws OpenApiRequestException {
+ final Object localVarPostBody = documentUpdateRequest;
+
+ // verify the required parameter 'aiResourceGroup' is set
+ if (aiResourceGroup == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'aiResourceGroup' when calling updateDocuments");
+ }
+
+ // verify the required parameter 'collectionId' is set
+ if (collectionId == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'collectionId' when calling updateDocuments");
+ }
+
+ // verify the required parameter 'documentUpdateRequest' is set
+ if (documentUpdateRequest == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'documentUpdateRequest' when calling vectorV1VectorEndpointsUpdateDocuments");
+ }
+
+ // create path and map variables
+ final Map localVarPathParams = new HashMap();
+ localVarPathParams.put("collectionId", collectionId);
+ final String localVarPath =
+ UriComponentsBuilder.fromPath("/vector/collections/{collectionId}/documents")
+ .buildAndExpand(localVarPathParams)
+ .toUriString();
+
+ final MultiValueMap localVarQueryParams =
+ new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams =
+ new LinkedMultiValueMap();
+
+ if (aiResourceGroup != null)
+ localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));
+
+ final String[] localVarAccepts = {"application/json"};
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {"application/json"};
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] {};
+
+ final ParameterizedTypeReference localVarReturnType =
+ new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ HttpMethod.PATCH,
+ localVarQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType);
+ }
+}
diff --git a/grounding/src/main/java/com/sap/ai/sdk/grounding/model/ApiError.java b/grounding/src/main/java/com/sap/ai/sdk/grounding/model/ApiError.java
new file mode 100644
index 000000000..27df4b095
--- /dev/null
+++ b/grounding/src/main/java/com/sap/ai/sdk/grounding/model/ApiError.java
@@ -0,0 +1,361 @@
+/*
+ * Document Grounding Pipeline API
+ * SAP AI Core - API Specification AI Data Management api's
+ *
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.sap.ai.sdk.grounding.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.annotations.Beta;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Objects;
+import java.util.Set;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+/** ApiError */
+@Beta // CHECKSTYLE:OFF
+public class ApiError
+// CHECKSTYLE:ON
+{
+ @JsonProperty("code")
+ private String code;
+
+ @JsonProperty("message")
+ private String message;
+
+ @JsonProperty("requestId")
+ private String requestId;
+
+ @JsonProperty("target")
+ private String target;
+
+ @JsonProperty("details")
+ private List details = new ArrayList<>();
+
+ @JsonAnySetter @JsonAnyGetter
+ private final Map cloudSdkCustomFields = new LinkedHashMap<>();
+
+ /** Default constructor for ApiError. */
+ protected ApiError() {}
+
+ /**
+ * Set the code of this {@link ApiError} instance and return the same instance.
+ *
+ * @param code Descriptive error code (not http status code).
+ * @return The same instance of this {@link ApiError} class
+ */
+ @Nonnull
+ public ApiError code(@Nonnull final String code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * Descriptive error code (not http status code).
+ *
+ * @return code The code of this {@link ApiError} instance.
+ */
+ @Nonnull
+ public String getCode() {
+ return code;
+ }
+
+ /**
+ * Set the code of this {@link ApiError} instance.
+ *
+ * @param code Descriptive error code (not http status code).
+ */
+ public void setCode(@Nonnull final String code) {
+ this.code = code;
+ }
+
+ /**
+ * Set the message of this {@link ApiError} instance and return the same instance.
+ *
+ * @param message plaintext error description
+ * @return The same instance of this {@link ApiError} class
+ */
+ @Nonnull
+ public ApiError message(@Nonnull final String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * plaintext error description
+ *
+ * @return message The message of this {@link ApiError} instance.
+ */
+ @Nonnull
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * Set the message of this {@link ApiError} instance.
+ *
+ * @param message plaintext error description
+ */
+ public void setMessage(@Nonnull final String message) {
+ this.message = message;
+ }
+
+ /**
+ * Set the requestId of this {@link ApiError} instance and return the same instance.
+ *
+ * @param requestId id of individual request
+ * @return The same instance of this {@link ApiError} class
+ */
+ @Nonnull
+ public ApiError requestId(@Nullable final String requestId) {
+ this.requestId = requestId;
+ return this;
+ }
+
+ /**
+ * id of individual request
+ *
+ * @return requestId The requestId of this {@link ApiError} instance.
+ */
+ @Nonnull
+ public String getRequestId() {
+ return requestId;
+ }
+
+ /**
+ * Set the requestId of this {@link ApiError} instance.
+ *
+ * @param requestId id of individual request
+ */
+ public void setRequestId(@Nullable final String requestId) {
+ this.requestId = requestId;
+ }
+
+ /**
+ * Set the target of this {@link ApiError} instance and return the same instance.
+ *
+ * @param target url that has been called
+ * @return The same instance of this {@link ApiError} class
+ */
+ @Nonnull
+ public ApiError target(@Nullable final String target) {
+ this.target = target;
+ return this;
+ }
+
+ /**
+ * url that has been called
+ *
+ * @return target The target of this {@link ApiError} instance.
+ */
+ @Nonnull
+ public String getTarget() {
+ return target;
+ }
+
+ /**
+ * Set the target of this {@link ApiError} instance.
+ *
+ * @param target url that has been called
+ */
+ public void setTarget(@Nullable final String target) {
+ this.target = target;
+ }
+
+ /**
+ * Set the details of this {@link ApiError} instance and return the same instance.
+ *
+ * @param details The details of this {@link ApiError}
+ * @return The same instance of this {@link ApiError} class
+ */
+ @Nonnull
+ public ApiError details(@Nullable final List details) {
+ this.details = details;
+ return this;
+ }
+
+ /**
+ * Add one details instance to this {@link ApiError}.
+ *
+ * @param detailsItem The details that should be added
+ * @return The same instance of type {@link ApiError}
+ */
+ @Nonnull
+ public ApiError addDetailsItem(@Nonnull final DetailsErrorResponse detailsItem) {
+ if (this.details == null) {
+ this.details = new ArrayList<>();
+ }
+ this.details.add(detailsItem);
+ return this;
+ }
+
+ /**
+ * Get details
+ *
+ * @return details The details of this {@link ApiError} instance.
+ */
+ @Nonnull
+ public List getDetails() {
+ return details;
+ }
+
+ /**
+ * Set the details of this {@link ApiError} instance.
+ *
+ * @param details The details of this {@link ApiError}
+ */
+ public void setDetails(@Nullable final List details) {
+ this.details = details;
+ }
+
+ /**
+ * Get the names of the unrecognizable properties of the {@link ApiError}.
+ *
+ * @return The set of properties names
+ */
+ @JsonIgnore
+ @Nonnull
+ public Set getCustomFieldNames() {
+ return cloudSdkCustomFields.keySet();
+ }
+
+ /**
+ * Get the value of an unrecognizable property of this {@link ApiError} instance.
+ *
+ * @deprecated Use {@link #toMap()} instead.
+ * @param name The name of the property
+ * @return The value of the property
+ * @throws NoSuchElementException If no property with the given name could be found.
+ */
+ @Nullable
+ @Deprecated
+ public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
+ if (!cloudSdkCustomFields.containsKey(name)) {
+ throw new NoSuchElementException("ApiError has no field with name '" + name + "'.");
+ }
+ return cloudSdkCustomFields.get(name);
+ }
+
+ /**
+ * Get the value of all properties of this {@link ApiError} instance including unrecognized
+ * properties.
+ *
+ * @return The map of all properties
+ */
+ @JsonIgnore
+ @Nonnull
+ public Map toMap() {
+ final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
+ if (code != null) declaredFields.put("code", code);
+ if (message != null) declaredFields.put("message", message);
+ if (requestId != null) declaredFields.put("requestId", requestId);
+ if (target != null) declaredFields.put("target", target);
+ if (details != null) declaredFields.put("details", details);
+ return declaredFields;
+ }
+
+ /**
+ * Set an unrecognizable property of this {@link ApiError} instance. If the map previously
+ * contained a mapping for the key, the old value is replaced by the specified value.
+ *
+ * @param customFieldName The name of the property
+ * @param customFieldValue The value of the property
+ */
+ @JsonIgnore
+ public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) {
+ cloudSdkCustomFields.put(customFieldName, customFieldValue);
+ }
+
+ @Override
+ public boolean equals(@Nullable final java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ final ApiError apiError = (ApiError) o;
+ return Objects.equals(this.cloudSdkCustomFields, apiError.cloudSdkCustomFields)
+ && Objects.equals(this.code, apiError.code)
+ && Objects.equals(this.message, apiError.message)
+ && Objects.equals(this.requestId, apiError.requestId)
+ && Objects.equals(this.target, apiError.target)
+ && Objects.equals(this.details, apiError.details);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(code, message, requestId, target, details, cloudSdkCustomFields);
+ }
+
+ @Override
+ @Nonnull
+ public String toString() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("class ApiError {\n");
+ sb.append(" code: ").append(toIndentedString(code)).append("\n");
+ sb.append(" message: ").append(toIndentedString(message)).append("\n");
+ sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n");
+ sb.append(" target: ").append(toIndentedString(target)).append("\n");
+ sb.append(" details: ").append(toIndentedString(details)).append("\n");
+ cloudSdkCustomFields.forEach(
+ (k, v) ->
+ sb.append(" ").append(k).append(": ").append(toIndentedString(v)).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(final java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ /**
+ * Create a type-safe, fluent-api builder object to construct a new {@link ApiError} instance with
+ * all required arguments.
+ */
+ public static Builder create() {
+ return (code) -> (message) -> new ApiError().code(code).message(message);
+ }
+
+ /** Builder helper class. */
+ public interface Builder {
+ /**
+ * Set the code of this {@link ApiError} instance.
+ *
+ * @param code Descriptive error code (not http status code).
+ * @return The ApiError builder.
+ */
+ Builder1 code(@Nonnull final String code);
+ }
+
+ /** Builder helper class. */
+ public interface Builder1 {
+ /**
+ * Set the message of this {@link ApiError} instance.
+ *
+ * @param message plaintext error description
+ * @return The ApiError instance.
+ */
+ ApiError message(@Nonnull final String message);
+ }
+}
diff --git a/grounding/src/main/java/com/sap/ai/sdk/grounding/model/BaseDocument.java b/grounding/src/main/java/com/sap/ai/sdk/grounding/model/BaseDocument.java
new file mode 100644
index 000000000..de9051dba
--- /dev/null
+++ b/grounding/src/main/java/com/sap/ai/sdk/grounding/model/BaseDocument.java
@@ -0,0 +1,286 @@
+/*
+ * Document Grounding Pipeline API
+ * SAP AI Core - API Specification AI Data Management api's
+ *
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.sap.ai.sdk.grounding.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.annotations.Beta;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Objects;
+import java.util.Set;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+/** Base class for documents, document requests and responses. */
+@Beta // CHECKSTYLE:OFF
+public class BaseDocument
+// CHECKSTYLE:ON
+{
+ @JsonProperty("chunks")
+ private List chunks = new ArrayList<>();
+
+ @JsonProperty("metadata")
+ private List metadata = new ArrayList<>();
+
+ @JsonAnySetter @JsonAnyGetter
+ private final Map cloudSdkCustomFields = new LinkedHashMap<>();
+
+ /** Default constructor for BaseDocument. */
+ protected BaseDocument() {}
+
+ /**
+ * Set the chunks of this {@link BaseDocument} instance and return the same instance.
+ *
+ * @param chunks The chunks of this {@link BaseDocument}
+ * @return The same instance of this {@link BaseDocument} class
+ */
+ @Nonnull
+ public BaseDocument chunks(@Nonnull final List chunks) {
+ this.chunks = chunks;
+ return this;
+ }
+
+ /**
+ * Add one chunks instance to this {@link BaseDocument}.
+ *
+ * @param chunksItem The chunks that should be added
+ * @return The same instance of type {@link BaseDocument}
+ */
+ @Nonnull
+ public BaseDocument addChunksItem(@Nonnull final TextOnlyBaseChunk chunksItem) {
+ if (this.chunks == null) {
+ this.chunks = new ArrayList<>();
+ }
+ this.chunks.add(chunksItem);
+ return this;
+ }
+
+ /**
+ * Get chunks
+ *
+ * @return chunks The chunks of this {@link BaseDocument} instance.
+ */
+ @Nonnull
+ public List getChunks() {
+ return chunks;
+ }
+
+ /**
+ * Set the chunks of this {@link BaseDocument} instance.
+ *
+ * @param chunks The chunks of this {@link BaseDocument}
+ */
+ public void setChunks(@Nonnull final List chunks) {
+ this.chunks = chunks;
+ }
+
+ /**
+ * Set the metadata of this {@link BaseDocument} instance and return the same instance.
+ *
+ * @param metadata The metadata of this {@link BaseDocument}
+ * @return The same instance of this {@link BaseDocument} class
+ */
+ @Nonnull
+ public BaseDocument metadata(@Nonnull final List metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ /**
+ * Add one metadata instance to this {@link BaseDocument}.
+ *
+ * @param metadataItem The metadata that should be added
+ * @return The same instance of type {@link BaseDocument}
+ */
+ @Nonnull
+ public BaseDocument addMetadataItem(@Nonnull final DocumentKeyValueListPair metadataItem) {
+ if (this.metadata == null) {
+ this.metadata = new ArrayList<>();
+ }
+ this.metadata.add(metadataItem);
+ return this;
+ }
+
+ /**
+ * Get metadata
+ *
+ * @return metadata The metadata of this {@link BaseDocument} instance.
+ */
+ @Nonnull
+ public List getMetadata() {
+ return metadata;
+ }
+
+ /**
+ * Set the metadata of this {@link BaseDocument} instance.
+ *
+ * @param metadata The metadata of this {@link BaseDocument}
+ */
+ public void setMetadata(@Nonnull final List metadata) {
+ this.metadata = metadata;
+ }
+
+ /**
+ * Get the names of the unrecognizable properties of the {@link BaseDocument}.
+ *
+ * @return The set of properties names
+ */
+ @JsonIgnore
+ @Nonnull
+ public Set getCustomFieldNames() {
+ return cloudSdkCustomFields.keySet();
+ }
+
+ /**
+ * Get the value of an unrecognizable property of this {@link BaseDocument} instance.
+ *
+ * @deprecated Use {@link #toMap()} instead.
+ * @param name The name of the property
+ * @return The value of the property
+ * @throws NoSuchElementException If no property with the given name could be found.
+ */
+ @Nullable
+ @Deprecated
+ public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
+ if (!cloudSdkCustomFields.containsKey(name)) {
+ throw new NoSuchElementException("BaseDocument has no field with name '" + name + "'.");
+ }
+ return cloudSdkCustomFields.get(name);
+ }
+
+ /**
+ * Get the value of all properties of this {@link BaseDocument} instance including unrecognized
+ * properties.
+ *
+ * @return The map of all properties
+ */
+ @JsonIgnore
+ @Nonnull
+ public Map toMap() {
+ final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
+ if (chunks != null) declaredFields.put("chunks", chunks);
+ if (metadata != null) declaredFields.put("metadata", metadata);
+ return declaredFields;
+ }
+
+ /**
+ * Set an unrecognizable property of this {@link BaseDocument} instance. If the map previously
+ * contained a mapping for the key, the old value is replaced by the specified value.
+ *
+ * @param customFieldName The name of the property
+ * @param customFieldValue The value of the property
+ */
+ @JsonIgnore
+ public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) {
+ cloudSdkCustomFields.put(customFieldName, customFieldValue);
+ }
+
+ @Override
+ public boolean equals(@Nullable final java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ final BaseDocument baseDocument = (BaseDocument) o;
+ return Objects.equals(this.cloudSdkCustomFields, baseDocument.cloudSdkCustomFields)
+ && Objects.equals(this.chunks, baseDocument.chunks)
+ && Objects.equals(this.metadata, baseDocument.metadata);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(chunks, metadata, cloudSdkCustomFields);
+ }
+
+ @Override
+ @Nonnull
+ public String toString() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("class BaseDocument {\n");
+ sb.append(" chunks: ").append(toIndentedString(chunks)).append("\n");
+ sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
+ cloudSdkCustomFields.forEach(
+ (k, v) ->
+ sb.append(" ").append(k).append(": ").append(toIndentedString(v)).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(final java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ /**
+ * Create a type-safe, fluent-api builder object to construct a new {@link BaseDocument} instance
+ * with all required arguments.
+ */
+ public static Builder create() {
+ return (chunks) -> (metadata) -> new BaseDocument().chunks(chunks).metadata(metadata);
+ }
+
+ /** Builder helper class. */
+ public interface Builder {
+ /**
+ * Set the chunks of this {@link BaseDocument} instance.
+ *
+ * @param chunks The chunks of this {@link BaseDocument}
+ * @return The BaseDocument builder.
+ */
+ Builder1 chunks(@Nonnull final List chunks);
+
+ /**
+ * Set the chunks of this {@link BaseDocument} instance.
+ *
+ * @param chunks The chunks of this {@link BaseDocument}
+ * @return The BaseDocument builder.
+ */
+ default Builder1 chunks(@Nonnull final TextOnlyBaseChunk... chunks) {
+ return chunks(Arrays.asList(chunks));
+ }
+ }
+
+ /** Builder helper class. */
+ public interface Builder1 {
+ /**
+ * Set the metadata of this {@link BaseDocument} instance.
+ *
+ * @param metadata The metadata of this {@link BaseDocument}
+ * @return The BaseDocument instance.
+ */
+ BaseDocument metadata(@Nonnull final List metadata);
+
+ /**
+ * Set the metadata of this {@link BaseDocument} instance.
+ *
+ * @param metadata The metadata of this {@link BaseDocument}
+ * @return The BaseDocument instance.
+ */
+ default BaseDocument metadata(@Nonnull final DocumentKeyValueListPair... metadata) {
+ return metadata(Arrays.asList(metadata));
+ }
+ }
+}
diff --git a/grounding/src/main/java/com/sap/ai/sdk/grounding/model/Chunk.java b/grounding/src/main/java/com/sap/ai/sdk/grounding/model/Chunk.java
new file mode 100644
index 000000000..5cc660335
--- /dev/null
+++ b/grounding/src/main/java/com/sap/ai/sdk/grounding/model/Chunk.java
@@ -0,0 +1,287 @@
+/*
+ * Document Grounding Pipeline API
+ * SAP AI Core - API Specification AI Data Management api's
+ *
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.sap.ai.sdk.grounding.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.annotations.Beta;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Objects;
+import java.util.Set;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+/** Chunk */
+@Beta // CHECKSTYLE:OFF
+public class Chunk
+// CHECKSTYLE:ON
+{
+ @JsonProperty("id")
+ private String id;
+
+ @JsonProperty("content")
+ private String content;
+
+ @JsonProperty("metadata")
+ private List metadata = new ArrayList<>();
+
+ @JsonAnySetter @JsonAnyGetter
+ private final Map cloudSdkCustomFields = new LinkedHashMap<>();
+
+ /** Default constructor for Chunk. */
+ protected Chunk() {}
+
+ /**
+ * Set the id of this {@link Chunk} instance and return the same instance.
+ *
+ * @param id The id of this {@link Chunk}
+ * @return The same instance of this {@link Chunk} class
+ */
+ @Nonnull
+ public Chunk id(@Nonnull final String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get id
+ *
+ * @return id The id of this {@link Chunk} instance.
+ */
+ @Nonnull
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Set the id of this {@link Chunk} instance.
+ *
+ * @param id The id of this {@link Chunk}
+ */
+ public void setId(@Nonnull final String id) {
+ this.id = id;
+ }
+
+ /**
+ * Set the content of this {@link Chunk} instance and return the same instance.
+ *
+ * @param content The content of this {@link Chunk}
+ * @return The same instance of this {@link Chunk} class
+ */
+ @Nonnull
+ public Chunk content(@Nonnull final String content) {
+ this.content = content;
+ return this;
+ }
+
+ /**
+ * Get content
+ *
+ * @return content The content of this {@link Chunk} instance.
+ */
+ @Nonnull
+ public String getContent() {
+ return content;
+ }
+
+ /**
+ * Set the content of this {@link Chunk} instance.
+ *
+ * @param content The content of this {@link Chunk}
+ */
+ public void setContent(@Nonnull final String content) {
+ this.content = content;
+ }
+
+ /**
+ * Set the metadata of this {@link Chunk} instance and return the same instance.
+ *
+ * @param metadata The metadata of this {@link Chunk}
+ * @return The same instance of this {@link Chunk} class
+ */
+ @Nonnull
+ public Chunk metadata(@Nullable final List metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ /**
+ * Add one metadata instance to this {@link Chunk}.
+ *
+ * @param metadataItem The metadata that should be added
+ * @return The same instance of type {@link Chunk}
+ */
+ @Nonnull
+ public Chunk addMetadataItem(@Nonnull final KeyValueListPair metadataItem) {
+ if (this.metadata == null) {
+ this.metadata = new ArrayList<>();
+ }
+ this.metadata.add(metadataItem);
+ return this;
+ }
+
+ /**
+ * Get metadata
+ *
+ * @return metadata The metadata of this {@link Chunk} instance.
+ */
+ @Nonnull
+ public List getMetadata() {
+ return metadata;
+ }
+
+ /**
+ * Set the metadata of this {@link Chunk} instance.
+ *
+ * @param metadata The metadata of this {@link Chunk}
+ */
+ public void setMetadata(@Nullable final List metadata) {
+ this.metadata = metadata;
+ }
+
+ /**
+ * Get the names of the unrecognizable properties of the {@link Chunk}.
+ *
+ * @return The set of properties names
+ */
+ @JsonIgnore
+ @Nonnull
+ public Set getCustomFieldNames() {
+ return cloudSdkCustomFields.keySet();
+ }
+
+ /**
+ * Get the value of an unrecognizable property of this {@link Chunk} instance.
+ *
+ * @deprecated Use {@link #toMap()} instead.
+ * @param name The name of the property
+ * @return The value of the property
+ * @throws NoSuchElementException If no property with the given name could be found.
+ */
+ @Nullable
+ @Deprecated
+ public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
+ if (!cloudSdkCustomFields.containsKey(name)) {
+ throw new NoSuchElementException("Chunk has no field with name '" + name + "'.");
+ }
+ return cloudSdkCustomFields.get(name);
+ }
+
+ /**
+ * Get the value of all properties of this {@link Chunk} instance including unrecognized
+ * properties.
+ *
+ * @return The map of all properties
+ */
+ @JsonIgnore
+ @Nonnull
+ public Map toMap() {
+ final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
+ if (id != null) declaredFields.put("id", id);
+ if (content != null) declaredFields.put("content", content);
+ if (metadata != null) declaredFields.put("metadata", metadata);
+ return declaredFields;
+ }
+
+ /**
+ * Set an unrecognizable property of this {@link Chunk} instance. If the map previously contained
+ * a mapping for the key, the old value is replaced by the specified value.
+ *
+ * @param customFieldName The name of the property
+ * @param customFieldValue The value of the property
+ */
+ @JsonIgnore
+ public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) {
+ cloudSdkCustomFields.put(customFieldName, customFieldValue);
+ }
+
+ @Override
+ public boolean equals(@Nullable final java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ final Chunk chunk = (Chunk) o;
+ return Objects.equals(this.cloudSdkCustomFields, chunk.cloudSdkCustomFields)
+ && Objects.equals(this.id, chunk.id)
+ && Objects.equals(this.content, chunk.content)
+ && Objects.equals(this.metadata, chunk.metadata);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, content, metadata, cloudSdkCustomFields);
+ }
+
+ @Override
+ @Nonnull
+ public String toString() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("class Chunk {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" content: ").append(toIndentedString(content)).append("\n");
+ sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
+ cloudSdkCustomFields.forEach(
+ (k, v) ->
+ sb.append(" ").append(k).append(": ").append(toIndentedString(v)).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(final java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ /**
+ * Create a type-safe, fluent-api builder object to construct a new {@link Chunk} instance with
+ * all required arguments.
+ */
+ public static Builder create() {
+ return (id) -> (content) -> new Chunk().id(id).content(content);
+ }
+
+ /** Builder helper class. */
+ public interface Builder {
+ /**
+ * Set the id of this {@link Chunk} instance.
+ *
+ * @param id The id of this {@link Chunk}
+ * @return The Chunk builder.
+ */
+ Builder1 id(@Nonnull final String id);
+ }
+
+ /** Builder helper class. */
+ public interface Builder1 {
+ /**
+ * Set the content of this {@link Chunk} instance.
+ *
+ * @param content The content of this {@link Chunk}
+ * @return The Chunk instance.
+ */
+ Chunk content(@Nonnull final String content);
+ }
+}
diff --git a/grounding/src/main/java/com/sap/ai/sdk/grounding/model/Collection.java b/grounding/src/main/java/com/sap/ai/sdk/grounding/model/Collection.java
new file mode 100644
index 000000000..3641e1a01
--- /dev/null
+++ b/grounding/src/main/java/com/sap/ai/sdk/grounding/model/Collection.java
@@ -0,0 +1,327 @@
+/*
+ * Document Grounding Pipeline API
+ * SAP AI Core - API Specification AI Data Management api's
+ *
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.sap.ai.sdk.grounding.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.annotations.Beta;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Objects;
+import java.util.Set;
+import java.util.UUID;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+/** A logical grouping of content. */
+@Beta // CHECKSTYLE:OFF
+public class Collection
+// CHECKSTYLE:ON
+{
+ @JsonProperty("title")
+ private String title;
+
+ @JsonProperty("embeddingConfig")
+ private EmbeddingConfig embeddingConfig;
+
+ @JsonProperty("metadata")
+ private List metadata = new ArrayList<>();
+
+ @JsonProperty("id")
+ private UUID id;
+
+ @JsonAnySetter @JsonAnyGetter
+ private final Map cloudSdkCustomFields = new LinkedHashMap<>();
+
+ /** Default constructor for Collection. */
+ protected Collection() {}
+
+ /**
+ * Set the title of this {@link Collection} instance and return the same instance.
+ *
+ * @param title The title of this {@link Collection}
+ * @return The same instance of this {@link Collection} class
+ */
+ @Nonnull
+ public Collection title(@Nullable final String title) {
+ this.title = title;
+ return this;
+ }
+
+ /**
+ * Get title
+ *
+ * @return title The title of this {@link Collection} instance.
+ */
+ @Nonnull
+ public String getTitle() {
+ return title;
+ }
+
+ /**
+ * Set the title of this {@link Collection} instance.
+ *
+ * @param title The title of this {@link Collection}
+ */
+ public void setTitle(@Nullable final String title) {
+ this.title = title;
+ }
+
+ /**
+ * Set the embeddingConfig of this {@link Collection} instance and return the same instance.
+ *
+ * @param embeddingConfig The embeddingConfig of this {@link Collection}
+ * @return The same instance of this {@link Collection} class
+ */
+ @Nonnull
+ public Collection embeddingConfig(@Nonnull final EmbeddingConfig embeddingConfig) {
+ this.embeddingConfig = embeddingConfig;
+ return this;
+ }
+
+ /**
+ * Get embeddingConfig
+ *
+ * @return embeddingConfig The embeddingConfig of this {@link Collection} instance.
+ */
+ @Nonnull
+ public EmbeddingConfig getEmbeddingConfig() {
+ return embeddingConfig;
+ }
+
+ /**
+ * Set the embeddingConfig of this {@link Collection} instance.
+ *
+ * @param embeddingConfig The embeddingConfig of this {@link Collection}
+ */
+ public void setEmbeddingConfig(@Nonnull final EmbeddingConfig embeddingConfig) {
+ this.embeddingConfig = embeddingConfig;
+ }
+
+ /**
+ * Set the metadata of this {@link Collection} instance and return the same instance.
+ *
+ * @param metadata Metadata attached to collection. Useful to restrict search to a subset of
+ * collections.
+ * @return The same instance of this {@link Collection} class
+ */
+ @Nonnull
+ public Collection metadata(@Nullable final List metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ /**
+ * Add one metadata instance to this {@link Collection}.
+ *
+ * @param metadataItem The metadata that should be added
+ * @return The same instance of type {@link Collection}
+ */
+ @Nonnull
+ public Collection addMetadataItem(@Nonnull final KeyValueListPair metadataItem) {
+ if (this.metadata == null) {
+ this.metadata = new ArrayList<>();
+ }
+ this.metadata.add(metadataItem);
+ return this;
+ }
+
+ /**
+ * Metadata attached to collection. Useful to restrict search to a subset of collections.
+ *
+ * @return metadata The metadata of this {@link Collection} instance.
+ */
+ @Nonnull
+ public List getMetadata() {
+ return metadata;
+ }
+
+ /**
+ * Set the metadata of this {@link Collection} instance.
+ *
+ * @param metadata Metadata attached to collection. Useful to restrict search to a subset of
+ * collections.
+ */
+ public void setMetadata(@Nullable final List metadata) {
+ this.metadata = metadata;
+ }
+
+ /**
+ * Set the id of this {@link Collection} instance and return the same instance.
+ *
+ * @param id Unique identifier of a collection.
+ * @return The same instance of this {@link Collection} class
+ */
+ @Nonnull
+ public Collection id(@Nonnull final UUID id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Unique identifier of a collection.
+ *
+ * @return id The id of this {@link Collection} instance.
+ */
+ @Nonnull
+ public UUID getId() {
+ return id;
+ }
+
+ /**
+ * Set the id of this {@link Collection} instance.
+ *
+ * @param id Unique identifier of a collection.
+ */
+ public void setId(@Nonnull final UUID id) {
+ this.id = id;
+ }
+
+ /**
+ * Get the names of the unrecognizable properties of the {@link Collection}.
+ *
+ * @return The set of properties names
+ */
+ @JsonIgnore
+ @Nonnull
+ public Set getCustomFieldNames() {
+ return cloudSdkCustomFields.keySet();
+ }
+
+ /**
+ * Get the value of an unrecognizable property of this {@link Collection} instance.
+ *
+ * @deprecated Use {@link #toMap()} instead.
+ * @param name The name of the property
+ * @return The value of the property
+ * @throws NoSuchElementException If no property with the given name could be found.
+ */
+ @Nullable
+ @Deprecated
+ public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
+ if (!cloudSdkCustomFields.containsKey(name)) {
+ throw new NoSuchElementException("Collection has no field with name '" + name + "'.");
+ }
+ return cloudSdkCustomFields.get(name);
+ }
+
+ /**
+ * Get the value of all properties of this {@link Collection} instance including unrecognized
+ * properties.
+ *
+ * @return The map of all properties
+ */
+ @JsonIgnore
+ @Nonnull
+ public Map toMap() {
+ final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
+ if (title != null) declaredFields.put("title", title);
+ if (embeddingConfig != null) declaredFields.put("embeddingConfig", embeddingConfig);
+ if (metadata != null) declaredFields.put("metadata", metadata);
+ if (id != null) declaredFields.put("id", id);
+ return declaredFields;
+ }
+
+ /**
+ * Set an unrecognizable property of this {@link Collection} instance. If the map previously
+ * contained a mapping for the key, the old value is replaced by the specified value.
+ *
+ * @param customFieldName The name of the property
+ * @param customFieldValue The value of the property
+ */
+ @JsonIgnore
+ public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) {
+ cloudSdkCustomFields.put(customFieldName, customFieldValue);
+ }
+
+ @Override
+ public boolean equals(@Nullable final java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ final Collection collection = (Collection) o;
+ return Objects.equals(this.cloudSdkCustomFields, collection.cloudSdkCustomFields)
+ && Objects.equals(this.title, collection.title)
+ && Objects.equals(this.embeddingConfig, collection.embeddingConfig)
+ && Objects.equals(this.metadata, collection.metadata)
+ && Objects.equals(this.id, collection.id);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(title, embeddingConfig, metadata, id, cloudSdkCustomFields);
+ }
+
+ @Override
+ @Nonnull
+ public String toString() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("class Collection {\n");
+ sb.append(" title: ").append(toIndentedString(title)).append("\n");
+ sb.append(" embeddingConfig: ").append(toIndentedString(embeddingConfig)).append("\n");
+ sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ cloudSdkCustomFields.forEach(
+ (k, v) ->
+ sb.append(" ").append(k).append(": ").append(toIndentedString(v)).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(final java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ /**
+ * Create a type-safe, fluent-api builder object to construct a new {@link Collection} instance
+ * with all required arguments.
+ */
+ public static Builder create() {
+ return (embeddingConfig) -> (id) -> new Collection().embeddingConfig(embeddingConfig).id(id);
+ }
+
+ /** Builder helper class. */
+ public interface Builder {
+ /**
+ * Set the embeddingConfig of this {@link Collection} instance.
+ *
+ * @param embeddingConfig The embeddingConfig of this {@link Collection}
+ * @return The Collection builder.
+ */
+ Builder1 embeddingConfig(@Nonnull final EmbeddingConfig embeddingConfig);
+ }
+
+ /** Builder helper class. */
+ public interface Builder1 {
+ /**
+ * Set the id of this {@link Collection} instance.
+ *
+ * @param id Unique identifier of a collection.
+ * @return The Collection instance.
+ */
+ Collection id(@Nonnull final UUID id);
+ }
+}
diff --git a/grounding/src/main/java/com/sap/ai/sdk/grounding/model/CollectionCreatedResponse.java b/grounding/src/main/java/com/sap/ai/sdk/grounding/model/CollectionCreatedResponse.java
new file mode 100644
index 000000000..b5ef361c8
--- /dev/null
+++ b/grounding/src/main/java/com/sap/ai/sdk/grounding/model/CollectionCreatedResponse.java
@@ -0,0 +1,237 @@
+/*
+ * Document Grounding Pipeline API
+ * SAP AI Core - API Specification AI Data Management api's
+ *
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.sap.ai.sdk.grounding.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.annotations.Beta;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Objects;
+import java.util.Set;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+/** CollectionCreatedResponse */
+@Beta // CHECKSTYLE:OFF
+public class CollectionCreatedResponse
+ implements VectorV1VectorEndpointsGetCollectionCreationStatus200Response
+// CHECKSTYLE:ON
+{
+ @JsonProperty("collectionURL")
+ private String collectionURL;
+
+ @JsonProperty("status")
+ private String status;
+
+ @JsonAnySetter @JsonAnyGetter
+ private final Map cloudSdkCustomFields = new LinkedHashMap<>();
+
+ /** Default constructor for CollectionCreatedResponse. */
+ protected CollectionCreatedResponse() {}
+
+ /**
+ * Set the collectionURL of this {@link CollectionCreatedResponse} instance and return the same
+ * instance.
+ *
+ * @param collectionURL The collectionURL of this {@link CollectionCreatedResponse}
+ * @return The same instance of this {@link CollectionCreatedResponse} class
+ */
+ @Nonnull
+ public CollectionCreatedResponse collectionURL(@Nonnull final String collectionURL) {
+ this.collectionURL = collectionURL;
+ return this;
+ }
+
+ /**
+ * Get collectionURL
+ *
+ * @return collectionURL The collectionURL of this {@link CollectionCreatedResponse} instance.
+ */
+ @Nonnull
+ public String getCollectionURL() {
+ return collectionURL;
+ }
+
+ /**
+ * Set the collectionURL of this {@link CollectionCreatedResponse} instance.
+ *
+ * @param collectionURL The collectionURL of this {@link CollectionCreatedResponse}
+ */
+ public void setCollectionURL(@Nonnull final String collectionURL) {
+ this.collectionURL = collectionURL;
+ }
+
+ /**
+ * Set the status of this {@link CollectionCreatedResponse} instance and return the same instance.
+ *
+ * @param status The status of this {@link CollectionCreatedResponse}
+ * @return The same instance of this {@link CollectionCreatedResponse} class
+ */
+ @Nonnull
+ public CollectionCreatedResponse status(@Nonnull final String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ *
+ * @return status The status of this {@link CollectionCreatedResponse} instance.
+ */
+ @Nonnull
+ public String getStatus() {
+ return status;
+ }
+
+ /**
+ * Set the status of this {@link CollectionCreatedResponse} instance.
+ *
+ * @param status The status of this {@link CollectionCreatedResponse}
+ */
+ public void setStatus(@Nonnull final String status) {
+ this.status = status;
+ }
+
+ /**
+ * Get the names of the unrecognizable properties of the {@link CollectionCreatedResponse}.
+ *
+ * @return The set of properties names
+ */
+ @JsonIgnore
+ @Nonnull
+ public Set getCustomFieldNames() {
+ return cloudSdkCustomFields.keySet();
+ }
+
+ /**
+ * Get the value of an unrecognizable property of this {@link CollectionCreatedResponse} instance.
+ *
+ * @deprecated Use {@link #toMap()} instead.
+ * @param name The name of the property
+ * @return The value of the property
+ * @throws NoSuchElementException If no property with the given name could be found.
+ */
+ @Nullable
+ @Deprecated
+ public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
+ if (!cloudSdkCustomFields.containsKey(name)) {
+ throw new NoSuchElementException(
+ "CollectionCreatedResponse has no field with name '" + name + "'.");
+ }
+ return cloudSdkCustomFields.get(name);
+ }
+
+ /**
+ * Get the value of all properties of this {@link CollectionCreatedResponse} instance including
+ * unrecognized properties.
+ *
+ * @return The map of all properties
+ */
+ @JsonIgnore
+ @Nonnull
+ public Map toMap() {
+ final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
+ if (collectionURL != null) declaredFields.put("collectionURL", collectionURL);
+ if (status != null) declaredFields.put("status", status);
+ return declaredFields;
+ }
+
+ /**
+ * Set an unrecognizable property of this {@link CollectionCreatedResponse} instance. If the map
+ * previously contained a mapping for the key, the old value is replaced by the specified value.
+ *
+ * @param customFieldName The name of the property
+ * @param customFieldValue The value of the property
+ */
+ @JsonIgnore
+ public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) {
+ cloudSdkCustomFields.put(customFieldName, customFieldValue);
+ }
+
+ @Override
+ public boolean equals(@Nullable final java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ final CollectionCreatedResponse collectionCreatedResponse = (CollectionCreatedResponse) o;
+ return Objects.equals(this.cloudSdkCustomFields, collectionCreatedResponse.cloudSdkCustomFields)
+ && Objects.equals(this.collectionURL, collectionCreatedResponse.collectionURL)
+ && Objects.equals(this.status, collectionCreatedResponse.status);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(collectionURL, status, cloudSdkCustomFields);
+ }
+
+ @Override
+ @Nonnull
+ public String toString() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("class CollectionCreatedResponse {\n");
+ sb.append(" collectionURL: ").append(toIndentedString(collectionURL)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ cloudSdkCustomFields.forEach(
+ (k, v) ->
+ sb.append(" ").append(k).append(": ").append(toIndentedString(v)).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(final java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ /**
+ * Create a type-safe, fluent-api builder object to construct a new {@link
+ * CollectionCreatedResponse} instance with all required arguments.
+ */
+ public static Builder create() {
+ return (collectionURL) ->
+ (status) -> new CollectionCreatedResponse().collectionURL(collectionURL).status(status);
+ }
+
+ /** Builder helper class. */
+ public interface Builder {
+ /**
+ * Set the collectionURL of this {@link CollectionCreatedResponse} instance.
+ *
+ * @param collectionURL The collectionURL of this {@link CollectionCreatedResponse}
+ * @return The CollectionCreatedResponse builder.
+ */
+ Builder1 collectionURL(@Nonnull final String collectionURL);
+ }
+
+ /** Builder helper class. */
+ public interface Builder1 {
+ /**
+ * Set the status of this {@link CollectionCreatedResponse} instance.
+ *
+ * @param status The status of this {@link CollectionCreatedResponse}
+ * @return The CollectionCreatedResponse instance.
+ */
+ CollectionCreatedResponse status(@Nonnull final String status);
+ }
+}
diff --git a/grounding/src/main/java/com/sap/ai/sdk/grounding/model/CollectionDeletedResponse.java b/grounding/src/main/java/com/sap/ai/sdk/grounding/model/CollectionDeletedResponse.java
new file mode 100644
index 000000000..a9dbd1862
--- /dev/null
+++ b/grounding/src/main/java/com/sap/ai/sdk/grounding/model/CollectionDeletedResponse.java
@@ -0,0 +1,237 @@
+/*
+ * Document Grounding Pipeline API
+ * SAP AI Core - API Specification AI Data Management api's
+ *
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.sap.ai.sdk.grounding.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.annotations.Beta;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Objects;
+import java.util.Set;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+/** CollectionDeletedResponse */
+@Beta // CHECKSTYLE:OFF
+public class CollectionDeletedResponse
+ implements VectorV1VectorEndpointsGetCollectionDeletionStatus200Response
+// CHECKSTYLE:ON
+{
+ @JsonProperty("collectionURL")
+ private String collectionURL;
+
+ @JsonProperty("status")
+ private String status;
+
+ @JsonAnySetter @JsonAnyGetter
+ private final Map cloudSdkCustomFields = new LinkedHashMap<>();
+
+ /** Default constructor for CollectionDeletedResponse. */
+ protected CollectionDeletedResponse() {}
+
+ /**
+ * Set the collectionURL of this {@link CollectionDeletedResponse} instance and return the same
+ * instance.
+ *
+ * @param collectionURL The collectionURL of this {@link CollectionDeletedResponse}
+ * @return The same instance of this {@link CollectionDeletedResponse} class
+ */
+ @Nonnull
+ public CollectionDeletedResponse collectionURL(@Nonnull final String collectionURL) {
+ this.collectionURL = collectionURL;
+ return this;
+ }
+
+ /**
+ * Get collectionURL
+ *
+ * @return collectionURL The collectionURL of this {@link CollectionDeletedResponse} instance.
+ */
+ @Nonnull
+ public String getCollectionURL() {
+ return collectionURL;
+ }
+
+ /**
+ * Set the collectionURL of this {@link CollectionDeletedResponse} instance.
+ *
+ * @param collectionURL The collectionURL of this {@link CollectionDeletedResponse}
+ */
+ public void setCollectionURL(@Nonnull final String collectionURL) {
+ this.collectionURL = collectionURL;
+ }
+
+ /**
+ * Set the status of this {@link CollectionDeletedResponse} instance and return the same instance.
+ *
+ * @param status The status of this {@link CollectionDeletedResponse}
+ * @return The same instance of this {@link CollectionDeletedResponse} class
+ */
+ @Nonnull
+ public CollectionDeletedResponse status(@Nonnull final String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ *
+ * @return status The status of this {@link CollectionDeletedResponse} instance.
+ */
+ @Nonnull
+ public String getStatus() {
+ return status;
+ }
+
+ /**
+ * Set the status of this {@link CollectionDeletedResponse} instance.
+ *
+ * @param status The status of this {@link CollectionDeletedResponse}
+ */
+ public void setStatus(@Nonnull final String status) {
+ this.status = status;
+ }
+
+ /**
+ * Get the names of the unrecognizable properties of the {@link CollectionDeletedResponse}.
+ *
+ * @return The set of properties names
+ */
+ @JsonIgnore
+ @Nonnull
+ public Set getCustomFieldNames() {
+ return cloudSdkCustomFields.keySet();
+ }
+
+ /**
+ * Get the value of an unrecognizable property of this {@link CollectionDeletedResponse} instance.
+ *
+ * @deprecated Use {@link #toMap()} instead.
+ * @param name The name of the property
+ * @return The value of the property
+ * @throws NoSuchElementException If no property with the given name could be found.
+ */
+ @Nullable
+ @Deprecated
+ public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
+ if (!cloudSdkCustomFields.containsKey(name)) {
+ throw new NoSuchElementException(
+ "CollectionDeletedResponse has no field with name '" + name + "'.");
+ }
+ return cloudSdkCustomFields.get(name);
+ }
+
+ /**
+ * Get the value of all properties of this {@link CollectionDeletedResponse} instance including
+ * unrecognized properties.
+ *
+ * @return The map of all properties
+ */
+ @JsonIgnore
+ @Nonnull
+ public Map toMap() {
+ final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
+ if (collectionURL != null) declaredFields.put("collectionURL", collectionURL);
+ if (status != null) declaredFields.put("status", status);
+ return declaredFields;
+ }
+
+ /**
+ * Set an unrecognizable property of this {@link CollectionDeletedResponse} instance. If the map
+ * previously contained a mapping for the key, the old value is replaced by the specified value.
+ *
+ * @param customFieldName The name of the property
+ * @param customFieldValue The value of the property
+ */
+ @JsonIgnore
+ public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) {
+ cloudSdkCustomFields.put(customFieldName, customFieldValue);
+ }
+
+ @Override
+ public boolean equals(@Nullable final java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ final CollectionDeletedResponse collectionDeletedResponse = (CollectionDeletedResponse) o;
+ return Objects.equals(this.cloudSdkCustomFields, collectionDeletedResponse.cloudSdkCustomFields)
+ && Objects.equals(this.collectionURL, collectionDeletedResponse.collectionURL)
+ && Objects.equals(this.status, collectionDeletedResponse.status);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(collectionURL, status, cloudSdkCustomFields);
+ }
+
+ @Override
+ @Nonnull
+ public String toString() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("class CollectionDeletedResponse {\n");
+ sb.append(" collectionURL: ").append(toIndentedString(collectionURL)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ cloudSdkCustomFields.forEach(
+ (k, v) ->
+ sb.append(" ").append(k).append(": ").append(toIndentedString(v)).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(final java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ /**
+ * Create a type-safe, fluent-api builder object to construct a new {@link
+ * CollectionDeletedResponse} instance with all required arguments.
+ */
+ public static Builder create() {
+ return (collectionURL) ->
+ (status) -> new CollectionDeletedResponse().collectionURL(collectionURL).status(status);
+ }
+
+ /** Builder helper class. */
+ public interface Builder {
+ /**
+ * Set the collectionURL of this {@link CollectionDeletedResponse} instance.
+ *
+ * @param collectionURL The collectionURL of this {@link CollectionDeletedResponse}
+ * @return The CollectionDeletedResponse builder.
+ */
+ Builder1 collectionURL(@Nonnull final String collectionURL);
+ }
+
+ /** Builder helper class. */
+ public interface Builder1 {
+ /**
+ * Set the status of this {@link CollectionDeletedResponse} instance.
+ *
+ * @param status The status of this {@link CollectionDeletedResponse}
+ * @return The CollectionDeletedResponse instance.
+ */
+ CollectionDeletedResponse status(@Nonnull final String status);
+ }
+}
diff --git a/grounding/src/main/java/com/sap/ai/sdk/grounding/model/CollectionPendingResponse.java b/grounding/src/main/java/com/sap/ai/sdk/grounding/model/CollectionPendingResponse.java
new file mode 100644
index 000000000..bbfb25035
--- /dev/null
+++ b/grounding/src/main/java/com/sap/ai/sdk/grounding/model/CollectionPendingResponse.java
@@ -0,0 +1,239 @@
+/*
+ * Document Grounding Pipeline API
+ * SAP AI Core - API Specification AI Data Management api's
+ *
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.sap.ai.sdk.grounding.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.annotations.Beta;
+import java.net.URI;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Objects;
+import java.util.Set;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+/** CollectionPendingResponse */
+@Beta // CHECKSTYLE:OFF
+public class CollectionPendingResponse
+ implements VectorV1VectorEndpointsGetCollectionCreationStatus200Response,
+ VectorV1VectorEndpointsGetCollectionDeletionStatus200Response
+// CHECKSTYLE:ON
+{
+ @JsonProperty("Location")
+ private URI location;
+
+ @JsonProperty("status")
+ private String status;
+
+ @JsonAnySetter @JsonAnyGetter
+ private final Map cloudSdkCustomFields = new LinkedHashMap<>();
+
+ /** Default constructor for CollectionPendingResponse. */
+ protected CollectionPendingResponse() {}
+
+ /**
+ * Set the location of this {@link CollectionPendingResponse} instance and return the same
+ * instance.
+ *
+ * @param location The location of this {@link CollectionPendingResponse}
+ * @return The same instance of this {@link CollectionPendingResponse} class
+ */
+ @Nonnull
+ public CollectionPendingResponse location(@Nonnull final URI location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get location
+ *
+ * @return location The location of this {@link CollectionPendingResponse} instance.
+ */
+ @Nonnull
+ public URI getLocation() {
+ return location;
+ }
+
+ /**
+ * Set the location of this {@link CollectionPendingResponse} instance.
+ *
+ * @param location The location of this {@link CollectionPendingResponse}
+ */
+ public void setLocation(@Nonnull final URI location) {
+ this.location = location;
+ }
+
+ /**
+ * Set the status of this {@link CollectionPendingResponse} instance and return the same instance.
+ *
+ * @param status The status of this {@link CollectionPendingResponse}
+ * @return The same instance of this {@link CollectionPendingResponse} class
+ */
+ @Nonnull
+ public CollectionPendingResponse status(@Nonnull final String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ *
+ * @return status The status of this {@link CollectionPendingResponse} instance.
+ */
+ @Nonnull
+ public String getStatus() {
+ return status;
+ }
+
+ /**
+ * Set the status of this {@link CollectionPendingResponse} instance.
+ *
+ * @param status The status of this {@link CollectionPendingResponse}
+ */
+ public void setStatus(@Nonnull final String status) {
+ this.status = status;
+ }
+
+ /**
+ * Get the names of the unrecognizable properties of the {@link CollectionPendingResponse}.
+ *
+ * @return The set of properties names
+ */
+ @JsonIgnore
+ @Nonnull
+ public Set getCustomFieldNames() {
+ return cloudSdkCustomFields.keySet();
+ }
+
+ /**
+ * Get the value of an unrecognizable property of this {@link CollectionPendingResponse} instance.
+ *
+ * @deprecated Use {@link #toMap()} instead.
+ * @param name The name of the property
+ * @return The value of the property
+ * @throws NoSuchElementException If no property with the given name could be found.
+ */
+ @Nullable
+ @Deprecated
+ public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
+ if (!cloudSdkCustomFields.containsKey(name)) {
+ throw new NoSuchElementException(
+ "CollectionPendingResponse has no field with name '" + name + "'.");
+ }
+ return cloudSdkCustomFields.get(name);
+ }
+
+ /**
+ * Get the value of all properties of this {@link CollectionPendingResponse} instance including
+ * unrecognized properties.
+ *
+ * @return The map of all properties
+ */
+ @JsonIgnore
+ @Nonnull
+ public Map toMap() {
+ final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
+ if (location != null) declaredFields.put("location", location);
+ if (status != null) declaredFields.put("status", status);
+ return declaredFields;
+ }
+
+ /**
+ * Set an unrecognizable property of this {@link CollectionPendingResponse} instance. If the map
+ * previously contained a mapping for the key, the old value is replaced by the specified value.
+ *
+ * @param customFieldName The name of the property
+ * @param customFieldValue The value of the property
+ */
+ @JsonIgnore
+ public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) {
+ cloudSdkCustomFields.put(customFieldName, customFieldValue);
+ }
+
+ @Override
+ public boolean equals(@Nullable final java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ final CollectionPendingResponse collectionPendingResponse = (CollectionPendingResponse) o;
+ return Objects.equals(this.cloudSdkCustomFields, collectionPendingResponse.cloudSdkCustomFields)
+ && Objects.equals(this.location, collectionPendingResponse.location)
+ && Objects.equals(this.status, collectionPendingResponse.status);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(location, status, cloudSdkCustomFields);
+ }
+
+ @Override
+ @Nonnull
+ public String toString() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("class CollectionPendingResponse {\n");
+ sb.append(" location: ").append(toIndentedString(location)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ cloudSdkCustomFields.forEach(
+ (k, v) ->
+ sb.append(" ").append(k).append(": ").append(toIndentedString(v)).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(final java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ /**
+ * Create a type-safe, fluent-api builder object to construct a new {@link
+ * CollectionPendingResponse} instance with all required arguments.
+ */
+ public static Builder create() {
+ return (location) ->
+ (status) -> new CollectionPendingResponse().location(location).status(status);
+ }
+
+ /** Builder helper class. */
+ public interface Builder {
+ /**
+ * Set the location of this {@link CollectionPendingResponse} instance.
+ *
+ * @param location The location of this {@link CollectionPendingResponse}
+ * @return The CollectionPendingResponse builder.
+ */
+ Builder1 location(@Nonnull final URI location);
+ }
+
+ /** Builder helper class. */
+ public interface Builder1 {
+ /**
+ * Set the status of this {@link CollectionPendingResponse} instance.
+ *
+ * @param status The status of this {@link CollectionPendingResponse}
+ * @return The CollectionPendingResponse instance.
+ */
+ CollectionPendingResponse status(@Nonnull final String status);
+ }
+}
diff --git a/grounding/src/main/java/com/sap/ai/sdk/grounding/model/CollectionRequest.java b/grounding/src/main/java/com/sap/ai/sdk/grounding/model/CollectionRequest.java
new file mode 100644
index 000000000..2de143724
--- /dev/null
+++ b/grounding/src/main/java/com/sap/ai/sdk/grounding/model/CollectionRequest.java
@@ -0,0 +1,279 @@
+/*
+ * Document Grounding Pipeline API
+ * SAP AI Core - API Specification AI Data Management api's
+ *
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.sap.ai.sdk.grounding.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.annotations.Beta;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Objects;
+import java.util.Set;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+/** A request for creating a new, single collection. */
+@Beta // CHECKSTYLE:OFF
+public class CollectionRequest
+// CHECKSTYLE:ON
+{
+ @JsonProperty("title")
+ private String title;
+
+ @JsonProperty("embeddingConfig")
+ private EmbeddingConfig embeddingConfig;
+
+ @JsonProperty("metadata")
+ private List metadata = new ArrayList<>();
+
+ @JsonAnySetter @JsonAnyGetter
+ private final Map cloudSdkCustomFields = new LinkedHashMap<>();
+
+ /** Default constructor for CollectionRequest. */
+ protected CollectionRequest() {}
+
+ /**
+ * Set the title of this {@link CollectionRequest} instance and return the same instance.
+ *
+ * @param title The title of this {@link CollectionRequest}
+ * @return The same instance of this {@link CollectionRequest} class
+ */
+ @Nonnull
+ public CollectionRequest title(@Nullable final String title) {
+ this.title = title;
+ return this;
+ }
+
+ /**
+ * Get title
+ *
+ * @return title The title of this {@link CollectionRequest} instance.
+ */
+ @Nonnull
+ public String getTitle() {
+ return title;
+ }
+
+ /**
+ * Set the title of this {@link CollectionRequest} instance.
+ *
+ * @param title The title of this {@link CollectionRequest}
+ */
+ public void setTitle(@Nullable final String title) {
+ this.title = title;
+ }
+
+ /**
+ * Set the embeddingConfig of this {@link CollectionRequest} instance and return the same
+ * instance.
+ *
+ * @param embeddingConfig The embeddingConfig of this {@link CollectionRequest}
+ * @return The same instance of this {@link CollectionRequest} class
+ */
+ @Nonnull
+ public CollectionRequest embeddingConfig(@Nonnull final EmbeddingConfig embeddingConfig) {
+ this.embeddingConfig = embeddingConfig;
+ return this;
+ }
+
+ /**
+ * Get embeddingConfig
+ *
+ * @return embeddingConfig The embeddingConfig of this {@link CollectionRequest} instance.
+ */
+ @Nonnull
+ public EmbeddingConfig getEmbeddingConfig() {
+ return embeddingConfig;
+ }
+
+ /**
+ * Set the embeddingConfig of this {@link CollectionRequest} instance.
+ *
+ * @param embeddingConfig The embeddingConfig of this {@link CollectionRequest}
+ */
+ public void setEmbeddingConfig(@Nonnull final EmbeddingConfig embeddingConfig) {
+ this.embeddingConfig = embeddingConfig;
+ }
+
+ /**
+ * Set the metadata of this {@link CollectionRequest} instance and return the same instance.
+ *
+ * @param metadata Metadata attached to collection. Useful to restrict search to a subset of
+ * collections.
+ * @return The same instance of this {@link CollectionRequest} class
+ */
+ @Nonnull
+ public CollectionRequest metadata(@Nullable final List metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ /**
+ * Add one metadata instance to this {@link CollectionRequest}.
+ *
+ * @param metadataItem The metadata that should be added
+ * @return The same instance of type {@link CollectionRequest}
+ */
+ @Nonnull
+ public CollectionRequest addMetadataItem(@Nonnull final KeyValueListPair metadataItem) {
+ if (this.metadata == null) {
+ this.metadata = new ArrayList<>();
+ }
+ this.metadata.add(metadataItem);
+ return this;
+ }
+
+ /**
+ * Metadata attached to collection. Useful to restrict search to a subset of collections.
+ *
+ * @return metadata The metadata of this {@link CollectionRequest} instance.
+ */
+ @Nonnull
+ public List getMetadata() {
+ return metadata;
+ }
+
+ /**
+ * Set the metadata of this {@link CollectionRequest} instance.
+ *
+ * @param metadata Metadata attached to collection. Useful to restrict search to a subset of
+ * collections.
+ */
+ public void setMetadata(@Nullable final List metadata) {
+ this.metadata = metadata;
+ }
+
+ /**
+ * Get the names of the unrecognizable properties of the {@link CollectionRequest}.
+ *
+ * @return The set of properties names
+ */
+ @JsonIgnore
+ @Nonnull
+ public Set getCustomFieldNames() {
+ return cloudSdkCustomFields.keySet();
+ }
+
+ /**
+ * Get the value of an unrecognizable property of this {@link CollectionRequest} instance.
+ *
+ * @deprecated Use {@link #toMap()} instead.
+ * @param name The name of the property
+ * @return The value of the property
+ * @throws NoSuchElementException If no property with the given name could be found.
+ */
+ @Nullable
+ @Deprecated
+ public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
+ if (!cloudSdkCustomFields.containsKey(name)) {
+ throw new NoSuchElementException("CollectionRequest has no field with name '" + name + "'.");
+ }
+ return cloudSdkCustomFields.get(name);
+ }
+
+ /**
+ * Get the value of all properties of this {@link CollectionRequest} instance including
+ * unrecognized properties.
+ *
+ * @return The map of all properties
+ */
+ @JsonIgnore
+ @Nonnull
+ public Map toMap() {
+ final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
+ if (title != null) declaredFields.put("title", title);
+ if (embeddingConfig != null) declaredFields.put("embeddingConfig", embeddingConfig);
+ if (metadata != null) declaredFields.put("metadata", metadata);
+ return declaredFields;
+ }
+
+ /**
+ * Set an unrecognizable property of this {@link CollectionRequest} instance. If the map
+ * previously contained a mapping for the key, the old value is replaced by the specified value.
+ *
+ * @param customFieldName The name of the property
+ * @param customFieldValue The value of the property
+ */
+ @JsonIgnore
+ public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) {
+ cloudSdkCustomFields.put(customFieldName, customFieldValue);
+ }
+
+ @Override
+ public boolean equals(@Nullable final java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ final CollectionRequest collectionRequest = (CollectionRequest) o;
+ return Objects.equals(this.cloudSdkCustomFields, collectionRequest.cloudSdkCustomFields)
+ && Objects.equals(this.title, collectionRequest.title)
+ && Objects.equals(this.embeddingConfig, collectionRequest.embeddingConfig)
+ && Objects.equals(this.metadata, collectionRequest.metadata);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(title, embeddingConfig, metadata, cloudSdkCustomFields);
+ }
+
+ @Override
+ @Nonnull
+ public String toString() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("class CollectionRequest {\n");
+ sb.append(" title: ").append(toIndentedString(title)).append("\n");
+ sb.append(" embeddingConfig: ").append(toIndentedString(embeddingConfig)).append("\n");
+ sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
+ cloudSdkCustomFields.forEach(
+ (k, v) ->
+ sb.append(" ").append(k).append(": ").append(toIndentedString(v)).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(final java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ /**
+ * Create a type-safe, fluent-api builder object to construct a new {@link CollectionRequest}
+ * instance with all required arguments.
+ */
+ public static Builder create() {
+ return (embeddingConfig) -> new CollectionRequest().embeddingConfig(embeddingConfig);
+ }
+
+ /** Builder helper class. */
+ public interface Builder {
+ /**
+ * Set the embeddingConfig of this {@link CollectionRequest} instance.
+ *
+ * @param embeddingConfig The embeddingConfig of this {@link CollectionRequest}
+ * @return The CollectionRequest instance.
+ */
+ CollectionRequest embeddingConfig(@Nonnull final EmbeddingConfig embeddingConfig);
+ }
+}
diff --git a/grounding/src/main/java/com/sap/ai/sdk/grounding/model/CollectionsListResponse.java b/grounding/src/main/java/com/sap/ai/sdk/grounding/model/CollectionsListResponse.java
new file mode 100644
index 000000000..d5d263962
--- /dev/null
+++ b/grounding/src/main/java/com/sap/ai/sdk/grounding/model/CollectionsListResponse.java
@@ -0,0 +1,252 @@
+/*
+ * Document Grounding Pipeline API
+ * SAP AI Core - API Specification AI Data Management api's
+ *
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.sap.ai.sdk.grounding.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.annotations.Beta;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Objects;
+import java.util.Set;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+/** A response containing collections retrieved from the server. */
+@Beta // CHECKSTYLE:OFF
+public class CollectionsListResponse
+// CHECKSTYLE:ON
+{
+ @JsonProperty("resources")
+ private List resources = new ArrayList<>();
+
+ @JsonProperty("count")
+ private Integer count;
+
+ @JsonAnySetter @JsonAnyGetter
+ private final Map cloudSdkCustomFields = new LinkedHashMap<>();
+
+ /** Default constructor for CollectionsListResponse. */
+ protected CollectionsListResponse() {}
+
+ /**
+ * Set the resources of this {@link CollectionsListResponse} instance and return the same
+ * instance.
+ *
+ * @param resources The resources of this {@link CollectionsListResponse}
+ * @return The same instance of this {@link CollectionsListResponse} class
+ */
+ @Nonnull
+ public CollectionsListResponse resources(@Nonnull final List resources) {
+ this.resources = resources;
+ return this;
+ }
+
+ /**
+ * Add one resources instance to this {@link CollectionsListResponse}.
+ *
+ * @param resourcesItem The resources that should be added
+ * @return The same instance of type {@link CollectionsListResponse}
+ */
+ @Nonnull
+ public CollectionsListResponse addResourcesItem(@Nonnull final Collection resourcesItem) {
+ if (this.resources == null) {
+ this.resources = new ArrayList<>();
+ }
+ this.resources.add(resourcesItem);
+ return this;
+ }
+
+ /**
+ * Get resources
+ *
+ * @return resources The resources of this {@link CollectionsListResponse} instance.
+ */
+ @Nonnull
+ public List getResources() {
+ return resources;
+ }
+
+ /**
+ * Set the resources of this {@link CollectionsListResponse} instance.
+ *
+ * @param resources The resources of this {@link CollectionsListResponse}
+ */
+ public void setResources(@Nonnull final List resources) {
+ this.resources = resources;
+ }
+
+ /**
+ * Set the count of this {@link CollectionsListResponse} instance and return the same instance.
+ *
+ * @param count The count of this {@link CollectionsListResponse}
+ * @return The same instance of this {@link CollectionsListResponse} class
+ */
+ @Nonnull
+ public CollectionsListResponse count(@Nullable final Integer count) {
+ this.count = count;
+ return this;
+ }
+
+ /**
+ * Get count
+ *
+ * @return count The count of this {@link CollectionsListResponse} instance.
+ */
+ @Nonnull
+ public Integer getCount() {
+ return count;
+ }
+
+ /**
+ * Set the count of this {@link CollectionsListResponse} instance.
+ *
+ * @param count The count of this {@link CollectionsListResponse}
+ */
+ public void setCount(@Nullable final Integer count) {
+ this.count = count;
+ }
+
+ /**
+ * Get the names of the unrecognizable properties of the {@link CollectionsListResponse}.
+ *
+ * @return The set of properties names
+ */
+ @JsonIgnore
+ @Nonnull
+ public Set getCustomFieldNames() {
+ return cloudSdkCustomFields.keySet();
+ }
+
+ /**
+ * Get the value of an unrecognizable property of this {@link CollectionsListResponse} instance.
+ *
+ * @deprecated Use {@link #toMap()} instead.
+ * @param name The name of the property
+ * @return The value of the property
+ * @throws NoSuchElementException If no property with the given name could be found.
+ */
+ @Nullable
+ @Deprecated
+ public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
+ if (!cloudSdkCustomFields.containsKey(name)) {
+ throw new NoSuchElementException(
+ "CollectionsListResponse has no field with name '" + name + "'.");
+ }
+ return cloudSdkCustomFields.get(name);
+ }
+
+ /**
+ * Get the value of all properties of this {@link CollectionsListResponse} instance including
+ * unrecognized properties.
+ *
+ * @return The map of all properties
+ */
+ @JsonIgnore
+ @Nonnull
+ public Map toMap() {
+ final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
+ if (resources != null) declaredFields.put("resources", resources);
+ if (count != null) declaredFields.put("count", count);
+ return declaredFields;
+ }
+
+ /**
+ * Set an unrecognizable property of this {@link CollectionsListResponse} instance. If the map
+ * previously contained a mapping for the key, the old value is replaced by the specified value.
+ *
+ * @param customFieldName The name of the property
+ * @param customFieldValue The value of the property
+ */
+ @JsonIgnore
+ public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) {
+ cloudSdkCustomFields.put(customFieldName, customFieldValue);
+ }
+
+ @Override
+ public boolean equals(@Nullable final java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ final CollectionsListResponse collectionsListResponse = (CollectionsListResponse) o;
+ return Objects.equals(this.cloudSdkCustomFields, collectionsListResponse.cloudSdkCustomFields)
+ && Objects.equals(this.resources, collectionsListResponse.resources)
+ && Objects.equals(this.count, collectionsListResponse.count);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(resources, count, cloudSdkCustomFields);
+ }
+
+ @Override
+ @Nonnull
+ public String toString() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("class CollectionsListResponse {\n");
+ sb.append(" resources: ").append(toIndentedString(resources)).append("\n");
+ sb.append(" count: ").append(toIndentedString(count)).append("\n");
+ cloudSdkCustomFields.forEach(
+ (k, v) ->
+ sb.append(" ").append(k).append(": ").append(toIndentedString(v)).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(final java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ /**
+ * Create a type-safe, fluent-api builder object to construct a new {@link
+ * CollectionsListResponse} instance with all required arguments.
+ */
+ public static Builder create() {
+ return (resources) -> new CollectionsListResponse().resources(resources);
+ }
+
+ /** Builder helper class. */
+ public interface Builder {
+ /**
+ * Set the resources of this {@link CollectionsListResponse} instance.
+ *
+ * @param resources The resources of this {@link CollectionsListResponse}
+ * @return The CollectionsListResponse instance.
+ */
+ CollectionsListResponse resources(@Nonnull final List resources);
+
+ /**
+ * Set the resources of this {@link CollectionsListResponse} instance.
+ *
+ * @param resources The resources of this {@link CollectionsListResponse}
+ * @return The CollectionsListResponse instance.
+ */
+ default CollectionsListResponse resources(@Nonnull final Collection... resources) {
+ return resources(Arrays.asList(resources));
+ }
+ }
+}
diff --git a/grounding/src/main/java/com/sap/ai/sdk/grounding/model/DataRepositories.java b/grounding/src/main/java/com/sap/ai/sdk/grounding/model/DataRepositories.java
new file mode 100644
index 000000000..4191562c5
--- /dev/null
+++ b/grounding/src/main/java/com/sap/ai/sdk/grounding/model/DataRepositories.java
@@ -0,0 +1,250 @@
+/*
+ * Document Grounding Pipeline API
+ * SAP AI Core - API Specification AI Data Management api's
+ *
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.sap.ai.sdk.grounding.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.annotations.Beta;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Objects;
+import java.util.Set;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+/** DataRepositories */
+@Beta // CHECKSTYLE:OFF
+public class DataRepositories
+// CHECKSTYLE:ON
+{
+ @JsonProperty("resources")
+ private List resources = new ArrayList<>();
+
+ @JsonProperty("count")
+ private Integer count;
+
+ @JsonAnySetter @JsonAnyGetter
+ private final Map cloudSdkCustomFields = new LinkedHashMap<>();
+
+ /** Default constructor for DataRepositories. */
+ protected DataRepositories() {}
+
+ /**
+ * Set the resources of this {@link DataRepositories} instance and return the same instance.
+ *
+ * @param resources The resources of this {@link DataRepositories}
+ * @return The same instance of this {@link DataRepositories} class
+ */
+ @Nonnull
+ public DataRepositories resources(@Nonnull final List