Skip to content

Commit f08fe04

Browse files
final
1 parent 109b1dc commit f08fe04

File tree

11 files changed

+1225
-45
lines changed

11 files changed

+1225
-45
lines changed

core-services/document-grounding/src/main/java/com/sap/ai/sdk/grounding/client/RetrievalApi.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import com.sap.ai.sdk.grounding.model.DataRepositories;
55
import com.sap.ai.sdk.grounding.model.DataRepository;
66
import com.sap.ai.sdk.grounding.model.RetrievalSearchInput;
7-
import com.sap.ai.sdk.grounding.model.SearchResults;
7+
import com.sap.ai.sdk.grounding.model.RetrievalSearchResults;
88
import com.sap.cloud.sdk.cloudplatform.connectivity.Destination;
99
import com.sap.cloud.sdk.services.openapi.apiclient.ApiClient;
1010
import com.sap.cloud.sdk.services.openapi.core.AbstractOpenApiService;
@@ -232,11 +232,11 @@ public DataRepository getDataRepositoryById(
232232
*
233233
* @param aiResourceGroup Resource Group ID
234234
* @param retrievalSearchInput The value for the parameter retrievalSearchInput
235-
* @return SearchResults
235+
* @return RetrievalSearchResults
236236
* @throws OpenApiRequestException if an error occurs while attempting to invoke the API
237237
*/
238238
@Nonnull
239-
public SearchResults search(
239+
public RetrievalSearchResults search(
240240
@Nonnull final String aiResourceGroup,
241241
@Nonnull final RetrievalSearchInput retrievalSearchInput)
242242
throws OpenApiRequestException {
@@ -273,8 +273,8 @@ public SearchResults search(
273273

274274
final String[] localVarAuthNames = new String[] {};
275275

276-
final ParameterizedTypeReference<SearchResults> localVarReturnType =
277-
new ParameterizedTypeReference<SearchResults>() {};
276+
final ParameterizedTypeReference<RetrievalSearchResults> localVarReturnType =
277+
new ParameterizedTypeReference<RetrievalSearchResults>() {};
278278
return apiClient.invokeAPI(
279279
localVarPath,
280280
HttpMethod.POST,

core-services/document-grounding/src/main/java/com/sap/ai/sdk/grounding/model/DataRepositorySearchResults.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class DataRepositorySearchResults
3232
// CHECKSTYLE:ON
3333
{
3434
@JsonProperty("results")
35-
private List<ResultsInner1> results = new ArrayList<>();
35+
private List<ResultsInner2> results = new ArrayList<>();
3636

3737
@JsonAnySetter @JsonAnyGetter
3838
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
@@ -48,7 +48,7 @@ protected DataRepositorySearchResults() {}
4848
* @return The same instance of this {@link DataRepositorySearchResults} class
4949
*/
5050
@Nonnull
51-
public DataRepositorySearchResults results(@Nonnull final List<ResultsInner1> results) {
51+
public DataRepositorySearchResults results(@Nonnull final List<ResultsInner2> results) {
5252
this.results = results;
5353
return this;
5454
}
@@ -60,7 +60,7 @@ public DataRepositorySearchResults results(@Nonnull final List<ResultsInner1> re
6060
* @return The same instance of type {@link DataRepositorySearchResults}
6161
*/
6262
@Nonnull
63-
public DataRepositorySearchResults addResultsItem(@Nonnull final ResultsInner1 resultsItem) {
63+
public DataRepositorySearchResults addResultsItem(@Nonnull final ResultsInner2 resultsItem) {
6464
if (this.results == null) {
6565
this.results = new ArrayList<>();
6666
}
@@ -74,7 +74,7 @@ public DataRepositorySearchResults addResultsItem(@Nonnull final ResultsInner1 r
7474
* @return results The results of this {@link DataRepositorySearchResults} instance.
7575
*/
7676
@Nonnull
77-
public List<ResultsInner1> getResults() {
77+
public List<ResultsInner2> getResults() {
7878
return results;
7979
}
8080

@@ -83,7 +83,7 @@ public List<ResultsInner1> getResults() {
8383
*
8484
* @param results List of returned results.
8585
*/
86-
public void setResults(@Nonnull final List<ResultsInner1> results) {
86+
public void setResults(@Nonnull final List<ResultsInner2> results) {
8787
this.results = results;
8888
}
8989

@@ -201,15 +201,15 @@ public interface Builder {
201201
* @param results List of returned results.
202202
* @return The DataRepositorySearchResults instance.
203203
*/
204-
DataRepositorySearchResults results(@Nonnull final List<ResultsInner1> results);
204+
DataRepositorySearchResults results(@Nonnull final List<ResultsInner2> results);
205205

206206
/**
207207
* Set the results of this {@link DataRepositorySearchResults} instance.
208208
*
209209
* @param results List of returned results.
210210
* @return The DataRepositorySearchResults instance.
211211
*/
212-
default DataRepositorySearchResults results(@Nonnull final ResultsInner1... results) {
212+
default DataRepositorySearchResults results(@Nonnull final ResultsInner2... results) {
213213
return results(Arrays.asList(results));
214214
}
215215
}

core-services/document-grounding/src/main/java/com/sap/ai/sdk/grounding/model/ResultsInner1.java

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ public class ResultsInner1
3434
private String filterId;
3535

3636
@JsonProperty("results")
37-
private List<DataRepositorySearchResult> results = new ArrayList<>();
37+
private List<RetrievalDataRepositorySearchResult> results = new ArrayList<>();
3838

39-
@JsonProperty("error")
40-
private PerFilterSearchResultError error;
39+
@JsonProperty("message")
40+
private String message;
4141

4242
@JsonAnySetter @JsonAnyGetter
4343
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
@@ -83,7 +83,7 @@ public void setFilterId(@Nonnull final String filterId) {
8383
* @return The same instance of this {@link ResultsInner1} class
8484
*/
8585
@Nonnull
86-
public ResultsInner1 results(@Nullable final List<DataRepositorySearchResult> results) {
86+
public ResultsInner1 results(@Nullable final List<RetrievalDataRepositorySearchResult> results) {
8787
this.results = results;
8888
return this;
8989
}
@@ -95,7 +95,8 @@ public ResultsInner1 results(@Nullable final List<DataRepositorySearchResult> re
9595
* @return The same instance of type {@link ResultsInner1}
9696
*/
9797
@Nonnull
98-
public ResultsInner1 addResultsItem(@Nonnull final DataRepositorySearchResult resultsItem) {
98+
public ResultsInner1 addResultsItem(
99+
@Nonnull final RetrievalDataRepositorySearchResult resultsItem) {
99100
if (this.results == null) {
100101
this.results = new ArrayList<>();
101102
}
@@ -109,7 +110,7 @@ public ResultsInner1 addResultsItem(@Nonnull final DataRepositorySearchResult re
109110
* @return results The results of this {@link ResultsInner1} instance.
110111
*/
111112
@Nonnull
112-
public List<DataRepositorySearchResult> getResults() {
113+
public List<RetrievalDataRepositorySearchResult> getResults() {
113114
return results;
114115
}
115116

@@ -118,39 +119,39 @@ public List<DataRepositorySearchResult> getResults() {
118119
*
119120
* @param results List of returned results.
120121
*/
121-
public void setResults(@Nullable final List<DataRepositorySearchResult> results) {
122+
public void setResults(@Nullable final List<RetrievalDataRepositorySearchResult> results) {
122123
this.results = results;
123124
}
124125

125126
/**
126-
* Set the error of this {@link ResultsInner1} instance and return the same instance.
127+
* Set the message of this {@link ResultsInner1} instance and return the same instance.
127128
*
128-
* @param error The error of this {@link ResultsInner1}
129+
* @param message The message of this {@link ResultsInner1}
129130
* @return The same instance of this {@link ResultsInner1} class
130131
*/
131132
@Nonnull
132-
public ResultsInner1 error(@Nullable final PerFilterSearchResultError error) {
133-
this.error = error;
133+
public ResultsInner1 message(@Nonnull final String message) {
134+
this.message = message;
134135
return this;
135136
}
136137

137138
/**
138-
* Get error
139+
* Get message
139140
*
140-
* @return error The error of this {@link ResultsInner1} instance.
141+
* @return message The message of this {@link ResultsInner1} instance.
141142
*/
142143
@Nonnull
143-
public PerFilterSearchResultError getError() {
144-
return error;
144+
public String getMessage() {
145+
return message;
145146
}
146147

147148
/**
148-
* Set the error of this {@link ResultsInner1} instance.
149+
* Set the message of this {@link ResultsInner1} instance.
149150
*
150-
* @param error The error of this {@link ResultsInner1}
151+
* @param message The message of this {@link ResultsInner1}
151152
*/
152-
public void setError(@Nullable final PerFilterSearchResultError error) {
153-
this.error = error;
153+
public void setMessage(@Nonnull final String message) {
154+
this.message = message;
154155
}
155156

156157
/**
@@ -193,7 +194,7 @@ public Map<String, Object> toMap() {
193194
final Map<String, Object> declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
194195
if (filterId != null) declaredFields.put("filterId", filterId);
195196
if (results != null) declaredFields.put("results", results);
196-
if (error != null) declaredFields.put("error", error);
197+
if (message != null) declaredFields.put("message", message);
197198
return declaredFields;
198199
}
199200

@@ -221,12 +222,12 @@ public boolean equals(@Nullable final java.lang.Object o) {
221222
return Objects.equals(this.cloudSdkCustomFields, resultsInner1.cloudSdkCustomFields)
222223
&& Objects.equals(this.filterId, resultsInner1.filterId)
223224
&& Objects.equals(this.results, resultsInner1.results)
224-
&& Objects.equals(this.error, resultsInner1.error);
225+
&& Objects.equals(this.message, resultsInner1.message);
225226
}
226227

227228
@Override
228229
public int hashCode() {
229-
return Objects.hash(filterId, results, error, cloudSdkCustomFields);
230+
return Objects.hash(filterId, results, message, cloudSdkCustomFields);
230231
}
231232

232233
@Override
@@ -236,7 +237,7 @@ public String toString() {
236237
sb.append("class ResultsInner1 {\n");
237238
sb.append(" filterId: ").append(toIndentedString(filterId)).append("\n");
238239
sb.append(" results: ").append(toIndentedString(results)).append("\n");
239-
sb.append(" error: ").append(toIndentedString(error)).append("\n");
240+
sb.append(" message: ").append(toIndentedString(message)).append("\n");
240241
cloudSdkCustomFields.forEach(
241242
(k, v) ->
242243
sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n"));
@@ -259,7 +260,7 @@ private String toIndentedString(final java.lang.Object o) {
259260
* with all required arguments.
260261
*/
261262
public static Builder create() {
262-
return (filterId) -> new ResultsInner1().filterId(filterId);
263+
return (filterId) -> (message) -> new ResultsInner1().filterId(filterId).message(message);
263264
}
264265

265266
/** Builder helper class. */
@@ -268,8 +269,19 @@ public interface Builder {
268269
* Set the filterId of this {@link ResultsInner1} instance.
269270
*
270271
* @param filterId The filterId of this {@link ResultsInner1}
272+
* @return The ResultsInner1 builder.
273+
*/
274+
Builder1 filterId(@Nonnull final String filterId);
275+
}
276+
277+
/** Builder helper class. */
278+
public interface Builder1 {
279+
/**
280+
* Set the message of this {@link ResultsInner1} instance.
281+
*
282+
* @param message The message of this {@link ResultsInner1}
271283
* @return The ResultsInner1 instance.
272284
*/
273-
ResultsInner1 filterId(@Nonnull final String filterId);
285+
ResultsInner1 message(@Nonnull final String message);
274286
}
275287
}

0 commit comments

Comments
 (0)