Skip to content

Commit 805b91e

Browse files
authored
Merge pull request #12 from RevEngAI/sdk-update-v1.98.1
🤖 Update SDK to version v1.98.1
2 parents 6c30572 + 9834819 commit 805b91e

12 files changed

Lines changed: 46 additions & 693 deletions

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,8 +456,6 @@ Class | Method | HTTP request | Description
456456
- [SBOMPackage](docs/SBOMPackage.md)
457457
- [SandboxOptions](docs/SandboxOptions.md)
458458
- [ScrapeThirdPartyConfig](docs/ScrapeThirdPartyConfig.md)
459-
- [SearchBinaryIds](docs/SearchBinaryIds.md)
460-
- [SearchFunctionIds](docs/SearchFunctionIds.md)
461459
- [SectionModel](docs/SectionModel.md)
462460
- [SecurityChecksResponse](docs/SecurityChecksResponse.md)
463461
- [SecurityChecksResult](docs/SecurityChecksResult.md)

docs/AppApiRestV2SimilaritySchemaANNFunction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
|**distance** | **BigDecimal** | The distance between two neighbours | [optional] |
1212
|**analysisSearchIds** | **List<Integer>** | Perform a search on functions within a list of analyses | [optional] |
1313
|**collectionSearchIds** | **List<Integer>** | Search only within these collections | [optional] |
14-
|**searchBinaryIds** | [**SearchBinaryIds**](SearchBinaryIds.md) | | [optional] |
15-
|**searchFunctionIds** | [**SearchFunctionIds**](SearchFunctionIds.md) | | [optional] |
14+
|**searchBinaryIds** | **List<Integer>** | | [optional] |
15+
|**searchFunctionIds** | **List<Integer>** | | [optional] |
1616
|**debugOnly** | **Boolean** | Searches for only functions which are debug | [optional] |
1717

1818

docs/SearchBinaryIds.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

docs/SearchFunctionIds.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/main/java/ai/reveng/invoker/JSON.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
343343
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SBOMPackage.CustomTypeAdapterFactory());
344344
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SandboxOptions.CustomTypeAdapterFactory());
345345
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ScrapeThirdPartyConfig.CustomTypeAdapterFactory());
346-
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SearchBinaryIds.CustomTypeAdapterFactory());
347-
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SearchFunctionIds.CustomTypeAdapterFactory());
348346
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SectionModel.CustomTypeAdapterFactory());
349347
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SecurityChecksResponse.CustomTypeAdapterFactory());
350348
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SecurityChecksResult.CustomTypeAdapterFactory());

src/main/java/ai/reveng/model/AppApiRestV2SimilaritySchemaANNFunction.java

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
import java.util.Objects;
1616
import java.util.Locale;
17-
import ai.reveng.model.SearchBinaryIds;
18-
import ai.reveng.model.SearchFunctionIds;
1917
import com.google.gson.TypeAdapter;
2018
import com.google.gson.annotations.JsonAdapter;
2119
import com.google.gson.annotations.SerializedName;
@@ -26,6 +24,7 @@
2624
import java.util.ArrayList;
2725
import java.util.Arrays;
2826
import java.util.List;
27+
import org.openapitools.jackson.nullable.JsonNullable;
2928

