diff --git a/.sdk-version b/.sdk-version index 051b3df..3d5a70b 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.118.0 +v3.123.0 diff --git a/README.md b/README.md index a868893..a8c07bd 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add this dependency to your project's POM: ai.reveng sdk - 3.118.0 + 3.123.0 compile ``` @@ -31,7 +31,7 @@ repositories { } dependencies { - implementation "ai.reveng:sdk:3.118.0" + implementation "ai.reveng:sdk:3.123.0" } ``` diff --git a/build.gradle b/build.gradle index 0fd3752..bf212d9 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'ai.reveng' -version = '3.118.0' +version = '3.123.0' @@ -171,7 +171,7 @@ mavenPublishing { publishToMavenCentral(true) signAllPublications() - coordinates("ai.reveng", "sdk", "3.118.0") + coordinates("ai.reveng", "sdk", "3.123.0") pom { name = "sdk" diff --git a/build.sbt b/build.sbt index 5392426..792662b 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "ai.reveng", name := "sdk", - version := "3.118.0", + version := "3.123.0", scalaVersion := "2.11.12", scalacOptions ++= Seq("-feature"), compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/docs/AnalysisFunctionEntry.md b/docs/AnalysisFunctionEntry.md index 18842e9..369a59c 100644 --- a/docs/AnalysisFunctionEntry.md +++ b/docs/AnalysisFunctionEntry.md @@ -14,7 +14,9 @@ |**functionSize** | **Long** | | | |**functionVaddr** | **Long** | | | |**mangledName** | **String** | Search is applied to string value | [optional] | +|**sourceAnalysisId** | **Long** | ID of the analysis the source function belongs to, if any | [optional] | |**sourceBinaryId** | **Long** | | [optional] | +|**sourceFunctionId** | **Long** | ID of the source function this name was transferred from, if any | [optional] | |**sourceType** | **String** | | | diff --git a/docs/AppApiRestV2CollectionsEnumsOrderBy.md b/docs/AppApiRestV2CollectionsEnumsOrderBy.md index 1a1f859..d03c1ec 100644 --- a/docs/AppApiRestV2CollectionsEnumsOrderBy.md +++ b/docs/AppApiRestV2CollectionsEnumsOrderBy.md @@ -9,8 +9,6 @@ * `COLLECTION` (value: `"collection"`) -* `MODEL` (value: `"model"`) - * `OWNER` (value: `"owner"`) * `COLLECTION_SIZE` (value: `"collection_size"`) diff --git a/docs/CollectionCreateRequest.md b/docs/CollectionCreateRequest.md index 845dbb8..4c9bf5c 100644 --- a/docs/CollectionCreateRequest.md +++ b/docs/CollectionCreateRequest.md @@ -12,7 +12,6 @@ |**collectionScope** | **CollectionScope** | | [optional] | |**tags** | **List<String>** | | [optional] | |**binaries** | **List<Integer>** | | [optional] | -|**modelId** | **Integer** | | | diff --git a/docs/CollectionListItem.md b/docs/CollectionListItem.md index 3153e1f..5541904 100644 --- a/docs/CollectionListItem.md +++ b/docs/CollectionListItem.md @@ -16,7 +16,6 @@ |**collectionSize** | **Integer** | The size of the collection | | |**collectionId** | **Integer** | The ID of the collection | | |**creation** | **OffsetDateTime** | The datetime of when the collection was created | | -|**modelName** | **String** | The model being used for the collection | | |**teamId** | **Integer** | The team ID for the collection | [optional] | diff --git a/docs/CollectionListItemBody.md b/docs/CollectionListItemBody.md index 954aa63..1f55265 100644 --- a/docs/CollectionListItemBody.md +++ b/docs/CollectionListItemBody.md @@ -15,9 +15,9 @@ |**collectionTags** | **List<String>** | | | |**creation** | **OffsetDateTime** | | | |**description** | **String** | | | -|**modelName** | **String** | | | |**officialCollection** | **Boolean** | | | |**teamId** | **Long** | | | +|**updatedAt** | **OffsetDateTime** | | | diff --git a/docs/CollectionResponse.md b/docs/CollectionResponse.md index dab9c02..f1eecb9 100644 --- a/docs/CollectionResponse.md +++ b/docs/CollectionResponse.md @@ -10,7 +10,6 @@ |**collectionId** | **Integer** | Collection ID | | |**collectionName** | **String** | Collection name | | |**description** | **String** | Collection description | | -|**modelId** | **Integer** | Collection model ID | | |**userId** | **Integer** | Collection user ID | | |**teamId** | **Integer** | Collection team ID | [optional] | |**collectionScope** | **CollectionScope** | Collection public status | | diff --git a/docs/CollectionSearchResult.md b/docs/CollectionSearchResult.md index cadc3cc..10ef66c 100644 --- a/docs/CollectionSearchResult.md +++ b/docs/CollectionSearchResult.md @@ -12,8 +12,6 @@ |**scope** | **String** | The scope of the collection | | |**lastUpdatedAt** | **OffsetDateTime** | The last update date of the collection | | |**createdAt** | **OffsetDateTime** | The creation date of the collection | | -|**modelId** | **Integer** | The model ID of the binary | | -|**modelName** | **String** | The name of the model | | |**ownedBy** | **String** | The owner of the collection | | |**tags** | **List<String>** | The tags of the collection | [optional] | |**size** | **Integer** | The number of binaries in the collection | [optional] | diff --git a/docs/CollectionsApi.md b/docs/CollectionsApi.md index c408b0a..25d879a 100644 --- a/docs/CollectionsApi.md +++ b/docs/CollectionsApi.md @@ -314,7 +314,7 @@ public class Example { | **filters** | [**List<Filters>**](Filters.md)| | [optional] | | **limit** | **Integer**| | [optional] [default to 20] | | **offset** | **Integer**| | [optional] [default to 0] | -| **orderBy** | [**AppApiRestV2CollectionsEnumsOrderBy**](.md)| | [optional] [default to collection] [enum: created, collection, model, owner, collection_size, updated] | +| **orderBy** | [**AppApiRestV2CollectionsEnumsOrderBy**](.md)| | [optional] [default to collection] [enum: created, collection, owner, collection_size, updated] | | **order** | [**Order**](.md)| | [optional] [default to ASC] [enum: ASC, DESC] | ### Return type @@ -865,7 +865,7 @@ public class Example { | **filters** | [**List<String>**](String.md)| | [optional] [enum: official_only, user_only, team_only, public_only, hide_empty] | | **limit** | **Long**| | [optional] [default to 20] | | **offset** | **Long**| | [optional] [default to 0] | -| **orderBy** | **String**| | [optional] [default to collection] [enum: created, collection, model, collection_size, updated] | +| **orderBy** | **String**| | [optional] [default to collection] [enum: created, collection, collection_size, updated, owner] | | **order** | **String**| | [optional] [default to ASC] [enum: ASC, DESC] | ### Return type diff --git a/docs/CreateCollectionInputBody.md b/docs/CreateCollectionInputBody.md index 54371eb..4a2d4f9 100644 --- a/docs/CreateCollectionInputBody.md +++ b/docs/CreateCollectionInputBody.md @@ -11,7 +11,6 @@ |**collectionName** | **String** | Collection name. | | |**collectionScope** | [**CollectionScopeEnum**](#CollectionScopeEnum) | Visibility scope. | | |**description** | **String** | Collection description. | | -|**modelId** | **Long** | Model ID the collection is associated with. | | |**tags** | **List<String>** | Optional tags to attach to the collection. | [optional] | diff --git a/docs/CreateCollectionOutputBody.md b/docs/CreateCollectionOutputBody.md index b9aeff5..691a8e3 100644 --- a/docs/CreateCollectionOutputBody.md +++ b/docs/CreateCollectionOutputBody.md @@ -13,7 +13,6 @@ |**collectionScope** | **String** | | | |**createdAt** | **OffsetDateTime** | | | |**description** | **String** | | | -|**modelId** | **Long** | | | |**tags** | **List<String>** | | [optional] | |**teamId** | **Long** | | | |**updatedAt** | **OffsetDateTime** | | | diff --git a/docs/ErrorBody.md b/docs/ErrorBody.md index 74c34f3..ddc8a0e 100644 --- a/docs/ErrorBody.md +++ b/docs/ErrorBody.md @@ -50,6 +50,8 @@ | INVALID_INVITE_CODE | "INVALID_INVITE_CODE" | | INVALID_RESET_CODE | "INVALID_RESET_CODE" | | LAST_ORG_OWNER | "LAST_ORG_OWNER" | +| LAST_TEAM_ADMIN | "LAST_TEAM_ADMIN" | +| LAST_TEAM_MEMBER | "LAST_TEAM_MEMBER" | | LINKED_TO_ORG | "LINKED_TO_ORG" | | METHOD_NOT_ALLOWED | "METHOD_NOT_ALLOWED" | | NOT_ACCEPTABLE | "NOT_ACCEPTABLE" | diff --git a/docs/GetCollectionOutputBody.md b/docs/GetCollectionOutputBody.md index cf7a012..480817f 100644 --- a/docs/GetCollectionOutputBody.md +++ b/docs/GetCollectionOutputBody.md @@ -14,7 +14,6 @@ |**createdAt** | **OffsetDateTime** | | | |**description** | **String** | | | |**hasNextPage** | **Boolean** | | [optional] | -|**modelId** | **Long** | | | |**pageNumber** | **Long** | | [optional] | |**pageSize** | **Long** | | [optional] | |**tags** | **List<String>** | | [optional] | diff --git a/docs/HistoryEntry.md b/docs/HistoryEntry.md index f6a2bf7..8e3a5f5 100644 --- a/docs/HistoryEntry.md +++ b/docs/HistoryEntry.md @@ -13,6 +13,8 @@ |**historyId** | **Long** | History record ID | | |**isDebug** | **Boolean** | Whether the function had debug info | | |**mangledName** | **String** | Mangled function name | [optional] | +|**sourceAnalysisId** | **Long** | ID of the analysis the source function belongs to, if any | [optional] | +|**sourceFunctionId** | **Long** | ID of the source function this name was transferred from, if any | [optional] | |**sourceType** | **String** | Source of the rename (USER, SYSTEM, AI_UNSTRIP, etc.) | | diff --git a/docs/MatchFilters.md b/docs/MatchFilters.md index 092536d..c0457b4 100644 --- a/docs/MatchFilters.md +++ b/docs/MatchFilters.md @@ -7,11 +7,38 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**arch** | [**ArchEnum**](#ArchEnum) | Restrict matches to this architecture (multi-platform models only; matches all architectures if omitted). Rejected for single-architecture models. | [optional] | |**binaryIds** | **List<Long>** | Restrict the candidate pool to these binary IDs. | [optional] | +|**bits** | **Long** | Restrict matches to this word size (multi-platform models only). Rejected for single-architecture models. | [optional] | |**collectionIds** | **List<Long>** | Restrict the candidate pool to binaries in these collection IDs. | [optional] | |**debugTypes** | **List<String>** | Restrict matches to candidates with these debug source types. Accepted: SYSTEM, USER. | [optional] | |**functionIds** | **List<Long>** | Restrict the candidate pool to these function IDs. | [optional] | +|**platform** | [**PlatformEnum**](#PlatformEnum) | Restrict matches to this platform (multi-platform models only; matches all platforms if omitted). Rejected for single-architecture models. | [optional] | |**userIds** | **List<Long>** | Restrict the candidate pool to functions owned by these user IDs. | [optional] | +## Enum: ArchEnum + +| Name | Value | +|---- | -----| +| X86 | "x86" | +| ARM | "arm" | +| UNKNOWN | "unknown" | +| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | + + + +## Enum: PlatformEnum + +| Name | Value | +|---- | -----| +| LINUX | "linux" | +| WINDOWS | "windows" | +| ANDROID | "android" | +| MACOS | "macos" | +| UNKNOWN | "unknown" | +| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | + + + diff --git a/docs/PatchCollectionOutputBody.md b/docs/PatchCollectionOutputBody.md index 32c2f6a..1173f46 100644 --- a/docs/PatchCollectionOutputBody.md +++ b/docs/PatchCollectionOutputBody.md @@ -13,7 +13,6 @@ |**collectionScope** | **String** | | | |**createdAt** | **OffsetDateTime** | | | |**description** | **String** | | | -|**modelId** | **Long** | | | |**teamId** | **Long** | | | |**updatedAt** | **OffsetDateTime** | | | |**userId** | **Long** | | | diff --git a/docs/SearchApi.md b/docs/SearchApi.md index 32e2f1b..3a1e232 100644 --- a/docs/SearchApi.md +++ b/docs/SearchApi.md @@ -100,7 +100,7 @@ public class Example { # **searchCollections** -> BaseResponseCollectionSearchResponse searchCollections(page, pageSize, partialCollectionName, partialBinaryName, partialBinarySha256, tags, modelName, filters, orderBy, orderByDirection) +> BaseResponseCollectionSearchResponse searchCollections(page, pageSize, partialCollectionName, partialBinaryName, partialBinarySha256, tags, filters, orderBy, orderByDirection) Collections search @@ -138,12 +138,11 @@ public class Example { String partialBinaryName = "partialBinaryName_example"; // String | The partial or full name of the binary belonging to the collection String partialBinarySha256 = "partialBinarySha256_example"; // String | The partial or full sha256 of the binary belonging to the collection List tags = Arrays.asList(); // List | The tags to be searched for - String modelName = "modelName_example"; // String | The name of the model used to analyze the binary the function belongs to List filters = Arrays.asList(); // List | The filters to be used for the search AppApiRestV2CollectionsEnumsOrderBy orderBy = AppApiRestV2CollectionsEnumsOrderBy.fromValue("created"); // AppApiRestV2CollectionsEnumsOrderBy | The field to sort the order by in the results Order orderByDirection = Order.fromValue("ASC"); // Order | The order direction in which to return results try { - BaseResponseCollectionSearchResponse result = apiInstance.searchCollections(page, pageSize, partialCollectionName, partialBinaryName, partialBinarySha256, tags, modelName, filters, orderBy, orderByDirection); + BaseResponseCollectionSearchResponse result = apiInstance.searchCollections(page, pageSize, partialCollectionName, partialBinaryName, partialBinarySha256, tags, filters, orderBy, orderByDirection); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SearchApi#searchCollections"); @@ -166,9 +165,8 @@ public class Example { | **partialBinaryName** | **String**| The partial or full name of the binary belonging to the collection | [optional] | | **partialBinarySha256** | **String**| The partial or full sha256 of the binary belonging to the collection | [optional] | | **tags** | [**List<String>**](String.md)| The tags to be searched for | [optional] | -| **modelName** | **String**| The name of the model used to analyze the binary the function belongs to | [optional] | | **filters** | [**List<Filters>**](Filters.md)| The filters to be used for the search | [optional] | -| **orderBy** | [**AppApiRestV2CollectionsEnumsOrderBy**](.md)| The field to sort the order by in the results | [optional] [default to created] [enum: created, collection, model, owner, collection_size, updated] | +| **orderBy** | [**AppApiRestV2CollectionsEnumsOrderBy**](.md)| The field to sort the order by in the results | [optional] [default to created] [enum: created, collection, owner, collection_size, updated] | | **orderByDirection** | [**Order**](.md)| The order direction in which to return results | [optional] [default to DESC] [enum: ASC, DESC] | ### Return type @@ -188,8 +186,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Successful Response | - | -| **422** | You must provide at least one of the filters; partial_collection_name, partial_binary_name, partial_binary_sha256, tags or model_name to search | - | -| **404** | The model name provided does not exist | - | +| **422** | You must provide at least one of the filters; partial_collection_name, partial_binary_name, partial_binary_sha256 or tags to search | - | # **searchFunctions** diff --git a/pom.xml b/pom.xml index ccd06ca..a569ac3 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ sdk jar sdk - 3.118.0 + 3.123.0 https://github.com/RevEngAI/sdk-java Java SDK for the RevEng.AI API diff --git a/src/main/java/ai/reveng/api/SearchApi.java b/src/main/java/ai/reveng/api/SearchApi.java index 0dac3a8..3a2d5ce 100644 --- a/src/main/java/ai/reveng/api/SearchApi.java +++ b/src/main/java/ai/reveng/api/SearchApi.java @@ -271,7 +271,6 @@ public okhttp3.Call searchBinariesAsync(@javax.annotation.Nullable Integer page, * @param partialBinaryName The partial or full name of the binary belonging to the collection (optional) * @param partialBinarySha256 The partial or full sha256 of the binary belonging to the collection (optional) * @param tags The tags to be searched for (optional) - * @param modelName The name of the model used to analyze the binary the function belongs to (optional) * @param filters The filters to be used for the search (optional) * @param orderBy The field to sort the order by in the results (optional, default to created) * @param orderByDirection The order direction in which to return results (optional, default to DESC) @@ -283,11 +282,10 @@ public okhttp3.Call searchBinariesAsync(@javax.annotation.Nullable Integer page, Response Details Status Code Description Response Headers 200 Successful Response - - 422 You must provide at least one of the filters; partial_collection_name, partial_binary_name, partial_binary_sha256, tags or model_name to search - - 404 The model name provided does not exist - + 422 You must provide at least one of the filters; partial_collection_name, partial_binary_name, partial_binary_sha256 or tags to search - */ - public okhttp3.Call searchCollectionsCall(@javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String partialCollectionName, @javax.annotation.Nullable String partialBinaryName, @javax.annotation.Nullable String partialBinarySha256, @javax.annotation.Nullable List tags, @javax.annotation.Nullable String modelName, @javax.annotation.Nullable List filters, @javax.annotation.Nullable AppApiRestV2CollectionsEnumsOrderBy orderBy, @javax.annotation.Nullable Order orderByDirection, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchCollectionsCall(@javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String partialCollectionName, @javax.annotation.Nullable String partialBinaryName, @javax.annotation.Nullable String partialBinarySha256, @javax.annotation.Nullable List tags, @javax.annotation.Nullable List filters, @javax.annotation.Nullable AppApiRestV2CollectionsEnumsOrderBy orderBy, @javax.annotation.Nullable Order orderByDirection, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -336,10 +334,6 @@ public okhttp3.Call searchCollectionsCall(@javax.annotation.Nullable Integer pag localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "tags", tags)); } - if (modelName != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("model_name", modelName)); - } - if (filters != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filters", filters)); } @@ -372,8 +366,8 @@ public okhttp3.Call searchCollectionsCall(@javax.annotation.Nullable Integer pag } @SuppressWarnings("rawtypes") - private okhttp3.Call searchCollectionsValidateBeforeCall(@javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String partialCollectionName, @javax.annotation.Nullable String partialBinaryName, @javax.annotation.Nullable String partialBinarySha256, @javax.annotation.Nullable List tags, @javax.annotation.Nullable String modelName, @javax.annotation.Nullable List filters, @javax.annotation.Nullable AppApiRestV2CollectionsEnumsOrderBy orderBy, @javax.annotation.Nullable Order orderByDirection, final ApiCallback _callback) throws ApiException { - return searchCollectionsCall(page, pageSize, partialCollectionName, partialBinaryName, partialBinarySha256, tags, modelName, filters, orderBy, orderByDirection, _callback); + private okhttp3.Call searchCollectionsValidateBeforeCall(@javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String partialCollectionName, @javax.annotation.Nullable String partialBinaryName, @javax.annotation.Nullable String partialBinarySha256, @javax.annotation.Nullable List tags, @javax.annotation.Nullable List filters, @javax.annotation.Nullable AppApiRestV2CollectionsEnumsOrderBy orderBy, @javax.annotation.Nullable Order orderByDirection, final ApiCallback _callback) throws ApiException { + return searchCollectionsCall(page, pageSize, partialCollectionName, partialBinaryName, partialBinarySha256, tags, filters, orderBy, orderByDirection, _callback); } @@ -386,7 +380,6 @@ private okhttp3.Call searchCollectionsValidateBeforeCall(@javax.annotation.Nulla * @param partialBinaryName The partial or full name of the binary belonging to the collection (optional) * @param partialBinarySha256 The partial or full sha256 of the binary belonging to the collection (optional) * @param tags The tags to be searched for (optional) - * @param modelName The name of the model used to analyze the binary the function belongs to (optional) * @param filters The filters to be used for the search (optional) * @param orderBy The field to sort the order by in the results (optional, default to created) * @param orderByDirection The order direction in which to return results (optional, default to DESC) @@ -397,12 +390,11 @@ private okhttp3.Call searchCollectionsValidateBeforeCall(@javax.annotation.Nulla Response Details Status Code Description Response Headers 200 Successful Response - - 422 You must provide at least one of the filters; partial_collection_name, partial_binary_name, partial_binary_sha256, tags or model_name to search - - 404 The model name provided does not exist - + 422 You must provide at least one of the filters; partial_collection_name, partial_binary_name, partial_binary_sha256 or tags to search - */ - public BaseResponseCollectionSearchResponse searchCollections(@javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String partialCollectionName, @javax.annotation.Nullable String partialBinaryName, @javax.annotation.Nullable String partialBinarySha256, @javax.annotation.Nullable List tags, @javax.annotation.Nullable String modelName, @javax.annotation.Nullable List filters, @javax.annotation.Nullable AppApiRestV2CollectionsEnumsOrderBy orderBy, @javax.annotation.Nullable Order orderByDirection) throws ApiException { - ApiResponse localVarResp = searchCollectionsWithHttpInfo(page, pageSize, partialCollectionName, partialBinaryName, partialBinarySha256, tags, modelName, filters, orderBy, orderByDirection); + public BaseResponseCollectionSearchResponse searchCollections(@javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String partialCollectionName, @javax.annotation.Nullable String partialBinaryName, @javax.annotation.Nullable String partialBinarySha256, @javax.annotation.Nullable List tags, @javax.annotation.Nullable List filters, @javax.annotation.Nullable AppApiRestV2CollectionsEnumsOrderBy orderBy, @javax.annotation.Nullable Order orderByDirection) throws ApiException { + ApiResponse localVarResp = searchCollectionsWithHttpInfo(page, pageSize, partialCollectionName, partialBinaryName, partialBinarySha256, tags, filters, orderBy, orderByDirection); return localVarResp.getData(); } @@ -415,7 +407,6 @@ public BaseResponseCollectionSearchResponse searchCollections(@javax.annotation. * @param partialBinaryName The partial or full name of the binary belonging to the collection (optional) * @param partialBinarySha256 The partial or full sha256 of the binary belonging to the collection (optional) * @param tags The tags to be searched for (optional) - * @param modelName The name of the model used to analyze the binary the function belongs to (optional) * @param filters The filters to be used for the search (optional) * @param orderBy The field to sort the order by in the results (optional, default to created) * @param orderByDirection The order direction in which to return results (optional, default to DESC) @@ -426,12 +417,11 @@ public BaseResponseCollectionSearchResponse searchCollections(@javax.annotation. Response Details Status Code Description Response Headers 200 Successful Response - - 422 You must provide at least one of the filters; partial_collection_name, partial_binary_name, partial_binary_sha256, tags or model_name to search - - 404 The model name provided does not exist - + 422 You must provide at least one of the filters; partial_collection_name, partial_binary_name, partial_binary_sha256 or tags to search - */ - public ApiResponse searchCollectionsWithHttpInfo(@javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String partialCollectionName, @javax.annotation.Nullable String partialBinaryName, @javax.annotation.Nullable String partialBinarySha256, @javax.annotation.Nullable List tags, @javax.annotation.Nullable String modelName, @javax.annotation.Nullable List filters, @javax.annotation.Nullable AppApiRestV2CollectionsEnumsOrderBy orderBy, @javax.annotation.Nullable Order orderByDirection) throws ApiException { - okhttp3.Call localVarCall = searchCollectionsValidateBeforeCall(page, pageSize, partialCollectionName, partialBinaryName, partialBinarySha256, tags, modelName, filters, orderBy, orderByDirection, null); + public ApiResponse searchCollectionsWithHttpInfo(@javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String partialCollectionName, @javax.annotation.Nullable String partialBinaryName, @javax.annotation.Nullable String partialBinarySha256, @javax.annotation.Nullable List tags, @javax.annotation.Nullable List filters, @javax.annotation.Nullable AppApiRestV2CollectionsEnumsOrderBy orderBy, @javax.annotation.Nullable Order orderByDirection) throws ApiException { + okhttp3.Call localVarCall = searchCollectionsValidateBeforeCall(page, pageSize, partialCollectionName, partialBinaryName, partialBinarySha256, tags, filters, orderBy, orderByDirection, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -445,7 +435,6 @@ public ApiResponse searchCollectionsWithHt * @param partialBinaryName The partial or full name of the binary belonging to the collection (optional) * @param partialBinarySha256 The partial or full sha256 of the binary belonging to the collection (optional) * @param tags The tags to be searched for (optional) - * @param modelName The name of the model used to analyze the binary the function belongs to (optional) * @param filters The filters to be used for the search (optional) * @param orderBy The field to sort the order by in the results (optional, default to created) * @param orderByDirection The order direction in which to return results (optional, default to DESC) @@ -457,13 +446,12 @@ public ApiResponse searchCollectionsWithHt Response Details Status Code Description Response Headers 200 Successful Response - - 422 You must provide at least one of the filters; partial_collection_name, partial_binary_name, partial_binary_sha256, tags or model_name to search - - 404 The model name provided does not exist - + 422 You must provide at least one of the filters; partial_collection_name, partial_binary_name, partial_binary_sha256 or tags to search - */ - public okhttp3.Call searchCollectionsAsync(@javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String partialCollectionName, @javax.annotation.Nullable String partialBinaryName, @javax.annotation.Nullable String partialBinarySha256, @javax.annotation.Nullable List tags, @javax.annotation.Nullable String modelName, @javax.annotation.Nullable List filters, @javax.annotation.Nullable AppApiRestV2CollectionsEnumsOrderBy orderBy, @javax.annotation.Nullable Order orderByDirection, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchCollectionsAsync(@javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String partialCollectionName, @javax.annotation.Nullable String partialBinaryName, @javax.annotation.Nullable String partialBinarySha256, @javax.annotation.Nullable List tags, @javax.annotation.Nullable List filters, @javax.annotation.Nullable AppApiRestV2CollectionsEnumsOrderBy orderBy, @javax.annotation.Nullable Order orderByDirection, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = searchCollectionsValidateBeforeCall(page, pageSize, partialCollectionName, partialBinaryName, partialBinarySha256, tags, modelName, filters, orderBy, orderByDirection, _callback); + okhttp3.Call localVarCall = searchCollectionsValidateBeforeCall(page, pageSize, partialCollectionName, partialBinaryName, partialBinarySha256, tags, filters, orderBy, orderByDirection, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/ai/reveng/invoker/ApiClient.java b/src/main/java/ai/reveng/invoker/ApiClient.java index dfa4056..8fb2592 100644 --- a/src/main/java/ai/reveng/invoker/ApiClient.java +++ b/src/main/java/ai/reveng/invoker/ApiClient.java @@ -148,7 +148,7 @@ protected void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/3.118.0/java"); + setUserAgent("OpenAPI-Generator/3.123.0/java"); authentications = new HashMap(); } diff --git a/src/main/java/ai/reveng/invoker/Configuration.java b/src/main/java/ai/reveng/invoker/Configuration.java index 347d727..41b994d 100644 --- a/src/main/java/ai/reveng/invoker/Configuration.java +++ b/src/main/java/ai/reveng/invoker/Configuration.java @@ -18,7 +18,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Configuration { - public static final String VERSION = "3.118.0"; + public static final String VERSION = "3.123.0"; private static final AtomicReference defaultApiClient = new AtomicReference<>(); private static volatile Supplier apiClientFactory = ApiClient::new; diff --git a/src/main/java/ai/reveng/model/AnalysisFunctionEntry.java b/src/main/java/ai/reveng/model/AnalysisFunctionEntry.java index dd87a20..7007729 100644 --- a/src/main/java/ai/reveng/model/AnalysisFunctionEntry.java +++ b/src/main/java/ai/reveng/model/AnalysisFunctionEntry.java @@ -85,11 +85,21 @@ public class AnalysisFunctionEntry { @javax.annotation.Nullable private String mangledName; + public static final String SERIALIZED_NAME_SOURCE_ANALYSIS_ID = "source_analysis_id"; + @SerializedName(SERIALIZED_NAME_SOURCE_ANALYSIS_ID) + @javax.annotation.Nullable + private Long sourceAnalysisId; + public static final String SERIALIZED_NAME_SOURCE_BINARY_ID = "source_binary_id"; @SerializedName(SERIALIZED_NAME_SOURCE_BINARY_ID) @javax.annotation.Nullable private Long sourceBinaryId; + public static final String SERIALIZED_NAME_SOURCE_FUNCTION_ID = "source_function_id"; + @SerializedName(SERIALIZED_NAME_SOURCE_FUNCTION_ID) + @javax.annotation.Nullable + private Long sourceFunctionId; + public static final String SERIALIZED_NAME_SOURCE_TYPE = "source_type"; @SerializedName(SERIALIZED_NAME_SOURCE_TYPE) @javax.annotation.Nonnull @@ -231,6 +241,25 @@ public void setMangledName(@javax.annotation.Nullable String mangledName) { } + public AnalysisFunctionEntry sourceAnalysisId(@javax.annotation.Nullable Long sourceAnalysisId) { + this.sourceAnalysisId = sourceAnalysisId; + return this; + } + + /** + * ID of the analysis the source function belongs to, if any + * @return sourceAnalysisId + */ + @javax.annotation.Nullable + public Long getSourceAnalysisId() { + return sourceAnalysisId; + } + + public void setSourceAnalysisId(@javax.annotation.Nullable Long sourceAnalysisId) { + this.sourceAnalysisId = sourceAnalysisId; + } + + public AnalysisFunctionEntry sourceBinaryId(@javax.annotation.Nullable Long sourceBinaryId) { this.sourceBinaryId = sourceBinaryId; return this; @@ -250,6 +279,25 @@ public void setSourceBinaryId(@javax.annotation.Nullable Long sourceBinaryId) { } + public AnalysisFunctionEntry sourceFunctionId(@javax.annotation.Nullable Long sourceFunctionId) { + this.sourceFunctionId = sourceFunctionId; + return this; + } + + /** + * ID of the source function this name was transferred from, if any + * @return sourceFunctionId + */ + @javax.annotation.Nullable + public Long getSourceFunctionId() { + return sourceFunctionId; + } + + public void setSourceFunctionId(@javax.annotation.Nullable Long sourceFunctionId) { + this.sourceFunctionId = sourceFunctionId; + } + + public AnalysisFunctionEntry sourceType(@javax.annotation.Nonnull String sourceType) { this.sourceType = sourceType; return this; @@ -330,7 +378,9 @@ public boolean equals(Object o) { Objects.equals(this.functionSize, analysisFunctionEntry.functionSize) && Objects.equals(this.functionVaddr, analysisFunctionEntry.functionVaddr) && Objects.equals(this.mangledName, analysisFunctionEntry.mangledName) && + Objects.equals(this.sourceAnalysisId, analysisFunctionEntry.sourceAnalysisId) && Objects.equals(this.sourceBinaryId, analysisFunctionEntry.sourceBinaryId) && + Objects.equals(this.sourceFunctionId, analysisFunctionEntry.sourceFunctionId) && Objects.equals(this.sourceType, analysisFunctionEntry.sourceType)&& Objects.equals(this.additionalProperties, analysisFunctionEntry.additionalProperties); } @@ -341,7 +391,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(binaryId, debug, functionId, functionName, functionSize, functionVaddr, mangledName, sourceBinaryId, sourceType, additionalProperties); + return Objects.hash(binaryId, debug, functionId, functionName, functionSize, functionVaddr, mangledName, sourceAnalysisId, sourceBinaryId, sourceFunctionId, sourceType, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -362,7 +412,9 @@ public String toString() { sb.append(" functionSize: ").append(toIndentedString(functionSize)).append("\n"); sb.append(" functionVaddr: ").append(toIndentedString(functionVaddr)).append("\n"); sb.append(" mangledName: ").append(toIndentedString(mangledName)).append("\n"); + sb.append(" sourceAnalysisId: ").append(toIndentedString(sourceAnalysisId)).append("\n"); sb.append(" sourceBinaryId: ").append(toIndentedString(sourceBinaryId)).append("\n"); + sb.append(" sourceFunctionId: ").append(toIndentedString(sourceFunctionId)).append("\n"); sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -383,7 +435,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("binary_id", "debug", "function_id", "function_name", "function_size", "function_vaddr", "mangled_name", "source_binary_id", "source_type")); + openapiFields = new HashSet(Arrays.asList("binary_id", "debug", "function_id", "function_name", "function_size", "function_vaddr", "mangled_name", "source_analysis_id", "source_binary_id", "source_function_id", "source_type")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("binary_id", "debug", "function_id", "function_name", "function_size", "function_vaddr", "source_type")); diff --git a/src/main/java/ai/reveng/model/AppApiRestV2CollectionsEnumsOrderBy.java b/src/main/java/ai/reveng/model/AppApiRestV2CollectionsEnumsOrderBy.java index f0456de..d4bdd0d 100644 --- a/src/main/java/ai/reveng/model/AppApiRestV2CollectionsEnumsOrderBy.java +++ b/src/main/java/ai/reveng/model/AppApiRestV2CollectionsEnumsOrderBy.java @@ -32,8 +32,6 @@ public enum AppApiRestV2CollectionsEnumsOrderBy { COLLECTION("collection"), - MODEL("model"), - OWNER("owner"), COLLECTION_SIZE("collection_size"), diff --git a/src/main/java/ai/reveng/model/CollectionCreateRequest.java b/src/main/java/ai/reveng/model/CollectionCreateRequest.java index 6d13104..bdd486d 100644 --- a/src/main/java/ai/reveng/model/CollectionCreateRequest.java +++ b/src/main/java/ai/reveng/model/CollectionCreateRequest.java @@ -78,11 +78,6 @@ public class CollectionCreateRequest { @javax.annotation.Nullable private List binaries; - public static final String SERIALIZED_NAME_MODEL_ID = "model_id"; - @SerializedName(SERIALIZED_NAME_MODEL_ID) - @javax.annotation.Nonnull - private Integer modelId; - public CollectionCreateRequest() { } @@ -196,25 +191,6 @@ public void setBinaries(@javax.annotation.Nullable List binaries) { this.binaries = binaries; } - - public CollectionCreateRequest modelId(@javax.annotation.Nonnull Integer modelId) { - this.modelId = modelId; - return this; - } - - /** - * Get modelId - * @return modelId - */ - @javax.annotation.Nonnull - public Integer getModelId() { - return modelId; - } - - public void setModelId(@javax.annotation.Nonnull Integer modelId) { - this.modelId = modelId; - } - /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -274,8 +250,7 @@ public boolean equals(Object o) { Objects.equals(this.description, collectionCreateRequest.description) && Objects.equals(this.collectionScope, collectionCreateRequest.collectionScope) && Objects.equals(this.tags, collectionCreateRequest.tags) && - Objects.equals(this.binaries, collectionCreateRequest.binaries) && - Objects.equals(this.modelId, collectionCreateRequest.modelId)&& + Objects.equals(this.binaries, collectionCreateRequest.binaries)&& Objects.equals(this.additionalProperties, collectionCreateRequest.additionalProperties); } @@ -285,7 +260,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(collectionName, description, collectionScope, tags, binaries, modelId, additionalProperties); + return Objects.hash(collectionName, description, collectionScope, tags, binaries, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -304,7 +279,6 @@ public String toString() { sb.append(" collectionScope: ").append(toIndentedString(collectionScope)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" binaries: ").append(toIndentedString(binaries)).append("\n"); - sb.append(" modelId: ").append(toIndentedString(modelId)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -324,10 +298,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("collection_name", "description", "collection_scope", "tags", "binaries", "model_id")); + openapiFields = new HashSet(Arrays.asList("collection_name", "description", "collection_scope", "tags", "binaries")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("collection_name", "description", "model_id")); + openapiRequiredFields = new HashSet(Arrays.asList("collection_name", "description")); } /** diff --git a/src/main/java/ai/reveng/model/CollectionListItem.java b/src/main/java/ai/reveng/model/CollectionListItem.java index b320236..2f9abae 100644 --- a/src/main/java/ai/reveng/model/CollectionListItem.java +++ b/src/main/java/ai/reveng/model/CollectionListItem.java @@ -98,11 +98,6 @@ public class CollectionListItem { @javax.annotation.Nonnull private OffsetDateTime creation; - public static final String SERIALIZED_NAME_MODEL_NAME = "model_name"; - @SerializedName(SERIALIZED_NAME_MODEL_NAME) - @javax.annotation.Nonnull - private String modelName; - public static final String SERIALIZED_NAME_TEAM_ID = "team_id"; @SerializedName(SERIALIZED_NAME_TEAM_ID) @javax.annotation.Nullable @@ -290,25 +285,6 @@ public void setCreation(@javax.annotation.Nonnull OffsetDateTime creation) { } - public CollectionListItem modelName(@javax.annotation.Nonnull String modelName) { - this.modelName = modelName; - return this; - } - - /** - * The model being used for the collection - * @return modelName - */ - @javax.annotation.Nonnull - public String getModelName() { - return modelName; - } - - public void setModelName(@javax.annotation.Nonnull String modelName) { - this.modelName = modelName; - } - - public CollectionListItem teamId(@javax.annotation.Nullable Integer teamId) { this.teamId = teamId; return this; @@ -391,7 +367,6 @@ public boolean equals(Object o) { Objects.equals(this.collectionSize, collectionListItem.collectionSize) && Objects.equals(this.collectionId, collectionListItem.collectionId) && Objects.equals(this.creation, collectionListItem.creation) && - Objects.equals(this.modelName, collectionListItem.modelName) && Objects.equals(this.teamId, collectionListItem.teamId)&& Objects.equals(this.additionalProperties, collectionListItem.additionalProperties); } @@ -402,7 +377,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(collectionName, description, collectionScope, collectionOwner, officialCollection, collectionTags, collectionSize, collectionId, creation, modelName, teamId, additionalProperties); + return Objects.hash(collectionName, description, collectionScope, collectionOwner, officialCollection, collectionTags, collectionSize, collectionId, creation, teamId, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -425,7 +400,6 @@ public String toString() { sb.append(" collectionSize: ").append(toIndentedString(collectionSize)).append("\n"); sb.append(" collectionId: ").append(toIndentedString(collectionId)).append("\n"); sb.append(" creation: ").append(toIndentedString(creation)).append("\n"); - sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n"); sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -446,10 +420,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("collection_name", "description", "collection_scope", "collection_owner", "official_collection", "collection_tags", "collection_size", "collection_id", "creation", "model_name", "team_id")); + openapiFields = new HashSet(Arrays.asList("collection_name", "description", "collection_scope", "collection_owner", "official_collection", "collection_tags", "collection_size", "collection_id", "creation", "team_id")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("collection_name", "description", "collection_scope", "collection_owner", "official_collection", "collection_size", "collection_id", "creation", "model_name")); + openapiRequiredFields = new HashSet(Arrays.asList("collection_name", "description", "collection_scope", "collection_owner", "official_collection", "collection_size", "collection_id", "creation")); } /** @@ -488,9 +462,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("collection_tags") != null && !jsonObj.get("collection_tags").isJsonNull() && !jsonObj.get("collection_tags").isJsonArray()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `collection_tags` to be an array in the JSON string but got `%s`", jsonObj.get("collection_tags").toString())); } - if (!jsonObj.get("model_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `model_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("model_name").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/ai/reveng/model/CollectionListItemBody.java b/src/main/java/ai/reveng/model/CollectionListItemBody.java index a021e58..1054801 100644 --- a/src/main/java/ai/reveng/model/CollectionListItemBody.java +++ b/src/main/java/ai/reveng/model/CollectionListItemBody.java @@ -92,11 +92,6 @@ public class CollectionListItemBody { @javax.annotation.Nonnull private String description; - public static final String SERIALIZED_NAME_MODEL_NAME = "model_name"; - @SerializedName(SERIALIZED_NAME_MODEL_NAME) - @javax.annotation.Nonnull - private String modelName; - public static final String SERIALIZED_NAME_OFFICIAL_COLLECTION = "official_collection"; @SerializedName(SERIALIZED_NAME_OFFICIAL_COLLECTION) @javax.annotation.Nonnull @@ -107,6 +102,11 @@ public class CollectionListItemBody { @javax.annotation.Nonnull private Long teamId; + public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nonnull + private OffsetDateTime updatedAt; + public CollectionListItemBody() { } @@ -270,25 +270,6 @@ public void setDescription(@javax.annotation.Nonnull String description) { } - public CollectionListItemBody modelName(@javax.annotation.Nonnull String modelName) { - this.modelName = modelName; - return this; - } - - /** - * Get modelName - * @return modelName - */ - @javax.annotation.Nonnull - public String getModelName() { - return modelName; - } - - public void setModelName(@javax.annotation.Nonnull String modelName) { - this.modelName = modelName; - } - - public CollectionListItemBody officialCollection(@javax.annotation.Nonnull Boolean officialCollection) { this.officialCollection = officialCollection; return this; @@ -327,6 +308,25 @@ public void setTeamId(@javax.annotation.Nonnull Long teamId) { } + public CollectionListItemBody updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + @Override public boolean equals(Object o) { @@ -345,14 +345,14 @@ public boolean equals(Object o) { Objects.equals(this.collectionTags, collectionListItemBody.collectionTags) && Objects.equals(this.creation, collectionListItemBody.creation) && Objects.equals(this.description, collectionListItemBody.description) && - Objects.equals(this.modelName, collectionListItemBody.modelName) && Objects.equals(this.officialCollection, collectionListItemBody.officialCollection) && - Objects.equals(this.teamId, collectionListItemBody.teamId); + Objects.equals(this.teamId, collectionListItemBody.teamId) && + Objects.equals(this.updatedAt, collectionListItemBody.updatedAt); } @Override public int hashCode() { - return Objects.hash(collectionId, collectionName, collectionOwner, collectionScope, collectionSize, collectionTags, creation, description, modelName, officialCollection, teamId); + return Objects.hash(collectionId, collectionName, collectionOwner, collectionScope, collectionSize, collectionTags, creation, description, officialCollection, teamId, updatedAt); } @Override @@ -367,9 +367,9 @@ public String toString() { sb.append(" collectionTags: ").append(toIndentedString(collectionTags)).append("\n"); sb.append(" creation: ").append(toIndentedString(creation)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n"); sb.append(" officialCollection: ").append(toIndentedString(officialCollection)).append("\n"); sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append("}"); return sb.toString(); } @@ -388,10 +388,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("collection_id", "collection_name", "collection_owner", "collection_scope", "collection_size", "collection_tags", "creation", "description", "model_name", "official_collection", "team_id")); + openapiFields = new HashSet(Arrays.asList("collection_id", "collection_name", "collection_owner", "collection_scope", "collection_size", "collection_tags", "creation", "description", "official_collection", "team_id", "updated_at")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("collection_id", "collection_name", "collection_owner", "collection_scope", "collection_size", "collection_tags", "creation", "description", "model_name", "official_collection", "team_id")); + openapiRequiredFields = new HashSet(Arrays.asList("collection_id", "collection_name", "collection_owner", "collection_scope", "collection_size", "collection_tags", "creation", "description", "official_collection", "team_id", "updated_at")); } /** @@ -440,9 +440,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - if (!jsonObj.get("model_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `model_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("model_name").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/ai/reveng/model/CollectionResponse.java b/src/main/java/ai/reveng/model/CollectionResponse.java index 4dc6877..46f7b28 100644 --- a/src/main/java/ai/reveng/model/CollectionResponse.java +++ b/src/main/java/ai/reveng/model/CollectionResponse.java @@ -70,11 +70,6 @@ public class CollectionResponse { @javax.annotation.Nonnull private String description; - public static final String SERIALIZED_NAME_MODEL_ID = "model_id"; - @SerializedName(SERIALIZED_NAME_MODEL_ID) - @javax.annotation.Nonnull - private Integer modelId; - public static final String SERIALIZED_NAME_USER_ID = "user_id"; @SerializedName(SERIALIZED_NAME_USER_ID) @javax.annotation.Nonnull @@ -170,25 +165,6 @@ public void setDescription(@javax.annotation.Nonnull String description) { } - public CollectionResponse modelId(@javax.annotation.Nonnull Integer modelId) { - this.modelId = modelId; - return this; - } - - /** - * Collection model ID - * @return modelId - */ - @javax.annotation.Nonnull - public Integer getModelId() { - return modelId; - } - - public void setModelId(@javax.annotation.Nonnull Integer modelId) { - this.modelId = modelId; - } - - public CollectionResponse userId(@javax.annotation.Nonnull Integer userId) { this.userId = userId; return this; @@ -395,7 +371,6 @@ public boolean equals(Object o) { return Objects.equals(this.collectionId, collectionResponse.collectionId) && Objects.equals(this.collectionName, collectionResponse.collectionName) && Objects.equals(this.description, collectionResponse.description) && - Objects.equals(this.modelId, collectionResponse.modelId) && Objects.equals(this.userId, collectionResponse.userId) && Objects.equals(this.teamId, collectionResponse.teamId) && Objects.equals(this.collectionScope, collectionResponse.collectionScope) && @@ -412,7 +387,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(collectionId, collectionName, description, modelId, userId, teamId, collectionScope, createdAt, updatedAt, tags, binaries, additionalProperties); + return Objects.hash(collectionId, collectionName, description, userId, teamId, collectionScope, createdAt, updatedAt, tags, binaries, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -429,7 +404,6 @@ public String toString() { sb.append(" collectionId: ").append(toIndentedString(collectionId)).append("\n"); sb.append(" collectionName: ").append(toIndentedString(collectionName)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" modelId: ").append(toIndentedString(modelId)).append("\n"); sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); sb.append(" collectionScope: ").append(toIndentedString(collectionScope)).append("\n"); @@ -456,10 +430,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("collection_id", "collection_name", "description", "model_id", "user_id", "team_id", "collection_scope", "created_at", "updated_at", "tags", "binaries")); + openapiFields = new HashSet(Arrays.asList("collection_id", "collection_name", "description", "user_id", "team_id", "collection_scope", "created_at", "updated_at", "tags", "binaries")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("collection_id", "collection_name", "description", "model_id", "user_id", "collection_scope", "created_at", "updated_at")); + openapiRequiredFields = new HashSet(Arrays.asList("collection_id", "collection_name", "description", "user_id", "collection_scope", "created_at", "updated_at")); } /** diff --git a/src/main/java/ai/reveng/model/CollectionSearchResult.java b/src/main/java/ai/reveng/model/CollectionSearchResult.java index afd2170..9471d58 100644 --- a/src/main/java/ai/reveng/model/CollectionSearchResult.java +++ b/src/main/java/ai/reveng/model/CollectionSearchResult.java @@ -78,16 +78,6 @@ public class CollectionSearchResult { @javax.annotation.Nonnull private OffsetDateTime createdAt; - public static final String SERIALIZED_NAME_MODEL_ID = "model_id"; - @SerializedName(SERIALIZED_NAME_MODEL_ID) - @javax.annotation.Nonnull - private Integer modelId; - - public static final String SERIALIZED_NAME_MODEL_NAME = "model_name"; - @SerializedName(SERIALIZED_NAME_MODEL_NAME) - @javax.annotation.Nonnull - private String modelName; - public static final String SERIALIZED_NAME_OWNED_BY = "owned_by"; @SerializedName(SERIALIZED_NAME_OWNED_BY) @javax.annotation.Nonnull @@ -211,44 +201,6 @@ public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { } - public CollectionSearchResult modelId(@javax.annotation.Nonnull Integer modelId) { - this.modelId = modelId; - return this; - } - - /** - * The model ID of the binary - * @return modelId - */ - @javax.annotation.Nonnull - public Integer getModelId() { - return modelId; - } - - public void setModelId(@javax.annotation.Nonnull Integer modelId) { - this.modelId = modelId; - } - - - public CollectionSearchResult modelName(@javax.annotation.Nonnull String modelName) { - this.modelName = modelName; - return this; - } - - /** - * The name of the model - * @return modelName - */ - @javax.annotation.Nonnull - public String getModelName() { - return modelName; - } - - public void setModelName(@javax.annotation.Nonnull String modelName) { - this.modelName = modelName; - } - - public CollectionSearchResult ownedBy(@javax.annotation.Nonnull String ownedBy) { this.ownedBy = ownedBy; return this; @@ -411,8 +363,6 @@ public boolean equals(Object o) { Objects.equals(this.scope, collectionSearchResult.scope) && Objects.equals(this.lastUpdatedAt, collectionSearchResult.lastUpdatedAt) && Objects.equals(this.createdAt, collectionSearchResult.createdAt) && - Objects.equals(this.modelId, collectionSearchResult.modelId) && - Objects.equals(this.modelName, collectionSearchResult.modelName) && Objects.equals(this.ownedBy, collectionSearchResult.ownedBy) && Objects.equals(this.tags, collectionSearchResult.tags) && Objects.equals(this.size, collectionSearchResult.size) && @@ -427,7 +377,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(collectionId, collectionName, scope, lastUpdatedAt, createdAt, modelId, modelName, ownedBy, tags, size, description, teamId, additionalProperties); + return Objects.hash(collectionId, collectionName, scope, lastUpdatedAt, createdAt, ownedBy, tags, size, description, teamId, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -446,8 +396,6 @@ public String toString() { sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); sb.append(" lastUpdatedAt: ").append(toIndentedString(lastUpdatedAt)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" modelId: ").append(toIndentedString(modelId)).append("\n"); - sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n"); sb.append(" ownedBy: ").append(toIndentedString(ownedBy)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" size: ").append(toIndentedString(size)).append("\n"); @@ -472,10 +420,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("collection_id", "collection_name", "scope", "last_updated_at", "created_at", "model_id", "model_name", "owned_by", "tags", "size", "description", "team_id")); + openapiFields = new HashSet(Arrays.asList("collection_id", "collection_name", "scope", "last_updated_at", "created_at", "owned_by", "tags", "size", "description", "team_id")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("collection_id", "collection_name", "scope", "last_updated_at", "created_at", "model_id", "model_name", "owned_by", "description")); + openapiRequiredFields = new HashSet(Arrays.asList("collection_id", "collection_name", "scope", "last_updated_at", "created_at", "owned_by", "description")); } /** @@ -504,9 +452,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("scope").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); } - if (!jsonObj.get("model_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `model_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("model_name").toString())); - } if (!jsonObj.get("owned_by").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `owned_by` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owned_by").toString())); } diff --git a/src/main/java/ai/reveng/model/CreateCollectionInputBody.java b/src/main/java/ai/reveng/model/CreateCollectionInputBody.java index 0774301..c4b1317 100644 --- a/src/main/java/ai/reveng/model/CreateCollectionInputBody.java +++ b/src/main/java/ai/reveng/model/CreateCollectionInputBody.java @@ -130,11 +130,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @javax.annotation.Nonnull private String description; - public static final String SERIALIZED_NAME_MODEL_ID = "model_id"; - @SerializedName(SERIALIZED_NAME_MODEL_ID) - @javax.annotation.Nonnull - private Long modelId; - public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) @javax.annotation.Nullable @@ -227,26 +222,6 @@ public void setDescription(@javax.annotation.Nonnull String description) { } - public CreateCollectionInputBody modelId(@javax.annotation.Nonnull Long modelId) { - this.modelId = modelId; - return this; - } - - /** - * Model ID the collection is associated with. - * minimum: 1 - * @return modelId - */ - @javax.annotation.Nonnull - public Long getModelId() { - return modelId; - } - - public void setModelId(@javax.annotation.Nonnull Long modelId) { - this.modelId = modelId; - } - - public CreateCollectionInputBody tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; @@ -288,7 +263,6 @@ public boolean equals(Object o) { Objects.equals(this.collectionName, createCollectionInputBody.collectionName) && Objects.equals(this.collectionScope, createCollectionInputBody.collectionScope) && Objects.equals(this.description, createCollectionInputBody.description) && - Objects.equals(this.modelId, createCollectionInputBody.modelId) && Objects.equals(this.tags, createCollectionInputBody.tags); } @@ -298,7 +272,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(binaries, collectionName, collectionScope, description, modelId, tags); + return Objects.hash(binaries, collectionName, collectionScope, description, tags); } private static int hashCodeNullable(JsonNullable a) { @@ -316,7 +290,6 @@ public String toString() { sb.append(" collectionName: ").append(toIndentedString(collectionName)).append("\n"); sb.append(" collectionScope: ").append(toIndentedString(collectionScope)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" modelId: ").append(toIndentedString(modelId)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append("}"); return sb.toString(); @@ -336,10 +309,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("binaries", "collection_name", "collection_scope", "description", "model_id", "tags")); + openapiFields = new HashSet(Arrays.asList("binaries", "collection_name", "collection_scope", "description", "tags")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("collection_name", "collection_scope", "description", "model_id")); + openapiRequiredFields = new HashSet(Arrays.asList("collection_name", "collection_scope", "description")); } /** diff --git a/src/main/java/ai/reveng/model/CreateCollectionOutputBody.java b/src/main/java/ai/reveng/model/CreateCollectionOutputBody.java index a9f343e..85169a7 100644 --- a/src/main/java/ai/reveng/model/CreateCollectionOutputBody.java +++ b/src/main/java/ai/reveng/model/CreateCollectionOutputBody.java @@ -84,11 +84,6 @@ public class CreateCollectionOutputBody { @javax.annotation.Nonnull private String description; - public static final String SERIALIZED_NAME_MODEL_ID = "model_id"; - @SerializedName(SERIALIZED_NAME_MODEL_ID) - @javax.annotation.Nonnull - private Long modelId; - public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) @javax.annotation.Nullable @@ -234,25 +229,6 @@ public void setDescription(@javax.annotation.Nonnull String description) { } - public CreateCollectionOutputBody modelId(@javax.annotation.Nonnull Long modelId) { - this.modelId = modelId; - return this; - } - - /** - * Get modelId - * @return modelId - */ - @javax.annotation.Nonnull - public Long getModelId() { - return modelId; - } - - public void setModelId(@javax.annotation.Nonnull Long modelId) { - this.modelId = modelId; - } - - public CreateCollectionOutputBody tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; @@ -353,7 +329,6 @@ public boolean equals(Object o) { Objects.equals(this.collectionScope, createCollectionOutputBody.collectionScope) && Objects.equals(this.createdAt, createCollectionOutputBody.createdAt) && Objects.equals(this.description, createCollectionOutputBody.description) && - Objects.equals(this.modelId, createCollectionOutputBody.modelId) && Objects.equals(this.tags, createCollectionOutputBody.tags) && Objects.equals(this.teamId, createCollectionOutputBody.teamId) && Objects.equals(this.updatedAt, createCollectionOutputBody.updatedAt) && @@ -366,7 +341,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(binaries, collectionId, collectionName, collectionScope, createdAt, description, modelId, tags, teamId, updatedAt, userId); + return Objects.hash(binaries, collectionId, collectionName, collectionScope, createdAt, description, tags, teamId, updatedAt, userId); } private static int hashCodeNullable(JsonNullable a) { @@ -386,7 +361,6 @@ public String toString() { sb.append(" collectionScope: ").append(toIndentedString(collectionScope)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" modelId: ").append(toIndentedString(modelId)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); @@ -409,10 +383,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("binaries", "collection_id", "collection_name", "collection_scope", "created_at", "description", "model_id", "tags", "team_id", "updated_at", "user_id")); + openapiFields = new HashSet(Arrays.asList("binaries", "collection_id", "collection_name", "collection_scope", "created_at", "description", "tags", "team_id", "updated_at", "user_id")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("collection_id", "collection_name", "collection_scope", "created_at", "description", "model_id", "team_id", "updated_at", "user_id")); + openapiRequiredFields = new HashSet(Arrays.asList("collection_id", "collection_name", "collection_scope", "created_at", "description", "team_id", "updated_at", "user_id")); } /** diff --git a/src/main/java/ai/reveng/model/ErrorBody.java b/src/main/java/ai/reveng/model/ErrorBody.java index fdd7d09..d8d1146 100644 --- a/src/main/java/ai/reveng/model/ErrorBody.java +++ b/src/main/java/ai/reveng/model/ErrorBody.java @@ -116,6 +116,10 @@ public enum CodeEnum { LAST_ORG_OWNER("LAST_ORG_OWNER"), + LAST_TEAM_ADMIN("LAST_TEAM_ADMIN"), + + LAST_TEAM_MEMBER("LAST_TEAM_MEMBER"), + LINKED_TO_ORG("LINKED_TO_ORG"), METHOD_NOT_ALLOWED("METHOD_NOT_ALLOWED"), diff --git a/src/main/java/ai/reveng/model/GetCollectionOutputBody.java b/src/main/java/ai/reveng/model/GetCollectionOutputBody.java index c450c16..d6856eb 100644 --- a/src/main/java/ai/reveng/model/GetCollectionOutputBody.java +++ b/src/main/java/ai/reveng/model/GetCollectionOutputBody.java @@ -89,11 +89,6 @@ public class GetCollectionOutputBody { @javax.annotation.Nullable private Boolean hasNextPage; - public static final String SERIALIZED_NAME_MODEL_ID = "model_id"; - @SerializedName(SERIALIZED_NAME_MODEL_ID) - @javax.annotation.Nonnull - private Long modelId; - public static final String SERIALIZED_NAME_PAGE_NUMBER = "page_number"; @SerializedName(SERIALIZED_NAME_PAGE_NUMBER) @javax.annotation.Nullable @@ -268,25 +263,6 @@ public void setHasNextPage(@javax.annotation.Nullable Boolean hasNextPage) { } - public GetCollectionOutputBody modelId(@javax.annotation.Nonnull Long modelId) { - this.modelId = modelId; - return this; - } - - /** - * Get modelId - * @return modelId - */ - @javax.annotation.Nonnull - public Long getModelId() { - return modelId; - } - - public void setModelId(@javax.annotation.Nonnull Long modelId) { - this.modelId = modelId; - } - - public GetCollectionOutputBody pageNumber(@javax.annotation.Nullable Long pageNumber) { this.pageNumber = pageNumber; return this; @@ -426,7 +402,6 @@ public boolean equals(Object o) { Objects.equals(this.createdAt, getCollectionOutputBody.createdAt) && Objects.equals(this.description, getCollectionOutputBody.description) && Objects.equals(this.hasNextPage, getCollectionOutputBody.hasNextPage) && - Objects.equals(this.modelId, getCollectionOutputBody.modelId) && Objects.equals(this.pageNumber, getCollectionOutputBody.pageNumber) && Objects.equals(this.pageSize, getCollectionOutputBody.pageSize) && Objects.equals(this.tags, getCollectionOutputBody.tags) && @@ -441,7 +416,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(binaries, collectionId, collectionName, collectionScope, createdAt, description, hasNextPage, modelId, pageNumber, pageSize, tags, teamId, updatedAt, userId); + return Objects.hash(binaries, collectionId, collectionName, collectionScope, createdAt, description, hasNextPage, pageNumber, pageSize, tags, teamId, updatedAt, userId); } private static int hashCodeNullable(JsonNullable a) { @@ -462,7 +437,6 @@ public String toString() { sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" hasNextPage: ").append(toIndentedString(hasNextPage)).append("\n"); - sb.append(" modelId: ").append(toIndentedString(modelId)).append("\n"); sb.append(" pageNumber: ").append(toIndentedString(pageNumber)).append("\n"); sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); @@ -487,10 +461,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("binaries", "collection_id", "collection_name", "collection_scope", "created_at", "description", "has_next_page", "model_id", "page_number", "page_size", "tags", "team_id", "updated_at", "user_id")); + openapiFields = new HashSet(Arrays.asList("binaries", "collection_id", "collection_name", "collection_scope", "created_at", "description", "has_next_page", "page_number", "page_size", "tags", "team_id", "updated_at", "user_id")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("collection_id", "collection_name", "collection_scope", "created_at", "description", "model_id", "team_id", "updated_at", "user_id")); + openapiRequiredFields = new HashSet(Arrays.asList("collection_id", "collection_name", "collection_scope", "created_at", "description", "team_id", "updated_at", "user_id")); } /** diff --git a/src/main/java/ai/reveng/model/HistoryEntry.java b/src/main/java/ai/reveng/model/HistoryEntry.java index 5de5fcd..79475c5 100644 --- a/src/main/java/ai/reveng/model/HistoryEntry.java +++ b/src/main/java/ai/reveng/model/HistoryEntry.java @@ -80,6 +80,16 @@ public class HistoryEntry { @javax.annotation.Nullable private String mangledName; + public static final String SERIALIZED_NAME_SOURCE_ANALYSIS_ID = "source_analysis_id"; + @SerializedName(SERIALIZED_NAME_SOURCE_ANALYSIS_ID) + @javax.annotation.Nullable + private Long sourceAnalysisId; + + public static final String SERIALIZED_NAME_SOURCE_FUNCTION_ID = "source_function_id"; + @SerializedName(SERIALIZED_NAME_SOURCE_FUNCTION_ID) + @javax.annotation.Nullable + private Long sourceFunctionId; + public static final String SERIALIZED_NAME_SOURCE_TYPE = "source_type"; @SerializedName(SERIALIZED_NAME_SOURCE_TYPE) @javax.annotation.Nonnull @@ -202,6 +212,44 @@ public void setMangledName(@javax.annotation.Nullable String mangledName) { } + public HistoryEntry sourceAnalysisId(@javax.annotation.Nullable Long sourceAnalysisId) { + this.sourceAnalysisId = sourceAnalysisId; + return this; + } + + /** + * ID of the analysis the source function belongs to, if any + * @return sourceAnalysisId + */ + @javax.annotation.Nullable + public Long getSourceAnalysisId() { + return sourceAnalysisId; + } + + public void setSourceAnalysisId(@javax.annotation.Nullable Long sourceAnalysisId) { + this.sourceAnalysisId = sourceAnalysisId; + } + + + public HistoryEntry sourceFunctionId(@javax.annotation.Nullable Long sourceFunctionId) { + this.sourceFunctionId = sourceFunctionId; + return this; + } + + /** + * ID of the source function this name was transferred from, if any + * @return sourceFunctionId + */ + @javax.annotation.Nullable + public Long getSourceFunctionId() { + return sourceFunctionId; + } + + public void setSourceFunctionId(@javax.annotation.Nullable Long sourceFunctionId) { + this.sourceFunctionId = sourceFunctionId; + } + + public HistoryEntry sourceType(@javax.annotation.Nonnull String sourceType) { this.sourceType = sourceType; return this; @@ -237,12 +285,14 @@ public boolean equals(Object o) { Objects.equals(this.historyId, historyEntry.historyId) && Objects.equals(this.isDebug, historyEntry.isDebug) && Objects.equals(this.mangledName, historyEntry.mangledName) && + Objects.equals(this.sourceAnalysisId, historyEntry.sourceAnalysisId) && + Objects.equals(this.sourceFunctionId, historyEntry.sourceFunctionId) && Objects.equals(this.sourceType, historyEntry.sourceType); } @Override public int hashCode() { - return Objects.hash(changeMadeBy, createdAt, functionName, historyId, isDebug, mangledName, sourceType); + return Objects.hash(changeMadeBy, createdAt, functionName, historyId, isDebug, mangledName, sourceAnalysisId, sourceFunctionId, sourceType); } @Override @@ -255,6 +305,8 @@ public String toString() { sb.append(" historyId: ").append(toIndentedString(historyId)).append("\n"); sb.append(" isDebug: ").append(toIndentedString(isDebug)).append("\n"); sb.append(" mangledName: ").append(toIndentedString(mangledName)).append("\n"); + sb.append(" sourceAnalysisId: ").append(toIndentedString(sourceAnalysisId)).append("\n"); + sb.append(" sourceFunctionId: ").append(toIndentedString(sourceFunctionId)).append("\n"); sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n"); sb.append("}"); return sb.toString(); @@ -274,7 +326,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("change_made_by", "created_at", "function_name", "history_id", "is_debug", "mangled_name", "source_type")); + openapiFields = new HashSet(Arrays.asList("change_made_by", "created_at", "function_name", "history_id", "is_debug", "mangled_name", "source_analysis_id", "source_function_id", "source_type")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("change_made_by", "created_at", "function_name", "history_id", "is_debug", "source_type")); diff --git a/src/main/java/ai/reveng/model/MatchFilters.java b/src/main/java/ai/reveng/model/MatchFilters.java index 58c62b6..ecbd69d 100644 --- a/src/main/java/ai/reveng/model/MatchFilters.java +++ b/src/main/java/ai/reveng/model/MatchFilters.java @@ -52,11 +52,77 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class MatchFilters { + /** + * Restrict matches to this architecture (multi-platform models only; matches all architectures if omitted). Rejected for single-architecture models. + */ + @JsonAdapter(ArchEnum.Adapter.class) + public enum ArchEnum { + X86("x86"), + + ARM("arm"), + + UNKNOWN("unknown"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + ArchEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ArchEnum fromValue(String value) { + for (ArchEnum b : ArchEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ArchEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ArchEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ArchEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ArchEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ARCH = "arch"; + @SerializedName(SERIALIZED_NAME_ARCH) + @javax.annotation.Nullable + private ArchEnum arch; + public static final String SERIALIZED_NAME_BINARY_IDS = "binary_ids"; @SerializedName(SERIALIZED_NAME_BINARY_IDS) @javax.annotation.Nullable private List binaryIds; + public static final String SERIALIZED_NAME_BITS = "bits"; + @SerializedName(SERIALIZED_NAME_BITS) + @javax.annotation.Nullable + private Long bits; + public static final String SERIALIZED_NAME_COLLECTION_IDS = "collection_ids"; @SerializedName(SERIALIZED_NAME_COLLECTION_IDS) @javax.annotation.Nullable @@ -72,6 +138,71 @@ public class MatchFilters { @javax.annotation.Nullable private List functionIds; + /** + * Restrict matches to this platform (multi-platform models only; matches all platforms if omitted). Rejected for single-architecture models. + */ + @JsonAdapter(PlatformEnum.Adapter.class) + public enum PlatformEnum { + LINUX("linux"), + + WINDOWS("windows"), + + ANDROID("android"), + + MACOS("macos"), + + UNKNOWN("unknown"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + PlatformEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PlatformEnum fromValue(String value) { + for (PlatformEnum b : PlatformEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PlatformEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PlatformEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PlatformEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PlatformEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PLATFORM = "platform"; + @SerializedName(SERIALIZED_NAME_PLATFORM) + @javax.annotation.Nullable + private PlatformEnum platform; + public static final String SERIALIZED_NAME_USER_IDS = "user_ids"; @SerializedName(SERIALIZED_NAME_USER_IDS) @javax.annotation.Nullable @@ -80,6 +211,25 @@ public class MatchFilters { public MatchFilters() { } + public MatchFilters arch(@javax.annotation.Nullable ArchEnum arch) { + this.arch = arch; + return this; + } + + /** + * Restrict matches to this architecture (multi-platform models only; matches all architectures if omitted). Rejected for single-architecture models. + * @return arch + */ + @javax.annotation.Nullable + public ArchEnum getArch() { + return arch; + } + + public void setArch(@javax.annotation.Nullable ArchEnum arch) { + this.arch = arch; + } + + public MatchFilters binaryIds(@javax.annotation.Nullable List binaryIds) { this.binaryIds = binaryIds; return this; @@ -107,6 +257,25 @@ public void setBinaryIds(@javax.annotation.Nullable List binaryIds) { } + public MatchFilters bits(@javax.annotation.Nullable Long bits) { + this.bits = bits; + return this; + } + + /** + * Restrict matches to this word size (multi-platform models only). Rejected for single-architecture models. + * @return bits + */ + @javax.annotation.Nullable + public Long getBits() { + return bits; + } + + public void setBits(@javax.annotation.Nullable Long bits) { + this.bits = bits; + } + + public MatchFilters collectionIds(@javax.annotation.Nullable List collectionIds) { this.collectionIds = collectionIds; return this; @@ -188,6 +357,25 @@ public void setFunctionIds(@javax.annotation.Nullable List functionIds) { } + public MatchFilters platform(@javax.annotation.Nullable PlatformEnum platform) { + this.platform = platform; + return this; + } + + /** + * Restrict matches to this platform (multi-platform models only; matches all platforms if omitted). Rejected for single-architecture models. + * @return platform + */ + @javax.annotation.Nullable + public PlatformEnum getPlatform() { + return platform; + } + + public void setPlatform(@javax.annotation.Nullable PlatformEnum platform) { + this.platform = platform; + } + + public MatchFilters userIds(@javax.annotation.Nullable List userIds) { this.userIds = userIds; return this; @@ -225,10 +413,13 @@ public boolean equals(Object o) { return false; } MatchFilters matchFilters = (MatchFilters) o; - return Objects.equals(this.binaryIds, matchFilters.binaryIds) && + return Objects.equals(this.arch, matchFilters.arch) && + Objects.equals(this.binaryIds, matchFilters.binaryIds) && + Objects.equals(this.bits, matchFilters.bits) && Objects.equals(this.collectionIds, matchFilters.collectionIds) && Objects.equals(this.debugTypes, matchFilters.debugTypes) && Objects.equals(this.functionIds, matchFilters.functionIds) && + Objects.equals(this.platform, matchFilters.platform) && Objects.equals(this.userIds, matchFilters.userIds); } @@ -238,7 +429,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(binaryIds, collectionIds, debugTypes, functionIds, userIds); + return Objects.hash(arch, binaryIds, bits, collectionIds, debugTypes, functionIds, platform, userIds); } private static int hashCodeNullable(JsonNullable a) { @@ -252,10 +443,13 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MatchFilters {\n"); + sb.append(" arch: ").append(toIndentedString(arch)).append("\n"); sb.append(" binaryIds: ").append(toIndentedString(binaryIds)).append("\n"); + sb.append(" bits: ").append(toIndentedString(bits)).append("\n"); sb.append(" collectionIds: ").append(toIndentedString(collectionIds)).append("\n"); sb.append(" debugTypes: ").append(toIndentedString(debugTypes)).append("\n"); sb.append(" functionIds: ").append(toIndentedString(functionIds)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); sb.append(" userIds: ").append(toIndentedString(userIds)).append("\n"); sb.append("}"); return sb.toString(); @@ -275,7 +469,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("binary_ids", "collection_ids", "debug_types", "function_ids", "user_ids")); + openapiFields = new HashSet(Arrays.asList("arch", "binary_ids", "bits", "collection_ids", "debug_types", "function_ids", "platform", "user_ids")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -302,6 +496,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("arch") != null && !jsonObj.get("arch").isJsonNull()) && !jsonObj.get("arch").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `arch` to be a primitive type in the JSON string but got `%s`", jsonObj.get("arch").toString())); + } + // validate the optional field `arch` + if (jsonObj.get("arch") != null && !jsonObj.get("arch").isJsonNull()) { + ArchEnum.validateJsonElement(jsonObj.get("arch")); + } // ensure the optional json data is an array if present if (jsonObj.get("binary_ids") != null && !jsonObj.get("binary_ids").isJsonNull() && !jsonObj.get("binary_ids").isJsonArray()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `binary_ids` to be an array in the JSON string but got `%s`", jsonObj.get("binary_ids").toString())); @@ -318,6 +519,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("function_ids") != null && !jsonObj.get("function_ids").isJsonNull() && !jsonObj.get("function_ids").isJsonArray()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `function_ids` to be an array in the JSON string but got `%s`", jsonObj.get("function_ids").toString())); } + if ((jsonObj.get("platform") != null && !jsonObj.get("platform").isJsonNull()) && !jsonObj.get("platform").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + } + // validate the optional field `platform` + if (jsonObj.get("platform") != null && !jsonObj.get("platform").isJsonNull()) { + PlatformEnum.validateJsonElement(jsonObj.get("platform")); + } // ensure the optional json data is an array if present if (jsonObj.get("user_ids") != null && !jsonObj.get("user_ids").isJsonNull() && !jsonObj.get("user_ids").isJsonArray()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `user_ids` to be an array in the JSON string but got `%s`", jsonObj.get("user_ids").toString())); diff --git a/src/main/java/ai/reveng/model/PatchCollectionOutputBody.java b/src/main/java/ai/reveng/model/PatchCollectionOutputBody.java index fa87e21..d409219 100644 --- a/src/main/java/ai/reveng/model/PatchCollectionOutputBody.java +++ b/src/main/java/ai/reveng/model/PatchCollectionOutputBody.java @@ -80,11 +80,6 @@ public class PatchCollectionOutputBody { @javax.annotation.Nonnull private String description; - public static final String SERIALIZED_NAME_MODEL_ID = "model_id"; - @SerializedName(SERIALIZED_NAME_MODEL_ID) - @javax.annotation.Nonnull - private Long modelId; - public static final String SERIALIZED_NAME_TEAM_ID = "team_id"; @SerializedName(SERIALIZED_NAME_TEAM_ID) @javax.annotation.Nonnull @@ -217,25 +212,6 @@ public void setDescription(@javax.annotation.Nonnull String description) { } - public PatchCollectionOutputBody modelId(@javax.annotation.Nonnull Long modelId) { - this.modelId = modelId; - return this; - } - - /** - * Get modelId - * @return modelId - */ - @javax.annotation.Nonnull - public Long getModelId() { - return modelId; - } - - public void setModelId(@javax.annotation.Nonnull Long modelId) { - this.modelId = modelId; - } - - public PatchCollectionOutputBody teamId(@javax.annotation.Nonnull Long teamId) { this.teamId = teamId; return this; @@ -309,7 +285,6 @@ public boolean equals(Object o) { Objects.equals(this.collectionScope, patchCollectionOutputBody.collectionScope) && Objects.equals(this.createdAt, patchCollectionOutputBody.createdAt) && Objects.equals(this.description, patchCollectionOutputBody.description) && - Objects.equals(this.modelId, patchCollectionOutputBody.modelId) && Objects.equals(this.teamId, patchCollectionOutputBody.teamId) && Objects.equals(this.updatedAt, patchCollectionOutputBody.updatedAt) && Objects.equals(this.userId, patchCollectionOutputBody.userId); @@ -317,7 +292,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(binaryCount, collectionId, collectionName, collectionScope, createdAt, description, modelId, teamId, updatedAt, userId); + return Objects.hash(binaryCount, collectionId, collectionName, collectionScope, createdAt, description, teamId, updatedAt, userId); } @Override @@ -330,7 +305,6 @@ public String toString() { sb.append(" collectionScope: ").append(toIndentedString(collectionScope)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" modelId: ").append(toIndentedString(modelId)).append("\n"); sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); @@ -352,10 +326,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("binary_count", "collection_id", "collection_name", "collection_scope", "created_at", "description", "model_id", "team_id", "updated_at", "user_id")); + openapiFields = new HashSet(Arrays.asList("binary_count", "collection_id", "collection_name", "collection_scope", "created_at", "description", "team_id", "updated_at", "user_id")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("binary_count", "collection_id", "collection_name", "collection_scope", "created_at", "description", "model_id", "team_id", "updated_at", "user_id")); + openapiRequiredFields = new HashSet(Arrays.asList("binary_count", "collection_id", "collection_name", "collection_scope", "created_at", "description", "team_id", "updated_at", "user_id")); } /**