Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,6 @@ Class | Method | HTTP request | Description
- [SBOMPackage](docs/SBOMPackage.md)
- [SandboxOptions](docs/SandboxOptions.md)
- [ScrapeThirdPartyConfig](docs/ScrapeThirdPartyConfig.md)
- [SearchBinaryIds](docs/SearchBinaryIds.md)
- [SearchFunctionIds](docs/SearchFunctionIds.md)
- [SectionModel](docs/SectionModel.md)
- [SecurityChecksResponse](docs/SecurityChecksResponse.md)
- [SecurityChecksResult](docs/SecurityChecksResult.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/AppApiRestV2SimilaritySchemaANNFunction.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
|**distance** | **BigDecimal** | The distance between two neighbours | [optional] |
|**analysisSearchIds** | **List<Integer>** | Perform a search on functions within a list of analyses | [optional] |
|**collectionSearchIds** | **List<Integer>** | Search only within these collections | [optional] |
|**searchBinaryIds** | [**SearchBinaryIds**](SearchBinaryIds.md) | | [optional] |
|**searchFunctionIds** | [**SearchFunctionIds**](SearchFunctionIds.md) | | [optional] |
|**searchBinaryIds** | **List<Integer>** | | [optional] |
|**searchFunctionIds** | **List<Integer>** | | [optional] |
|**debugOnly** | **Boolean** | Searches for only functions which are debug | [optional] |


Expand Down
13 changes: 0 additions & 13 deletions docs/SearchBinaryIds.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/SearchFunctionIds.md

This file was deleted.

2 changes: 0 additions & 2 deletions src/main/java/ai/reveng/invoker/JSON.java
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SBOMPackage.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SandboxOptions.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ScrapeThirdPartyConfig.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SearchBinaryIds.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SearchFunctionIds.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SectionModel.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SecurityChecksResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SecurityChecksResult.CustomTypeAdapterFactory());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

import java.util.Objects;
import java.util.Locale;
import ai.reveng.model.SearchBinaryIds;
import ai.reveng.model.SearchFunctionIds;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
Expand All @@ -26,6 +24,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.openapitools.jackson.nullable.JsonNullable;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
Expand Down Expand Up @@ -79,12 +78,12 @@ public class AppApiRestV2SimilaritySchemaANNFunction {
public static final String SERIALIZED_NAME_SEARCH_BINARY_IDS = "search_binary_ids";
@SerializedName(SERIALIZED_NAME_SEARCH_BINARY_IDS)
@javax.annotation.Nullable
private SearchBinaryIds searchBinaryIds;
private List<Integer> searchBinaryIds;

public static final String SERIALIZED_NAME_SEARCH_FUNCTION_IDS = "search_function_ids";
@SerializedName(SERIALIZED_NAME_SEARCH_FUNCTION_IDS)
@javax.annotation.Nullable
private SearchFunctionIds searchFunctionIds;
private List<Integer> searchFunctionIds;

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


public AppApiRestV2SimilaritySchemaANNFunction searchBinaryIds(@javax.annotation.Nullable SearchBinaryIds searchBinaryIds) {
public AppApiRestV2SimilaritySchemaANNFunction searchBinaryIds(@javax.annotation.Nullable List<Integer> searchBinaryIds) {
this.searchBinaryIds = searchBinaryIds;
return this;
}

public AppApiRestV2SimilaritySchemaANNFunction addSearchBinaryIdsItem(Integer searchBinaryIdsItem) {
if (this.searchBinaryIds == null) {
this.searchBinaryIds = new ArrayList<>();
}
this.searchBinaryIds.add(searchBinaryIdsItem);
return this;
}

/**
* Get searchBinaryIds
* @return searchBinaryIds
*/
@javax.annotation.Nullable
public SearchBinaryIds getSearchBinaryIds() {
public List<Integer> getSearchBinaryIds() {
return searchBinaryIds;
}

public void setSearchBinaryIds(@javax.annotation.Nullable SearchBinaryIds searchBinaryIds) {
public void setSearchBinaryIds(@javax.annotation.Nullable List<Integer> searchBinaryIds) {
this.searchBinaryIds = searchBinaryIds;
}


public AppApiRestV2SimilaritySchemaANNFunction searchFunctionIds(@javax.annotation.Nullable SearchFunctionIds searchFunctionIds) {
public AppApiRestV2SimilaritySchemaANNFunction searchFunctionIds(@javax.annotation.Nullable List<Integer> searchFunctionIds) {
this.searchFunctionIds = searchFunctionIds;
return this;
}

public AppApiRestV2SimilaritySchemaANNFunction addSearchFunctionIdsItem(Integer searchFunctionIdsItem) {
if (this.searchFunctionIds == null) {
this.searchFunctionIds = new ArrayList<>();
}
this.searchFunctionIds.add(searchFunctionIdsItem);
return this;
}

/**
* Get searchFunctionIds
* @return searchFunctionIds
*/
@javax.annotation.Nullable
public SearchFunctionIds getSearchFunctionIds() {
public List<Integer> getSearchFunctionIds() {
return searchFunctionIds;
}

public void setSearchFunctionIds(@javax.annotation.Nullable SearchFunctionIds searchFunctionIds) {
public void setSearchFunctionIds(@javax.annotation.Nullable List<Integer> searchFunctionIds) {
this.searchFunctionIds = searchFunctionIds;
}

Expand Down Expand Up @@ -307,11 +322,22 @@ public boolean equals(Object o) {
Objects.equals(this.additionalProperties, appApiRestV2SimilaritySchemaANNFunction.additionalProperties);
}

private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
}

@Override
public int hashCode() {
return Objects.hash(limit, distance, analysisSearchIds, collectionSearchIds, searchBinaryIds, searchFunctionIds, debugOnly, additionalProperties);
}

private static <T> int hashCodeNullable(JsonNullable<T> a) {
if (a == null) {
return 1;
}
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Expand Down Expand Up @@ -372,13 +398,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if (jsonObj.get("collection_search_ids") != null && !jsonObj.get("collection_search_ids").isJsonNull() && !jsonObj.get("collection_search_ids").isJsonArray()) {
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()));
}
// validate the optional field `search_binary_ids`
if (jsonObj.get("search_binary_ids") != null && !jsonObj.get("search_binary_ids").isJsonNull()) {
SearchBinaryIds.validateJsonElement(jsonObj.get("search_binary_ids"));
// ensure the optional json data is an array if present
if (jsonObj.get("search_binary_ids") != null && !jsonObj.get("search_binary_ids").isJsonNull() && !jsonObj.get("search_binary_ids").isJsonArray()) {
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()));
}
// validate the optional field `search_function_ids`
if (jsonObj.get("search_function_ids") != null && !jsonObj.get("search_function_ids").isJsonNull()) {
SearchFunctionIds.validateJsonElement(jsonObj.get("search_function_ids"));
// ensure the optional json data is an array if present
if (jsonObj.get("search_function_ids") != null && !jsonObj.get("search_function_ids").isJsonNull() && !jsonObj.get("search_function_ids").isJsonArray()) {
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()));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/reveng/model/FunctionBatchAnn.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class FunctionBatchAnn {
public static final String SERIALIZED_NAME_SUCCESS = "success";
@SerializedName(SERIALIZED_NAME_SUCCESS)
@javax.annotation.Nullable
private Object success = null;
private Object success = true;

public static final String SERIALIZED_NAME_SETTINGS = "settings";
@SerializedName(SERIALIZED_NAME_SETTINGS)
Expand Down
Loading