3029
import com.google.gson.Gson;
3130
import com.google.gson.GsonBuilder;
@@ -79,12 +78,12 @@ public class AppApiRestV2SimilaritySchemaANNFunction {
7978
public static final String SERIALIZED_NAME_SEARCH_BINARY_IDS = "search_binary_ids";
8079
@SerializedName(SERIALIZED_NAME_SEARCH_BINARY_IDS)
8180
@javax.annotation.Nullable
82-
private SearchBinaryIds searchBinaryIds;
81+
private List<Integer> searchBinaryIds;
8382

8483
public static final String SERIALIZED_NAME_SEARCH_FUNCTION_IDS = "search_function_ids";
8584
@SerializedName(SERIALIZED_NAME_SEARCH_FUNCTION_IDS)
8685
@javax.annotation.Nullable
87-
private SearchFunctionIds searchFunctionIds;
86+
private List<Integer> searchFunctionIds;
8887

8988
public static final String SERIALIZED_NAME_DEBUG_ONLY = "debug_only";
9089
@SerializedName(SERIALIZED_NAME_DEBUG_ONLY)
@@ -186,40 +185,56 @@ public void setCollectionSearchIds(@javax.annotation.Nullable List<Integer> coll
186185
}
187186

188187

189-
public AppApiRestV2SimilaritySchemaANNFunction searchBinaryIds(@javax.annotation.Nullable SearchBinaryIds searchBinaryIds) {
188+
public AppApiRestV2SimilaritySchemaANNFunction searchBinaryIds(@javax.annotation.Nullable List<Integer> searchBinaryIds) {
190189
this.searchBinaryIds = searchBinaryIds;
191190
return this;
192191
}
193192

193+
public AppApiRestV2SimilaritySchemaANNFunction addSearchBinaryIdsItem(Integer searchBinaryIdsItem) {
194+
if (this.searchBinaryIds == null) {
195+
this.searchBinaryIds = new ArrayList<>();
196+
}
197+
this.searchBinaryIds.add(searchBinaryIdsItem);
198+
return this;
199+
}
200+
194201
/**
195202
* Get searchBinaryIds
196203
* @return searchBinaryIds
197204
*/
198205
@javax.annotation.Nullable
199-
public SearchBinaryIds getSearchBinaryIds() {
206+
public List<Integer> getSearchBinaryIds() {
200207
return searchBinaryIds;
201208
}
202209

203-
public void setSearchBinaryIds(@javax.annotation.Nullable SearchBinaryIds searchBinaryIds) {
210+
public void setSearchBinaryIds(@javax.annotation.Nullable List<Integer> searchBinaryIds) {
204211
this.searchBinaryIds = searchBinaryIds;
205212
}
206213

207214

208-
public AppApiRestV2SimilaritySchemaANNFunction searchFunctionIds(@javax.annotation.Nullable SearchFunctionIds searchFunctionIds) {
215+
public AppApiRestV2SimilaritySchemaANNFunction searchFunctionIds(@javax.annotation.Nullable List<Integer> searchFunctionIds) {
209216
this.searchFunctionIds = searchFunctionIds;
210217
return this;
211218
}
212219

220+
public AppApiRestV2SimilaritySchemaANNFunction addSearchFunctionIdsItem(Integer searchFunctionIdsItem) {
221+
if (this.searchFunctionIds == null) {
222+
this.searchFunctionIds = new ArrayList<>();
223+
}
224+
this.searchFunctionIds.add(searchFunctionIdsItem);
225+
return this;
226+
}
227+
213228
/**
214229
* Get searchFunctionIds
215230
* @return searchFunctionIds
216231
*/
217232
@javax.annotation.Nullable
218-
public SearchFunctionIds getSearchFunctionIds() {
233+
public List<Integer> getSearchFunctionIds() {
219234
return searchFunctionIds;
220235
}
221236

222-
public void setSearchFunctionIds(@javax.annotation.Nullable SearchFunctionIds searchFunctionIds) {
237+
public void setSearchFunctionIds(@javax.annotation.Nullable List<Integer> searchFunctionIds) {
223238
this.searchFunctionIds = searchFunctionIds;
224239
}
225240

@@ -307,11 +322,22 @@ public boolean equals(Object o) {
307322
Objects.equals(this.additionalProperties, appApiRestV2SimilaritySchemaANNFunction.additionalProperties);
308323
}
309324

325+
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
326+
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
327+
}
328+
310329
@Override
311330
public int hashCode() {
312331
return Objects.hash(limit, distance, analysisSearchIds, collectionSearchIds, searchBinaryIds, searchFunctionIds, debugOnly, additionalProperties);
313332
}
314333

334+
private static <T> int hashCodeNullable(JsonNullable<T> a) {
335+
if (a == null) {
336+
return 1;
337+
}
338+
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
339+
}
340+
315341
@Override
316342
public String toString() {
317343
StringBuilder sb = new StringBuilder();
@@ -372,13 +398,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
372398
if (jsonObj.get("collection_search_ids") != null && !jsonObj.get("collection_search_ids").isJsonNull() && !jsonObj.get("collection_search_ids").isJsonArray()) {
373399
throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `collection_search_ids` to be an array in the JSON string but got `%s`", jsonObj.get("collection_search_ids").toString()));
374400
}
375-
// validate the optional field `search_binary_ids`
376-
if (jsonObj.get("search_binary_ids") != null && !jsonObj.get("search_binary_ids").isJsonNull()) {
377-
SearchBinaryIds.validateJsonElement(jsonObj.get("search_binary_ids"));
401+
// ensure the optional json data is an array if present
402+
if (jsonObj.get("search_binary_ids") != null && !jsonObj.get("search_binary_ids").isJsonNull() && !jsonObj.get("search_binary_ids").isJsonArray()) {
403+
throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `search_binary_ids` to be an array in the JSON string but got `%s`", jsonObj.get("search_binary_ids").toString()));
378404
}
379-
// validate the optional field `search_function_ids`
380-
if (jsonObj.get("search_function_ids") != null && !jsonObj.get("search_function_ids").isJsonNull()) {
381-
SearchFunctionIds.validateJsonElement(jsonObj.get("search_function_ids"));
405+
// ensure the optional json data is an array if present
406+
if (jsonObj.get("search_function_ids") != null && !jsonObj.get("search_function_ids").isJsonNull() && !jsonObj.get("search_function_ids").isJsonArray()) {
407+
throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `search_function_ids` to be an array in the JSON string but got `%s`", jsonObj.get("search_function_ids").toString()));
382408
}
383409
}
384410

src/main/java/ai/reveng/model/FunctionBatchAnn.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public class FunctionBatchAnn {
5555
public static final String SERIALIZED_NAME_SUCCESS = "success";
5656
@SerializedName(SERIALIZED_NAME_SUCCESS)
5757
@javax.annotation.Nullable
58-
private Object success = null;
58+
private Object success = true;
5959

6060
public static final String SERIALIZED_NAME_SETTINGS = "settings";
6161
@SerializedName(SERIALIZED_NAME_SETTINGS)

0 commit comments

Comments
 (0)