diff --git a/.sdk-version b/.sdk-version index d5107dd..4ba1813 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.105.0 +v3.114.2 diff --git a/README.md b/README.md index 603c004..91924cb 100644 --- a/README.md +++ b/README.md @@ -109,8 +109,10 @@ Class | Method | HTTP request | Description *AnalysesCoreAPI* | [**UpdateAnalysis**](docs/AnalysesCoreAPI.md#updateanalysis) | **Patch** /v2/analyses/{analysis_id} | Update Analysis *AnalysesCoreAPI* | [**UpdateAnalysisTags**](docs/AnalysesCoreAPI.md#updateanalysistags) | **Patch** /v2/analyses/{analysis_id}/tags | Update Analysis Tags *AnalysesCoreAPI* | [**UploadFile**](docs/AnalysesCoreAPI.md#uploadfile) | **Post** /v2/upload | Upload File +*AnalysesCoreAPI* | [**V3GetAnalysisAutoUnstripStatus**](docs/AnalysesCoreAPI.md#v3getanalysisautounstripstatus) | **Get** /v3/analyses/{analysis_id}/auto-unstrip/status | Get the auto-unstrip status for an analysis. *AnalysesCoreAPI* | [**V3GetAnalysisStrings**](docs/AnalysesCoreAPI.md#v3getanalysisstrings) | **Get** /v3/analyses/{analysis_id}/functions/strings | List strings for an analysis. *AnalysesCoreAPI* | [**V3GetAnalysisStringsStatus**](docs/AnalysesCoreAPI.md#v3getanalysisstringsstatus) | **Get** /v3/analyses/{analysis_id}/functions/strings/status | Get the string-extraction status for an analysis. +*AnalysesCoreAPI* | [**V3ListAnalyses**](docs/AnalysesCoreAPI.md#v3listanalyses) | **Get** /v3/analyses | List analyses *AnalysesCoreAPI* | [**V3ListExampleAnalyses**](docs/AnalysesCoreAPI.md#v3listexampleanalyses) | **Get** /v3/analyses/examples | List example analyses *AnalysesResultsMetadataAPI* | [**GetAnalysisFunctionsPaginated**](docs/AnalysesResultsMetadataAPI.md#getanalysisfunctionspaginated) | **Get** /v2/analyses/{analysis_id}/functions | Get functions from analysis *AnalysesResultsMetadataAPI* | [**GetCapabilities**](docs/AnalysesResultsMetadataAPI.md#getcapabilities) | **Get** /v2/analyses/{analysis_id}/capabilities | Gets the capabilities from the analysis @@ -194,13 +196,17 @@ Class | Method | HTTP request | Description *FunctionsCoreAPI* | [**GetFunctionCapabilities_0**](docs/FunctionsCoreAPI.md#getfunctioncapabilities_0) | **Get** /v3/functions/{function_id}/capabilities | Get capabilities for a function *FunctionsCoreAPI* | [**GetFunctionDetails**](docs/FunctionsCoreAPI.md#getfunctiondetails) | **Get** /v2/functions/{function_id} | Get function details *FunctionsCoreAPI* | [**GetFunctionDetails_0**](docs/FunctionsCoreAPI.md#getfunctiondetails_0) | **Get** /v3/functions/{function_id} | Get function details +*FunctionsCoreAPI* | [**GetFunctionIndirectCallSites**](docs/FunctionsCoreAPI.md#getfunctionindirectcallsites) | **Get** /v3/functions/{function_id}/indirect-call-sites | Get indirect call sites for a function *FunctionsCoreAPI* | [**GetFunctionStrings**](docs/FunctionsCoreAPI.md#getfunctionstrings) | **Get** /v2/functions/{function_id}/strings | Get string information found in the function *FunctionsCoreAPI* | [**GetFunctionStrings_0**](docs/FunctionsCoreAPI.md#getfunctionstrings_0) | **Get** /v3/functions/{function_id}/strings | List strings for a function. *FunctionsCoreAPI* | [**GetFunctionsCalleesCallers**](docs/FunctionsCoreAPI.md#getfunctionscalleescallers) | **Get** /v3/functions/callees-callers | Get callees and callers for many functions *FunctionsCoreAPI* | [**GetFunctionsMatches**](docs/FunctionsCoreAPI.md#getfunctionsmatches) | **Get** /v3/functions/matches | Get function-matching results for an explicit set of functions *FunctionsCoreAPI* | [**GetFunctionsMatchingStatus**](docs/FunctionsCoreAPI.md#getfunctionsmatchingstatus) | **Get** /v3/functions/matches/status | Get function-matching status for an explicit set of functions +*FunctionsCoreAPI* | [**GetImportedFunction**](docs/FunctionsCoreAPI.md#getimportedfunction) | **Get** /v3/analyses/{analysis_id}/imported-functions/{imported_function_id} | Get an imported function with its callers *FunctionsCoreAPI* | [**ListAnalysisFunctions**](docs/FunctionsCoreAPI.md#listanalysisfunctions) | **Get** /v3/analyses/{analysis_id}/functions | List functions in an analysis +*FunctionsCoreAPI* | [**ListImportedFunctions**](docs/FunctionsCoreAPI.md#listimportedfunctions) | **Get** /v3/analyses/{analysis_id}/imported-functions | List imported functions in an analysis *FunctionsCoreAPI* | [**StartFunctionsMatching**](docs/FunctionsCoreAPI.md#startfunctionsmatching) | **Post** /v3/functions/matches | Start function matching for an explicit set of functions +*FunctionsCoreAPI* | [**V3CanonicalizeFunctionNames**](docs/FunctionsCoreAPI.md#v3canonicalizefunctionnames) | **Post** /v3/functions/canonical-names | Canonicalize a batch of function names *FunctionsDataTypesAPI* | [**BatchUpdateFunctionDataTypes**](docs/FunctionsDataTypesAPI.md#batchupdatefunctiondatatypes) | **Put** /v3/analyses/{analysis_id}/functions/data-types | Batch update function data types *FunctionsDataTypesAPI* | [**GenerateFunctionDataTypesForAnalysis**](docs/FunctionsDataTypesAPI.md#generatefunctiondatatypesforanalysis) | **Post** /v2/analyses/{analysis_id}/functions/data_types | Generate Function Data Types *FunctionsDataTypesAPI* | [**GenerateFunctionDataTypesForFunctions**](docs/FunctionsDataTypesAPI.md#generatefunctiondatatypesforfunctions) | **Post** /v2/functions/data_types | Generate Function Data Types for an arbitrary list of functions @@ -263,6 +269,7 @@ Class | Method | HTTP request | Description - [AnalysisLogMessage](docs/AnalysisLogMessage.md) - [AnalysisLogs](docs/AnalysisLogs.md) - [AnalysisRecord](docs/AnalysisRecord.md) + - [AnalysisRecordBody](docs/AnalysisRecordBody.md) - [AnalysisReport](docs/AnalysisReport.md) - [AnalysisScope](docs/AnalysisScope.md) - [AnalysisStringFunction](docs/AnalysisStringFunction.md) @@ -270,6 +277,7 @@ Class | Method | HTTP request | Description - [AnalysisStringItem](docs/AnalysisStringItem.md) - [AnalysisStringsResponse](docs/AnalysisStringsResponse.md) - [AnalysisStringsStatusResponse](docs/AnalysisStringsStatusResponse.md) + - [AnalysisTagBody](docs/AnalysisTagBody.md) - [AnalysisTags](docs/AnalysisTags.md) - [AnalysisUpdateRequest](docs/AnalysisUpdateRequest.md) - [AnalysisUpdateTagsRequest](docs/AnalysisUpdateTagsRequest.md) @@ -281,6 +289,7 @@ Class | Method | HTTP request | Description - [AppApiRestV2FunctionsResponsesFunction](docs/AppApiRestV2FunctionsResponsesFunction.md) - [AppApiRestV2FunctionsTypesFunction](docs/AppApiRestV2FunctionsTypesFunction.md) - [AppApiRestV2InfoTypesCapability](docs/AppApiRestV2InfoTypesCapability.md) + - [ArchiveContentEntry](docs/ArchiveContentEntry.md) - [Argument](docs/Argument.md) - [Artifact](docs/Artifact.md) - [AttemptFailedEvent](docs/AttemptFailedEvent.md) @@ -288,6 +297,7 @@ Class | Method | HTTP request | Description - [AutoRunAgents](docs/AutoRunAgents.md) - [AutoUnstripRequest](docs/AutoUnstripRequest.md) - [AutoUnstripResponse](docs/AutoUnstripResponse.md) + - [AutoUnstripStatusOutputBody](docs/AutoUnstripStatusOutputBody.md) - [BaseResponse](docs/BaseResponse.md) - [BaseResponseAdditionalDetailsStatusResponse](docs/BaseResponseAdditionalDetailsStatusResponse.md) - [BaseResponseAnalysisBulkAddTagsResponse](docs/BaseResponseAnalysisBulkAddTagsResponse.md) @@ -382,6 +392,9 @@ Class | Method | HTTP request | Description - [CalleeFunctionInfo](docs/CalleeFunctionInfo.md) - [CalleesCallerFunctionsResponse](docs/CalleesCallerFunctionsResponse.md) - [CallerFunctionInfo](docs/CallerFunctionInfo.md) + - [CanonicalName](docs/CanonicalName.md) + - [CanonicalizeNamesInputBody](docs/CanonicalizeNamesInputBody.md) + - [CanonicalizeNamesOutputBody](docs/CanonicalizeNamesOutputBody.md) - [Capabilities](docs/Capabilities.md) - [CapabilitiesAgentResponse](docs/CapabilitiesAgentResponse.md) - [CapabilitiesOutputBody](docs/CapabilitiesOutputBody.md) @@ -472,6 +485,7 @@ Class | Method | HTTP request | Description - [EventTITLEUPDATED](docs/EventTITLEUPDATED.md) - [EventTOOLCALLARGSDELTA](docs/EventTOOLCALLARGSDELTA.md) - [EventTOOLCALLEND](docs/EventTOOLCALLEND.md) + - [EventTOOLCALLPROGRESS](docs/EventTOOLCALLPROGRESS.md) - [EventTOOLCALLRESULT](docs/EventTOOLCALLRESULT.md) - [EventTOOLCALLSTART](docs/EventTOOLCALLSTART.md) - [EventTOOLCONFIRMATIONREQUIRED](docs/EventTOOLCONFIRMATIONREQUIRED.md) @@ -544,18 +558,26 @@ Class | Method | HTTP request | Description - [ISA](docs/ISA.md) - [IconModel](docs/IconModel.md) - [ImportModel](docs/ImportModel.md) + - [ImportedFunctionCallerEntry](docs/ImportedFunctionCallerEntry.md) + - [ImportedFunctionDetailOutputBody](docs/ImportedFunctionDetailOutputBody.md) + - [ImportedFunctionEntry](docs/ImportedFunctionEntry.md) + - [IndirectCallSite](docs/IndirectCallSite.md) + - [IndirectCallSitesOutputBody](docs/IndirectCallSitesOutputBody.md) - [InlineComment](docs/InlineComment.md) - [InsertAnalysisLogRequest](docs/InsertAnalysisLogRequest.md) - [InviteUserInputBody](docs/InviteUserInputBody.md) - [IssuerAllowedDomain](docs/IssuerAllowedDomain.md) + - [ListAnalysesOutputBody](docs/ListAnalysesOutputBody.md) - [ListAnalysisFunctionsDataTypesOutputBody](docs/ListAnalysisFunctionsDataTypesOutputBody.md) - [ListAnalysisFunctionsOutputBody](docs/ListAnalysisFunctionsOutputBody.md) - [ListAnalysisStringsOutputBody](docs/ListAnalysisStringsOutputBody.md) + - [ListArchiveContentsOutputBody](docs/ListArchiveContentsOutputBody.md) - [ListCollectionResults](docs/ListCollectionResults.md) - [ListCollectionsOutputBody](docs/ListCollectionsOutputBody.md) - [ListExampleAnalysesOutputBody](docs/ListExampleAnalysesOutputBody.md) - [ListFunctionStringsOutputBody](docs/ListFunctionStringsOutputBody.md) - [ListFunctionsDataTypesOutputBody](docs/ListFunctionsDataTypesOutputBody.md) + - [ListImportedFunctionsOutputBody](docs/ListImportedFunctionsOutputBody.md) - [ListTeamsOutputBody](docs/ListTeamsOutputBody.md) - [ListUsersOutputBody](docs/ListUsersOutputBody.md) - [LocationOutputBody](docs/LocationOutputBody.md) @@ -659,6 +681,7 @@ Class | Method | HTTP request | Description - [SseEventTitleUpdatedData](docs/SseEventTitleUpdatedData.md) - [SseEventToolCallArgsDeltaData](docs/SseEventToolCallArgsDeltaData.md) - [SseEventToolCallEndData](docs/SseEventToolCallEndData.md) + - [SseEventToolCallProgressData](docs/SseEventToolCallProgressData.md) - [SseEventToolCallResultData](docs/SseEventToolCallResultData.md) - [SseEventToolCallStartData](docs/SseEventToolCallStartData.md) - [SseEventToolConfirmationRequiredData](docs/SseEventToolConfirmationRequiredData.md) diff --git a/docs/AnalysesCoreAPI.md b/docs/AnalysesCoreAPI.md index 2ddcbd2..91856d7 100644 --- a/docs/AnalysesCoreAPI.md +++ b/docs/AnalysesCoreAPI.md @@ -27,8 +27,10 @@ Method | HTTP request | Description [**UpdateAnalysis**](AnalysesCoreAPI.md#UpdateAnalysis) | **Patch** /v2/analyses/{analysis_id} | Update Analysis [**UpdateAnalysisTags**](AnalysesCoreAPI.md#UpdateAnalysisTags) | **Patch** /v2/analyses/{analysis_id}/tags | Update Analysis Tags [**UploadFile**](AnalysesCoreAPI.md#UploadFile) | **Post** /v2/upload | Upload File +[**V3GetAnalysisAutoUnstripStatus**](AnalysesCoreAPI.md#V3GetAnalysisAutoUnstripStatus) | **Get** /v3/analyses/{analysis_id}/auto-unstrip/status | Get the auto-unstrip status for an analysis. [**V3GetAnalysisStrings**](AnalysesCoreAPI.md#V3GetAnalysisStrings) | **Get** /v3/analyses/{analysis_id}/functions/strings | List strings for an analysis. [**V3GetAnalysisStringsStatus**](AnalysesCoreAPI.md#V3GetAnalysisStringsStatus) | **Get** /v3/analyses/{analysis_id}/functions/strings/status | Get the string-extraction status for an analysis. +[**V3ListAnalyses**](AnalysesCoreAPI.md#V3ListAnalyses) | **Get** /v3/analyses | List analyses [**V3ListExampleAnalyses**](AnalysesCoreAPI.md#V3ListExampleAnalyses) | **Get** /v3/analyses/examples | List example analyses @@ -525,7 +527,7 @@ Name | Type | Description | Notes ## GetAnalysisFunctionMatches -> GetMatchesOutputBody GetAnalysisFunctionMatches(ctx, analysisId).Execute() +> GetMatchesOutputBody GetAnalysisFunctionMatches(ctx, analysisId).MatchId(matchId).Execute() Get function-matching results for an analysis @@ -545,10 +547,11 @@ import ( func main() { analysisId := int64(789) // int64 | Analysis ID + matchId := "matchId_example" // string | Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. (optional) configuration := revengai.NewConfiguration() apiClient := revengai.NewAPIClient(configuration) - resp, r, err := apiClient.AnalysesCoreAPI.GetAnalysisFunctionMatches(context.Background(), analysisId).Execute() + resp, r, err := apiClient.AnalysesCoreAPI.GetAnalysisFunctionMatches(context.Background(), analysisId).MatchId(matchId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AnalysesCoreAPI.GetAnalysisFunctionMatches``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -574,6 +577,7 @@ Other parameters are passed through a pointer to a apiGetAnalysisFunctionMatches Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **matchId** | **string** | Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. | ### Return type @@ -595,7 +599,7 @@ Name | Type | Description | Notes ## GetAnalysisFunctionMatchingStatus -> GetMatchesStatusOutputBody GetAnalysisFunctionMatchingStatus(ctx, analysisId).Execute() +> GetMatchesStatusOutputBody GetAnalysisFunctionMatchingStatus(ctx, analysisId).MatchId(matchId).Execute() Get function-matching status for an analysis @@ -615,10 +619,11 @@ import ( func main() { analysisId := int64(789) // int64 | Analysis ID + matchId := "matchId_example" // string | Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. (optional) configuration := revengai.NewConfiguration() apiClient := revengai.NewAPIClient(configuration) - resp, r, err := apiClient.AnalysesCoreAPI.GetAnalysisFunctionMatchingStatus(context.Background(), analysisId).Execute() + resp, r, err := apiClient.AnalysesCoreAPI.GetAnalysisFunctionMatchingStatus(context.Background(), analysisId).MatchId(matchId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AnalysesCoreAPI.GetAnalysisFunctionMatchingStatus``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -644,6 +649,7 @@ Other parameters are passed through a pointer to a apiGetAnalysisFunctionMatchin Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **matchId** | **string** | Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. | ### Return type @@ -1673,6 +1679,76 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## V3GetAnalysisAutoUnstripStatus + +> AutoUnstripStatusOutputBody V3GetAnalysisAutoUnstripStatus(ctx, analysisId).Execute() + +Get the auto-unstrip status for an analysis. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + revengai "github.com/RevEngAI/sdk-go/v3" +) + +func main() { + analysisId := int64(789) // int64 | Analysis ID + + configuration := revengai.NewConfiguration() + apiClient := revengai.NewAPIClient(configuration) + resp, r, err := apiClient.AnalysesCoreAPI.V3GetAnalysisAutoUnstripStatus(context.Background(), analysisId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnalysesCoreAPI.V3GetAnalysisAutoUnstripStatus``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `V3GetAnalysisAutoUnstripStatus`: AutoUnstripStatusOutputBody + fmt.Fprintf(os.Stdout, "Response from `AnalysesCoreAPI.V3GetAnalysisAutoUnstripStatus`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**analysisId** | **int64** | Analysis ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiV3GetAnalysisAutoUnstripStatusRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**AutoUnstripStatusOutputBody**](AutoUnstripStatusOutputBody.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## V3GetAnalysisStrings > ListAnalysisStringsOutputBody V3GetAnalysisStrings(ctx, analysisId).Page(page).PageSize(pageSize).Search(search).FunctionSearch(functionSearch).OrderBy(orderBy).SortOrder(sortOrder).Execute() @@ -1825,6 +1901,90 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## V3ListAnalyses + +> ListAnalysesOutputBody V3ListAnalyses(ctx).SearchTerm(searchTerm).AnalysisScope(analysisScope).Status(status).ModelName(modelName).Usernames(usernames).Sha256Hash(sha256Hash).PageSize(pageSize).NextPageToken(nextPageToken).OrderBy(orderBy).Order(order).Execute() + +List analyses + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + revengai "github.com/RevEngAI/sdk-go/v3" +) + +func main() { + searchTerm := "searchTerm_example" // string | (optional) + analysisScope := []string{"AnalysisScope_example"} // []string | Leave empty for no filter (optional) (default to {"PRIVATE"}) + status := []string{"Status_example"} // []string | (optional) + modelName := []*string{"Inner_example"} // []*string | (optional) + usernames := []*string{"Inner_example"} // []*string | (optional) + sha256Hash := "sha256Hash_example" // string | (optional) + pageSize := int64(789) // int64 | (optional) (default to 20) + nextPageToken := "nextPageToken_example" // string | Forward-pagination cursor from a prior response. When set, order_by/order are taken from the token (the sort cannot change mid-pagination). (optional) + orderBy := "orderBy_example" // string | (optional) (default to "created") + order := "order_example" // string | (optional) (default to "DESC") + + configuration := revengai.NewConfiguration() + apiClient := revengai.NewAPIClient(configuration) + resp, r, err := apiClient.AnalysesCoreAPI.V3ListAnalyses(context.Background()).SearchTerm(searchTerm).AnalysisScope(analysisScope).Status(status).ModelName(modelName).Usernames(usernames).Sha256Hash(sha256Hash).PageSize(pageSize).NextPageToken(nextPageToken).OrderBy(orderBy).Order(order).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnalysesCoreAPI.V3ListAnalyses``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `V3ListAnalyses`: ListAnalysesOutputBody + fmt.Fprintf(os.Stdout, "Response from `AnalysesCoreAPI.V3ListAnalyses`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiV3ListAnalysesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchTerm** | **string** | | + **analysisScope** | **[]string** | Leave empty for no filter | [default to {"PRIVATE"}] + **status** | **[]string** | | + **modelName** | **[]string** | | + **usernames** | **[]string** | | + **sha256Hash** | **string** | | + **pageSize** | **int64** | | [default to 20] + **nextPageToken** | **string** | Forward-pagination cursor from a prior response. When set, order_by/order are taken from the token (the sort cannot change mid-pagination). | + **orderBy** | **string** | | [default to "created"] + **order** | **string** | | [default to "DESC"] + +### Return type + +[**ListAnalysesOutputBody**](ListAnalysesOutputBody.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## V3ListExampleAnalyses > ListExampleAnalysesOutputBody V3ListExampleAnalyses(ctx).Execute() diff --git a/docs/AnalysisRecordBody.md b/docs/AnalysisRecordBody.md new file mode 100644 index 0000000..7bc9e15 --- /dev/null +++ b/docs/AnalysisRecordBody.md @@ -0,0 +1,355 @@ +# AnalysisRecordBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AnalysisId** | **int64** | Analysis ID | +**AnalysisScope** | **string** | Scope of the analysis | +**BaseAddress** | **int64** | Binary base address | +**BinaryId** | **int64** | Binary ID | +**BinaryName** | **string** | Binary filename | +**BinarySize** | **int64** | Binary size in bytes | +**Creation** | **time.Time** | When the analysis was created | +**FunctionBoundariesHash** | **string** | Hash of the binary's provided function boundaries | +**IsOwner** | **bool** | True when the caller owns the analysis | +**ModelId** | **int64** | Model ID | +**ModelName** | **string** | Model name | +**Sha256Hash** | **string** | SHA-256 hash of the binary | +**Status** | **string** | Analysis status | +**Tags** | [**[]AnalysisTagBody**](AnalysisTagBody.md) | Tags associated with the binary | +**Username** | **string** | Username of the analysis owner | + +## Methods + +### NewAnalysisRecordBody + +`func NewAnalysisRecordBody(analysisId int64, analysisScope string, baseAddress int64, binaryId int64, binaryName string, binarySize int64, creation time.Time, functionBoundariesHash string, isOwner bool, modelId int64, modelName string, sha256Hash string, status string, tags []AnalysisTagBody, username string, ) *AnalysisRecordBody` + +NewAnalysisRecordBody instantiates a new AnalysisRecordBody object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAnalysisRecordBodyWithDefaults + +`func NewAnalysisRecordBodyWithDefaults() *AnalysisRecordBody` + +NewAnalysisRecordBodyWithDefaults instantiates a new AnalysisRecordBody object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAnalysisId + +`func (o *AnalysisRecordBody) GetAnalysisId() int64` + +GetAnalysisId returns the AnalysisId field if non-nil, zero value otherwise. + +### GetAnalysisIdOk + +`func (o *AnalysisRecordBody) GetAnalysisIdOk() (*int64, bool)` + +GetAnalysisIdOk returns a tuple with the AnalysisId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAnalysisId + +`func (o *AnalysisRecordBody) SetAnalysisId(v int64)` + +SetAnalysisId sets AnalysisId field to given value. + + +### GetAnalysisScope + +`func (o *AnalysisRecordBody) GetAnalysisScope() string` + +GetAnalysisScope returns the AnalysisScope field if non-nil, zero value otherwise. + +### GetAnalysisScopeOk + +`func (o *AnalysisRecordBody) GetAnalysisScopeOk() (*string, bool)` + +GetAnalysisScopeOk returns a tuple with the AnalysisScope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAnalysisScope + +`func (o *AnalysisRecordBody) SetAnalysisScope(v string)` + +SetAnalysisScope sets AnalysisScope field to given value. + + +### GetBaseAddress + +`func (o *AnalysisRecordBody) GetBaseAddress() int64` + +GetBaseAddress returns the BaseAddress field if non-nil, zero value otherwise. + +### GetBaseAddressOk + +`func (o *AnalysisRecordBody) GetBaseAddressOk() (*int64, bool)` + +GetBaseAddressOk returns a tuple with the BaseAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBaseAddress + +`func (o *AnalysisRecordBody) SetBaseAddress(v int64)` + +SetBaseAddress sets BaseAddress field to given value. + + +### GetBinaryId + +`func (o *AnalysisRecordBody) GetBinaryId() int64` + +GetBinaryId returns the BinaryId field if non-nil, zero value otherwise. + +### GetBinaryIdOk + +`func (o *AnalysisRecordBody) GetBinaryIdOk() (*int64, bool)` + +GetBinaryIdOk returns a tuple with the BinaryId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBinaryId + +`func (o *AnalysisRecordBody) SetBinaryId(v int64)` + +SetBinaryId sets BinaryId field to given value. + + +### GetBinaryName + +`func (o *AnalysisRecordBody) GetBinaryName() string` + +GetBinaryName returns the BinaryName field if non-nil, zero value otherwise. + +### GetBinaryNameOk + +`func (o *AnalysisRecordBody) GetBinaryNameOk() (*string, bool)` + +GetBinaryNameOk returns a tuple with the BinaryName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBinaryName + +`func (o *AnalysisRecordBody) SetBinaryName(v string)` + +SetBinaryName sets BinaryName field to given value. + + +### GetBinarySize + +`func (o *AnalysisRecordBody) GetBinarySize() int64` + +GetBinarySize returns the BinarySize field if non-nil, zero value otherwise. + +### GetBinarySizeOk + +`func (o *AnalysisRecordBody) GetBinarySizeOk() (*int64, bool)` + +GetBinarySizeOk returns a tuple with the BinarySize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBinarySize + +`func (o *AnalysisRecordBody) SetBinarySize(v int64)` + +SetBinarySize sets BinarySize field to given value. + + +### GetCreation + +`func (o *AnalysisRecordBody) GetCreation() time.Time` + +GetCreation returns the Creation field if non-nil, zero value otherwise. + +### GetCreationOk + +`func (o *AnalysisRecordBody) GetCreationOk() (*time.Time, bool)` + +GetCreationOk returns a tuple with the Creation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreation + +`func (o *AnalysisRecordBody) SetCreation(v time.Time)` + +SetCreation sets Creation field to given value. + + +### GetFunctionBoundariesHash + +`func (o *AnalysisRecordBody) GetFunctionBoundariesHash() string` + +GetFunctionBoundariesHash returns the FunctionBoundariesHash field if non-nil, zero value otherwise. + +### GetFunctionBoundariesHashOk + +`func (o *AnalysisRecordBody) GetFunctionBoundariesHashOk() (*string, bool)` + +GetFunctionBoundariesHashOk returns a tuple with the FunctionBoundariesHash field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFunctionBoundariesHash + +`func (o *AnalysisRecordBody) SetFunctionBoundariesHash(v string)` + +SetFunctionBoundariesHash sets FunctionBoundariesHash field to given value. + + +### GetIsOwner + +`func (o *AnalysisRecordBody) GetIsOwner() bool` + +GetIsOwner returns the IsOwner field if non-nil, zero value otherwise. + +### GetIsOwnerOk + +`func (o *AnalysisRecordBody) GetIsOwnerOk() (*bool, bool)` + +GetIsOwnerOk returns a tuple with the IsOwner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsOwner + +`func (o *AnalysisRecordBody) SetIsOwner(v bool)` + +SetIsOwner sets IsOwner field to given value. + + +### GetModelId + +`func (o *AnalysisRecordBody) GetModelId() int64` + +GetModelId returns the ModelId field if non-nil, zero value otherwise. + +### GetModelIdOk + +`func (o *AnalysisRecordBody) GetModelIdOk() (*int64, bool)` + +GetModelIdOk returns a tuple with the ModelId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModelId + +`func (o *AnalysisRecordBody) SetModelId(v int64)` + +SetModelId sets ModelId field to given value. + + +### GetModelName + +`func (o *AnalysisRecordBody) GetModelName() string` + +GetModelName returns the ModelName field if non-nil, zero value otherwise. + +### GetModelNameOk + +`func (o *AnalysisRecordBody) GetModelNameOk() (*string, bool)` + +GetModelNameOk returns a tuple with the ModelName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModelName + +`func (o *AnalysisRecordBody) SetModelName(v string)` + +SetModelName sets ModelName field to given value. + + +### GetSha256Hash + +`func (o *AnalysisRecordBody) GetSha256Hash() string` + +GetSha256Hash returns the Sha256Hash field if non-nil, zero value otherwise. + +### GetSha256HashOk + +`func (o *AnalysisRecordBody) GetSha256HashOk() (*string, bool)` + +GetSha256HashOk returns a tuple with the Sha256Hash field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSha256Hash + +`func (o *AnalysisRecordBody) SetSha256Hash(v string)` + +SetSha256Hash sets Sha256Hash field to given value. + + +### GetStatus + +`func (o *AnalysisRecordBody) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *AnalysisRecordBody) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *AnalysisRecordBody) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetTags + +`func (o *AnalysisRecordBody) GetTags() []AnalysisTagBody` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *AnalysisRecordBody) GetTagsOk() (*[]AnalysisTagBody, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *AnalysisRecordBody) SetTags(v []AnalysisTagBody)` + +SetTags sets Tags field to given value. + + +### SetTagsNil + +`func (o *AnalysisRecordBody) SetTagsNil(b bool)` + + SetTagsNil sets the value for Tags to be an explicit nil + +### UnsetTags +`func (o *AnalysisRecordBody) UnsetTags()` + +UnsetTags ensures that no value is present for Tags, not even an explicit nil +### GetUsername + +`func (o *AnalysisRecordBody) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *AnalysisRecordBody) GetUsernameOk() (*string, bool)` + +GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsername + +`func (o *AnalysisRecordBody) SetUsername(v string)` + +SetUsername sets Username field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AnalysisTagBody.md b/docs/AnalysisTagBody.md new file mode 100644 index 0000000..d06984f --- /dev/null +++ b/docs/AnalysisTagBody.md @@ -0,0 +1,103 @@ +# AnalysisTagBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CollectionId** | **NullableInt64** | Collection this tag maps to, or null | +**Name** | **string** | Tag name | +**Origin** | **string** | Origin of the tag | + +## Methods + +### NewAnalysisTagBody + +`func NewAnalysisTagBody(collectionId NullableInt64, name string, origin string, ) *AnalysisTagBody` + +NewAnalysisTagBody instantiates a new AnalysisTagBody object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAnalysisTagBodyWithDefaults + +`func NewAnalysisTagBodyWithDefaults() *AnalysisTagBody` + +NewAnalysisTagBodyWithDefaults instantiates a new AnalysisTagBody object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCollectionId + +`func (o *AnalysisTagBody) GetCollectionId() int64` + +GetCollectionId returns the CollectionId field if non-nil, zero value otherwise. + +### GetCollectionIdOk + +`func (o *AnalysisTagBody) GetCollectionIdOk() (*int64, bool)` + +GetCollectionIdOk returns a tuple with the CollectionId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCollectionId + +`func (o *AnalysisTagBody) SetCollectionId(v int64)` + +SetCollectionId sets CollectionId field to given value. + + +### SetCollectionIdNil + +`func (o *AnalysisTagBody) SetCollectionIdNil(b bool)` + + SetCollectionIdNil sets the value for CollectionId to be an explicit nil + +### UnsetCollectionId +`func (o *AnalysisTagBody) UnsetCollectionId()` + +UnsetCollectionId ensures that no value is present for CollectionId, not even an explicit nil +### GetName + +`func (o *AnalysisTagBody) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AnalysisTagBody) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *AnalysisTagBody) SetName(v string)` + +SetName sets Name field to given value. + + +### GetOrigin + +`func (o *AnalysisTagBody) GetOrigin() string` + +GetOrigin returns the Origin field if non-nil, zero value otherwise. + +### GetOriginOk + +`func (o *AnalysisTagBody) GetOriginOk() (*string, bool)` + +GetOriginOk returns a tuple with the Origin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrigin + +`func (o *AnalysisTagBody) SetOrigin(v string)` + +SetOrigin sets Origin field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ArchiveContentEntry.md b/docs/ArchiveContentEntry.md new file mode 100644 index 0000000..f049086 --- /dev/null +++ b/docs/ArchiveContentEntry.md @@ -0,0 +1,93 @@ +# ArchiveContentEntry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Encrypted** | **bool** | Whether this entry is password-protected | +**Path** | **string** | Path relative to the archive root | +**Size** | **int64** | Uncompressed size in bytes | + +## Methods + +### NewArchiveContentEntry + +`func NewArchiveContentEntry(encrypted bool, path string, size int64, ) *ArchiveContentEntry` + +NewArchiveContentEntry instantiates a new ArchiveContentEntry object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewArchiveContentEntryWithDefaults + +`func NewArchiveContentEntryWithDefaults() *ArchiveContentEntry` + +NewArchiveContentEntryWithDefaults instantiates a new ArchiveContentEntry object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEncrypted + +`func (o *ArchiveContentEntry) GetEncrypted() bool` + +GetEncrypted returns the Encrypted field if non-nil, zero value otherwise. + +### GetEncryptedOk + +`func (o *ArchiveContentEntry) GetEncryptedOk() (*bool, bool)` + +GetEncryptedOk returns a tuple with the Encrypted field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEncrypted + +`func (o *ArchiveContentEntry) SetEncrypted(v bool)` + +SetEncrypted sets Encrypted field to given value. + + +### GetPath + +`func (o *ArchiveContentEntry) GetPath() string` + +GetPath returns the Path field if non-nil, zero value otherwise. + +### GetPathOk + +`func (o *ArchiveContentEntry) GetPathOk() (*string, bool)` + +GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPath + +`func (o *ArchiveContentEntry) SetPath(v string)` + +SetPath sets Path field to given value. + + +### GetSize + +`func (o *ArchiveContentEntry) GetSize() int64` + +GetSize returns the Size field if non-nil, zero value otherwise. + +### GetSizeOk + +`func (o *ArchiveContentEntry) GetSizeOk() (*int64, bool)` + +GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSize + +`func (o *ArchiveContentEntry) SetSize(v int64)` + +SetSize sets Size field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AutoUnstripStatusOutputBody.md b/docs/AutoUnstripStatusOutputBody.md new file mode 100644 index 0000000..840737d --- /dev/null +++ b/docs/AutoUnstripStatusOutputBody.md @@ -0,0 +1,51 @@ +# AutoUnstripStatusOutputBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | **string** | Auto-unstrip task status | + +## Methods + +### NewAutoUnstripStatusOutputBody + +`func NewAutoUnstripStatusOutputBody(status string, ) *AutoUnstripStatusOutputBody` + +NewAutoUnstripStatusOutputBody instantiates a new AutoUnstripStatusOutputBody object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAutoUnstripStatusOutputBodyWithDefaults + +`func NewAutoUnstripStatusOutputBodyWithDefaults() *AutoUnstripStatusOutputBody` + +NewAutoUnstripStatusOutputBodyWithDefaults instantiates a new AutoUnstripStatusOutputBody object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatus + +`func (o *AutoUnstripStatusOutputBody) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *AutoUnstripStatusOutputBody) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *AutoUnstripStatusOutputBody) SetStatus(v string)` + +SetStatus sets Status field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BatchBinaryMatchResult.md b/docs/BatchBinaryMatchResult.md index 7197288..d4cd3d8 100644 --- a/docs/BatchBinaryMatchResult.md +++ b/docs/BatchBinaryMatchResult.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **BinaryId** | **int64** | Target binary | **ErrorMessage** | Pointer to **string** | Error description when status=FAILED. | [optional] +**MatchId** | Pointer to **string** | Opaque token for this binary's matching run. Present on dispatch and when statuses were fetched by token. | [optional] **MatchedFunctionCount** | **int64** | Number of source functions that received at least one candidate match. Only meaningful when status=COMPLETED. | **Status** | **string** | Per-binary workflow status | @@ -73,6 +74,31 @@ SetErrorMessage sets ErrorMessage field to given value. HasErrorMessage returns a boolean if a field has been set. +### GetMatchId + +`func (o *BatchBinaryMatchResult) GetMatchId() string` + +GetMatchId returns the MatchId field if non-nil, zero value otherwise. + +### GetMatchIdOk + +`func (o *BatchBinaryMatchResult) GetMatchIdOk() (*string, bool)` + +GetMatchIdOk returns a tuple with the MatchId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMatchId + +`func (o *BatchBinaryMatchResult) SetMatchId(v string)` + +SetMatchId sets MatchId field to given value. + +### HasMatchId + +`func (o *BatchBinaryMatchResult) HasMatchId() bool` + +HasMatchId returns a boolean if a field has been set. + ### GetMatchedFunctionCount `func (o *BatchBinaryMatchResult) GetMatchedFunctionCount() int64` diff --git a/docs/CanonicalName.md b/docs/CanonicalName.md new file mode 100644 index 0000000..2ae520c --- /dev/null +++ b/docs/CanonicalName.md @@ -0,0 +1,72 @@ +# CanonicalName + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CanonicalName** | **string** | Canonical form of the name, or the input name itself when it has no canonical form. | +**Name** | **string** | The input function name. | + +## Methods + +### NewCanonicalName + +`func NewCanonicalName(canonicalName string, name string, ) *CanonicalName` + +NewCanonicalName instantiates a new CanonicalName object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCanonicalNameWithDefaults + +`func NewCanonicalNameWithDefaults() *CanonicalName` + +NewCanonicalNameWithDefaults instantiates a new CanonicalName object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCanonicalName + +`func (o *CanonicalName) GetCanonicalName() string` + +GetCanonicalName returns the CanonicalName field if non-nil, zero value otherwise. + +### GetCanonicalNameOk + +`func (o *CanonicalName) GetCanonicalNameOk() (*string, bool)` + +GetCanonicalNameOk returns a tuple with the CanonicalName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCanonicalName + +`func (o *CanonicalName) SetCanonicalName(v string)` + +SetCanonicalName sets CanonicalName field to given value. + + +### GetName + +`func (o *CanonicalName) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CanonicalName) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CanonicalName) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CanonicalizeNamesInputBody.md b/docs/CanonicalizeNamesInputBody.md new file mode 100644 index 0000000..acc9f52 --- /dev/null +++ b/docs/CanonicalizeNamesInputBody.md @@ -0,0 +1,61 @@ +# CanonicalizeNamesInputBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Names** | **[]string** | Function names to canonicalize. | + +## Methods + +### NewCanonicalizeNamesInputBody + +`func NewCanonicalizeNamesInputBody(names []string, ) *CanonicalizeNamesInputBody` + +NewCanonicalizeNamesInputBody instantiates a new CanonicalizeNamesInputBody object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCanonicalizeNamesInputBodyWithDefaults + +`func NewCanonicalizeNamesInputBodyWithDefaults() *CanonicalizeNamesInputBody` + +NewCanonicalizeNamesInputBodyWithDefaults instantiates a new CanonicalizeNamesInputBody object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetNames + +`func (o *CanonicalizeNamesInputBody) GetNames() []string` + +GetNames returns the Names field if non-nil, zero value otherwise. + +### GetNamesOk + +`func (o *CanonicalizeNamesInputBody) GetNamesOk() (*[]string, bool)` + +GetNamesOk returns a tuple with the Names field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNames + +`func (o *CanonicalizeNamesInputBody) SetNames(v []string)` + +SetNames sets Names field to given value. + + +### SetNamesNil + +`func (o *CanonicalizeNamesInputBody) SetNamesNil(b bool)` + + SetNamesNil sets the value for Names to be an explicit nil + +### UnsetNames +`func (o *CanonicalizeNamesInputBody) UnsetNames()` + +UnsetNames ensures that no value is present for Names, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CanonicalizeNamesOutputBody.md b/docs/CanonicalizeNamesOutputBody.md new file mode 100644 index 0000000..d3859ab --- /dev/null +++ b/docs/CanonicalizeNamesOutputBody.md @@ -0,0 +1,61 @@ +# CanonicalizeNamesOutputBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**[]CanonicalName**](CanonicalName.md) | Canonicalized names in the same order as the input. | + +## Methods + +### NewCanonicalizeNamesOutputBody + +`func NewCanonicalizeNamesOutputBody(results []CanonicalName, ) *CanonicalizeNamesOutputBody` + +NewCanonicalizeNamesOutputBody instantiates a new CanonicalizeNamesOutputBody object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCanonicalizeNamesOutputBodyWithDefaults + +`func NewCanonicalizeNamesOutputBodyWithDefaults() *CanonicalizeNamesOutputBody` + +NewCanonicalizeNamesOutputBodyWithDefaults instantiates a new CanonicalizeNamesOutputBody object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResults + +`func (o *CanonicalizeNamesOutputBody) GetResults() []CanonicalName` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *CanonicalizeNamesOutputBody) GetResultsOk() (*[]CanonicalName, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *CanonicalizeNamesOutputBody) SetResults(v []CanonicalName)` + +SetResults sets Results field to given value. + + +### SetResultsNil + +`func (o *CanonicalizeNamesOutputBody) SetResultsNil(b bool)` + + SetResultsNil sets the value for Results to be an explicit nil + +### UnsetResults +`func (o *CanonicalizeNamesOutputBody) UnsetResults()` + +UnsetResults ensures that no value is present for Results, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EventTOOLCALLPROGRESS.md b/docs/EventTOOLCALLPROGRESS.md new file mode 100644 index 0000000..14d2745 --- /dev/null +++ b/docs/EventTOOLCALLPROGRESS.md @@ -0,0 +1,124 @@ +# EventTOOLCALLPROGRESS + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**SseEventToolCallProgressData**](SseEventToolCallProgressData.md) | | +**Event** | **string** | The event name. | +**Id** | Pointer to **int32** | The event ID. | [optional] +**Retry** | Pointer to **int32** | The retry time in milliseconds. | [optional] + +## Methods + +### NewEventTOOLCALLPROGRESS + +`func NewEventTOOLCALLPROGRESS(data SseEventToolCallProgressData, event string, ) *EventTOOLCALLPROGRESS` + +NewEventTOOLCALLPROGRESS instantiates a new EventTOOLCALLPROGRESS object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEventTOOLCALLPROGRESSWithDefaults + +`func NewEventTOOLCALLPROGRESSWithDefaults() *EventTOOLCALLPROGRESS` + +NewEventTOOLCALLPROGRESSWithDefaults instantiates a new EventTOOLCALLPROGRESS object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *EventTOOLCALLPROGRESS) GetData() SseEventToolCallProgressData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *EventTOOLCALLPROGRESS) GetDataOk() (*SseEventToolCallProgressData, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *EventTOOLCALLPROGRESS) SetData(v SseEventToolCallProgressData)` + +SetData sets Data field to given value. + + +### GetEvent + +`func (o *EventTOOLCALLPROGRESS) GetEvent() string` + +GetEvent returns the Event field if non-nil, zero value otherwise. + +### GetEventOk + +`func (o *EventTOOLCALLPROGRESS) GetEventOk() (*string, bool)` + +GetEventOk returns a tuple with the Event field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEvent + +`func (o *EventTOOLCALLPROGRESS) SetEvent(v string)` + +SetEvent sets Event field to given value. + + +### GetId + +`func (o *EventTOOLCALLPROGRESS) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *EventTOOLCALLPROGRESS) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *EventTOOLCALLPROGRESS) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *EventTOOLCALLPROGRESS) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetRetry + +`func (o *EventTOOLCALLPROGRESS) GetRetry() int32` + +GetRetry returns the Retry field if non-nil, zero value otherwise. + +### GetRetryOk + +`func (o *EventTOOLCALLPROGRESS) GetRetryOk() (*int32, bool)` + +GetRetryOk returns a tuple with the Retry field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRetry + +`func (o *EventTOOLCALLPROGRESS) SetRetry(v int32)` + +SetRetry sets Retry field to given value. + +### HasRetry + +`func (o *EventTOOLCALLPROGRESS) HasRetry() bool` + +HasRetry returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FunctionsCoreAPI.md b/docs/FunctionsCoreAPI.md index f43b566..0096fc1 100644 --- a/docs/FunctionsCoreAPI.md +++ b/docs/FunctionsCoreAPI.md @@ -23,13 +23,17 @@ Method | HTTP request | Description [**GetFunctionCapabilities_0**](FunctionsCoreAPI.md#GetFunctionCapabilities_0) | **Get** /v3/functions/{function_id}/capabilities | Get capabilities for a function [**GetFunctionDetails**](FunctionsCoreAPI.md#GetFunctionDetails) | **Get** /v2/functions/{function_id} | Get function details [**GetFunctionDetails_0**](FunctionsCoreAPI.md#GetFunctionDetails_0) | **Get** /v3/functions/{function_id} | Get function details +[**GetFunctionIndirectCallSites**](FunctionsCoreAPI.md#GetFunctionIndirectCallSites) | **Get** /v3/functions/{function_id}/indirect-call-sites | Get indirect call sites for a function [**GetFunctionStrings**](FunctionsCoreAPI.md#GetFunctionStrings) | **Get** /v2/functions/{function_id}/strings | Get string information found in the function [**GetFunctionStrings_0**](FunctionsCoreAPI.md#GetFunctionStrings_0) | **Get** /v3/functions/{function_id}/strings | List strings for a function. [**GetFunctionsCalleesCallers**](FunctionsCoreAPI.md#GetFunctionsCalleesCallers) | **Get** /v3/functions/callees-callers | Get callees and callers for many functions [**GetFunctionsMatches**](FunctionsCoreAPI.md#GetFunctionsMatches) | **Get** /v3/functions/matches | Get function-matching results for an explicit set of functions [**GetFunctionsMatchingStatus**](FunctionsCoreAPI.md#GetFunctionsMatchingStatus) | **Get** /v3/functions/matches/status | Get function-matching status for an explicit set of functions +[**GetImportedFunction**](FunctionsCoreAPI.md#GetImportedFunction) | **Get** /v3/analyses/{analysis_id}/imported-functions/{imported_function_id} | Get an imported function with its callers [**ListAnalysisFunctions**](FunctionsCoreAPI.md#ListAnalysisFunctions) | **Get** /v3/analyses/{analysis_id}/functions | List functions in an analysis +[**ListImportedFunctions**](FunctionsCoreAPI.md#ListImportedFunctions) | **Get** /v3/analyses/{analysis_id}/imported-functions | List imported functions in an analysis [**StartFunctionsMatching**](FunctionsCoreAPI.md#StartFunctionsMatching) | **Post** /v3/functions/matches | Start function matching for an explicit set of functions +[**V3CanonicalizeFunctionNames**](FunctionsCoreAPI.md#V3CanonicalizeFunctionNames) | **Post** /v3/functions/canonical-names | Canonicalize a batch of function names @@ -1369,6 +1373,76 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## GetFunctionIndirectCallSites + +> IndirectCallSitesOutputBody GetFunctionIndirectCallSites(ctx, functionId).Execute() + +Get indirect call sites for a function + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + revengai "github.com/RevEngAI/sdk-go/v3" +) + +func main() { + functionId := int64(789) // int64 | Function ID + + configuration := revengai.NewConfiguration() + apiClient := revengai.NewAPIClient(configuration) + resp, r, err := apiClient.FunctionsCoreAPI.GetFunctionIndirectCallSites(context.Background(), functionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FunctionsCoreAPI.GetFunctionIndirectCallSites``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetFunctionIndirectCallSites`: IndirectCallSitesOutputBody + fmt.Fprintf(os.Stdout, "Response from `FunctionsCoreAPI.GetFunctionIndirectCallSites`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**functionId** | **int64** | Function ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetFunctionIndirectCallSitesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**IndirectCallSitesOutputBody**](IndirectCallSitesOutputBody.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## GetFunctionStrings > BaseResponseFunctionStringsResponse GetFunctionStrings(ctx, functionId).Page(page).PageSize(pageSize).Search(search).Execute() @@ -1589,7 +1663,7 @@ Name | Type | Description | Notes ## GetFunctionsMatches -> GetMatchesOutputBody GetFunctionsMatches(ctx).FunctionIds(functionIds).Execute() +> GetMatchesOutputBody GetFunctionsMatches(ctx).MatchId(matchId).FunctionIds(functionIds).Execute() Get function-matching results for an explicit set of functions @@ -1608,11 +1682,12 @@ import ( ) func main() { - functionIds := []int64{int64(123)} // []int64 | Source function IDs whose matches to fetch. + matchId := "matchId_example" // string | Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. (optional) + functionIds := []int64{int64(123)} // []int64 | Source function IDs whose matches to fetch. Required unless match_id is supplied. (optional) configuration := revengai.NewConfiguration() apiClient := revengai.NewAPIClient(configuration) - resp, r, err := apiClient.FunctionsCoreAPI.GetFunctionsMatches(context.Background()).FunctionIds(functionIds).Execute() + resp, r, err := apiClient.FunctionsCoreAPI.GetFunctionsMatches(context.Background()).MatchId(matchId).FunctionIds(functionIds).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FunctionsCoreAPI.GetFunctionsMatches``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1633,7 +1708,8 @@ Other parameters are passed through a pointer to a apiGetFunctionsMatchesRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **functionIds** | **[]int64** | Source function IDs whose matches to fetch. | + **matchId** | **string** | Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. | + **functionIds** | **[]int64** | Source function IDs whose matches to fetch. Required unless match_id is supplied. | ### Return type @@ -1655,7 +1731,7 @@ Name | Type | Description | Notes ## GetFunctionsMatchingStatus -> GetMatchesStatusOutputBody GetFunctionsMatchingStatus(ctx).FunctionIds(functionIds).Execute() +> GetMatchesStatusOutputBody GetFunctionsMatchingStatus(ctx).MatchId(matchId).FunctionIds(functionIds).Execute() Get function-matching status for an explicit set of functions @@ -1674,11 +1750,12 @@ import ( ) func main() { - functionIds := []int64{int64(123)} // []int64 | Source function IDs whose matches to fetch. + matchId := "matchId_example" // string | Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. (optional) + functionIds := []int64{int64(123)} // []int64 | Source function IDs whose matches to fetch. Required unless match_id is supplied. (optional) configuration := revengai.NewConfiguration() apiClient := revengai.NewAPIClient(configuration) - resp, r, err := apiClient.FunctionsCoreAPI.GetFunctionsMatchingStatus(context.Background()).FunctionIds(functionIds).Execute() + resp, r, err := apiClient.FunctionsCoreAPI.GetFunctionsMatchingStatus(context.Background()).MatchId(matchId).FunctionIds(functionIds).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FunctionsCoreAPI.GetFunctionsMatchingStatus``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1699,7 +1776,8 @@ Other parameters are passed through a pointer to a apiGetFunctionsMatchingStatus Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **functionIds** | **[]int64** | Source function IDs whose matches to fetch. | + **matchId** | **string** | Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. | + **functionIds** | **[]int64** | Source function IDs whose matches to fetch. Required unless match_id is supplied. | ### Return type @@ -1719,6 +1797,79 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## GetImportedFunction + +> ImportedFunctionDetailOutputBody GetImportedFunction(ctx, analysisId, importedFunctionId).Execute() + +Get an imported function with its callers + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + revengai "github.com/RevEngAI/sdk-go/v3" +) + +func main() { + analysisId := int64(789) // int64 | Analysis ID + importedFunctionId := int64(789) // int64 | Imported function ID + + configuration := revengai.NewConfiguration() + apiClient := revengai.NewAPIClient(configuration) + resp, r, err := apiClient.FunctionsCoreAPI.GetImportedFunction(context.Background(), analysisId, importedFunctionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FunctionsCoreAPI.GetImportedFunction``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetImportedFunction`: ImportedFunctionDetailOutputBody + fmt.Fprintf(os.Stdout, "Response from `FunctionsCoreAPI.GetImportedFunction`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**analysisId** | **int64** | Analysis ID | +**importedFunctionId** | **int64** | Imported function ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetImportedFunctionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**ImportedFunctionDetailOutputBody**](ImportedFunctionDetailOutputBody.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## ListAnalysisFunctions > ListAnalysisFunctionsOutputBody ListAnalysisFunctions(ctx, analysisId).Offset(offset).Limit(limit).Execute() @@ -1793,6 +1944,80 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## ListImportedFunctions + +> ListImportedFunctionsOutputBody ListImportedFunctions(ctx, analysisId).Offset(offset).Limit(limit).Execute() + +List imported functions in an analysis + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + revengai "github.com/RevEngAI/sdk-go/v3" +) + +func main() { + analysisId := int64(789) // int64 | Analysis ID + offset := int64(789) // int64 | Pagination offset. Defaults to 0. (optional) + limit := int64(789) // int64 | Page size. Defaults to 100. (optional) + + configuration := revengai.NewConfiguration() + apiClient := revengai.NewAPIClient(configuration) + resp, r, err := apiClient.FunctionsCoreAPI.ListImportedFunctions(context.Background(), analysisId).Offset(offset).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FunctionsCoreAPI.ListImportedFunctions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListImportedFunctions`: ListImportedFunctionsOutputBody + fmt.Fprintf(os.Stdout, "Response from `FunctionsCoreAPI.ListImportedFunctions`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**analysisId** | **int64** | Analysis ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListImportedFunctionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **offset** | **int64** | Pagination offset. Defaults to 0. | + **limit** | **int64** | Page size. Defaults to 100. | + +### Return type + +[**ListImportedFunctionsOutputBody**](ListImportedFunctionsOutputBody.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## StartFunctionsMatching > StartMatchingOutputBody StartFunctionsMatching(ctx).StartMatchingForFunctionsInputBody(startMatchingForFunctionsInputBody).Execute() @@ -1858,3 +2083,69 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## V3CanonicalizeFunctionNames + +> CanonicalizeNamesOutputBody V3CanonicalizeFunctionNames(ctx).CanonicalizeNamesInputBody(canonicalizeNamesInputBody).Execute() + +Canonicalize a batch of function names + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + revengai "github.com/RevEngAI/sdk-go/v3" +) + +func main() { + canonicalizeNamesInputBody := *revengai.NewCanonicalizeNamesInputBody([]string{"Names_example"}) // CanonicalizeNamesInputBody | + + configuration := revengai.NewConfiguration() + apiClient := revengai.NewAPIClient(configuration) + resp, r, err := apiClient.FunctionsCoreAPI.V3CanonicalizeFunctionNames(context.Background()).CanonicalizeNamesInputBody(canonicalizeNamesInputBody).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FunctionsCoreAPI.V3CanonicalizeFunctionNames``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `V3CanonicalizeFunctionNames`: CanonicalizeNamesOutputBody + fmt.Fprintf(os.Stdout, "Response from `FunctionsCoreAPI.V3CanonicalizeFunctionNames`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiV3CanonicalizeFunctionNamesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **canonicalizeNamesInputBody** | [**CanonicalizeNamesInputBody**](CanonicalizeNamesInputBody.md) | | + +### Return type + +[**CanonicalizeNamesOutputBody**](CanonicalizeNamesOutputBody.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/ImportedFunctionCallerEntry.md b/docs/ImportedFunctionCallerEntry.md new file mode 100644 index 0000000..5e59209 --- /dev/null +++ b/docs/ImportedFunctionCallerEntry.md @@ -0,0 +1,114 @@ +# ImportedFunctionCallerEntry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FunctionId** | **int64** | | +**FunctionName** | **string** | | +**FunctionVaddr** | **int64** | | +**StubVaddr** | **int64** | The PLT/stub address this caller targets. | + +## Methods + +### NewImportedFunctionCallerEntry + +`func NewImportedFunctionCallerEntry(functionId int64, functionName string, functionVaddr int64, stubVaddr int64, ) *ImportedFunctionCallerEntry` + +NewImportedFunctionCallerEntry instantiates a new ImportedFunctionCallerEntry object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewImportedFunctionCallerEntryWithDefaults + +`func NewImportedFunctionCallerEntryWithDefaults() *ImportedFunctionCallerEntry` + +NewImportedFunctionCallerEntryWithDefaults instantiates a new ImportedFunctionCallerEntry object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFunctionId + +`func (o *ImportedFunctionCallerEntry) GetFunctionId() int64` + +GetFunctionId returns the FunctionId field if non-nil, zero value otherwise. + +### GetFunctionIdOk + +`func (o *ImportedFunctionCallerEntry) GetFunctionIdOk() (*int64, bool)` + +GetFunctionIdOk returns a tuple with the FunctionId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFunctionId + +`func (o *ImportedFunctionCallerEntry) SetFunctionId(v int64)` + +SetFunctionId sets FunctionId field to given value. + + +### GetFunctionName + +`func (o *ImportedFunctionCallerEntry) GetFunctionName() string` + +GetFunctionName returns the FunctionName field if non-nil, zero value otherwise. + +### GetFunctionNameOk + +`func (o *ImportedFunctionCallerEntry) GetFunctionNameOk() (*string, bool)` + +GetFunctionNameOk returns a tuple with the FunctionName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFunctionName + +`func (o *ImportedFunctionCallerEntry) SetFunctionName(v string)` + +SetFunctionName sets FunctionName field to given value. + + +### GetFunctionVaddr + +`func (o *ImportedFunctionCallerEntry) GetFunctionVaddr() int64` + +GetFunctionVaddr returns the FunctionVaddr field if non-nil, zero value otherwise. + +### GetFunctionVaddrOk + +`func (o *ImportedFunctionCallerEntry) GetFunctionVaddrOk() (*int64, bool)` + +GetFunctionVaddrOk returns a tuple with the FunctionVaddr field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFunctionVaddr + +`func (o *ImportedFunctionCallerEntry) SetFunctionVaddr(v int64)` + +SetFunctionVaddr sets FunctionVaddr field to given value. + + +### GetStubVaddr + +`func (o *ImportedFunctionCallerEntry) GetStubVaddr() int64` + +GetStubVaddr returns the StubVaddr field if non-nil, zero value otherwise. + +### GetStubVaddrOk + +`func (o *ImportedFunctionCallerEntry) GetStubVaddrOk() (*int64, bool)` + +GetStubVaddrOk returns a tuple with the StubVaddr field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStubVaddr + +`func (o *ImportedFunctionCallerEntry) SetStubVaddr(v int64)` + +SetStubVaddr sets StubVaddr field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImportedFunctionDetailOutputBody.md b/docs/ImportedFunctionDetailOutputBody.md new file mode 100644 index 0000000..d002f44 --- /dev/null +++ b/docs/ImportedFunctionDetailOutputBody.md @@ -0,0 +1,254 @@ +# ImportedFunctionDetailOutputBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Callers** | [**[]ImportedFunctionCallerEntry**](ImportedFunctionCallerEntry.md) | Internal functions that call this import, resolved via its PLT/stub addresses. | +**ImportedFunctionId** | **int64** | | +**IsFunction** | **bool** | False for imported data symbols. | +**LibraryName** | **string** | Library the symbol is imported from. '<EXTERNAL>' for unattributed imports. | +**LibraryVersion** | Pointer to **string** | Versioned symbol tag, when the loader records one. | [optional] +**Name** | **string** | | +**OriginalName** | Pointer to **string** | Pre-demangling / pre-aliasing name, when it differs from name. | [optional] +**StubVaddrs** | **[]int64** | PLT/stub addresses that resolve external call edges (function_call_edges.callee_vaddr) to this import. Use these to link a caller's external callee to this import. | +**Vaddr** | Pointer to **int64** | Virtual address of the import, when known. | [optional] + +## Methods + +### NewImportedFunctionDetailOutputBody + +`func NewImportedFunctionDetailOutputBody(callers []ImportedFunctionCallerEntry, importedFunctionId int64, isFunction bool, libraryName string, name string, stubVaddrs []int64, ) *ImportedFunctionDetailOutputBody` + +NewImportedFunctionDetailOutputBody instantiates a new ImportedFunctionDetailOutputBody object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewImportedFunctionDetailOutputBodyWithDefaults + +`func NewImportedFunctionDetailOutputBodyWithDefaults() *ImportedFunctionDetailOutputBody` + +NewImportedFunctionDetailOutputBodyWithDefaults instantiates a new ImportedFunctionDetailOutputBody object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCallers + +`func (o *ImportedFunctionDetailOutputBody) GetCallers() []ImportedFunctionCallerEntry` + +GetCallers returns the Callers field if non-nil, zero value otherwise. + +### GetCallersOk + +`func (o *ImportedFunctionDetailOutputBody) GetCallersOk() (*[]ImportedFunctionCallerEntry, bool)` + +GetCallersOk returns a tuple with the Callers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCallers + +`func (o *ImportedFunctionDetailOutputBody) SetCallers(v []ImportedFunctionCallerEntry)` + +SetCallers sets Callers field to given value. + + +### SetCallersNil + +`func (o *ImportedFunctionDetailOutputBody) SetCallersNil(b bool)` + + SetCallersNil sets the value for Callers to be an explicit nil + +### UnsetCallers +`func (o *ImportedFunctionDetailOutputBody) UnsetCallers()` + +UnsetCallers ensures that no value is present for Callers, not even an explicit nil +### GetImportedFunctionId + +`func (o *ImportedFunctionDetailOutputBody) GetImportedFunctionId() int64` + +GetImportedFunctionId returns the ImportedFunctionId field if non-nil, zero value otherwise. + +### GetImportedFunctionIdOk + +`func (o *ImportedFunctionDetailOutputBody) GetImportedFunctionIdOk() (*int64, bool)` + +GetImportedFunctionIdOk returns a tuple with the ImportedFunctionId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetImportedFunctionId + +`func (o *ImportedFunctionDetailOutputBody) SetImportedFunctionId(v int64)` + +SetImportedFunctionId sets ImportedFunctionId field to given value. + + +### GetIsFunction + +`func (o *ImportedFunctionDetailOutputBody) GetIsFunction() bool` + +GetIsFunction returns the IsFunction field if non-nil, zero value otherwise. + +### GetIsFunctionOk + +`func (o *ImportedFunctionDetailOutputBody) GetIsFunctionOk() (*bool, bool)` + +GetIsFunctionOk returns a tuple with the IsFunction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsFunction + +`func (o *ImportedFunctionDetailOutputBody) SetIsFunction(v bool)` + +SetIsFunction sets IsFunction field to given value. + + +### GetLibraryName + +`func (o *ImportedFunctionDetailOutputBody) GetLibraryName() string` + +GetLibraryName returns the LibraryName field if non-nil, zero value otherwise. + +### GetLibraryNameOk + +`func (o *ImportedFunctionDetailOutputBody) GetLibraryNameOk() (*string, bool)` + +GetLibraryNameOk returns a tuple with the LibraryName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLibraryName + +`func (o *ImportedFunctionDetailOutputBody) SetLibraryName(v string)` + +SetLibraryName sets LibraryName field to given value. + + +### GetLibraryVersion + +`func (o *ImportedFunctionDetailOutputBody) GetLibraryVersion() string` + +GetLibraryVersion returns the LibraryVersion field if non-nil, zero value otherwise. + +### GetLibraryVersionOk + +`func (o *ImportedFunctionDetailOutputBody) GetLibraryVersionOk() (*string, bool)` + +GetLibraryVersionOk returns a tuple with the LibraryVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLibraryVersion + +`func (o *ImportedFunctionDetailOutputBody) SetLibraryVersion(v string)` + +SetLibraryVersion sets LibraryVersion field to given value. + +### HasLibraryVersion + +`func (o *ImportedFunctionDetailOutputBody) HasLibraryVersion() bool` + +HasLibraryVersion returns a boolean if a field has been set. + +### GetName + +`func (o *ImportedFunctionDetailOutputBody) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ImportedFunctionDetailOutputBody) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ImportedFunctionDetailOutputBody) SetName(v string)` + +SetName sets Name field to given value. + + +### GetOriginalName + +`func (o *ImportedFunctionDetailOutputBody) GetOriginalName() string` + +GetOriginalName returns the OriginalName field if non-nil, zero value otherwise. + +### GetOriginalNameOk + +`func (o *ImportedFunctionDetailOutputBody) GetOriginalNameOk() (*string, bool)` + +GetOriginalNameOk returns a tuple with the OriginalName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOriginalName + +`func (o *ImportedFunctionDetailOutputBody) SetOriginalName(v string)` + +SetOriginalName sets OriginalName field to given value. + +### HasOriginalName + +`func (o *ImportedFunctionDetailOutputBody) HasOriginalName() bool` + +HasOriginalName returns a boolean if a field has been set. + +### GetStubVaddrs + +`func (o *ImportedFunctionDetailOutputBody) GetStubVaddrs() []int64` + +GetStubVaddrs returns the StubVaddrs field if non-nil, zero value otherwise. + +### GetStubVaddrsOk + +`func (o *ImportedFunctionDetailOutputBody) GetStubVaddrsOk() (*[]int64, bool)` + +GetStubVaddrsOk returns a tuple with the StubVaddrs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStubVaddrs + +`func (o *ImportedFunctionDetailOutputBody) SetStubVaddrs(v []int64)` + +SetStubVaddrs sets StubVaddrs field to given value. + + +### SetStubVaddrsNil + +`func (o *ImportedFunctionDetailOutputBody) SetStubVaddrsNil(b bool)` + + SetStubVaddrsNil sets the value for StubVaddrs to be an explicit nil + +### UnsetStubVaddrs +`func (o *ImportedFunctionDetailOutputBody) UnsetStubVaddrs()` + +UnsetStubVaddrs ensures that no value is present for StubVaddrs, not even an explicit nil +### GetVaddr + +`func (o *ImportedFunctionDetailOutputBody) GetVaddr() int64` + +GetVaddr returns the Vaddr field if non-nil, zero value otherwise. + +### GetVaddrOk + +`func (o *ImportedFunctionDetailOutputBody) GetVaddrOk() (*int64, bool)` + +GetVaddrOk returns a tuple with the Vaddr field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVaddr + +`func (o *ImportedFunctionDetailOutputBody) SetVaddr(v int64)` + +SetVaddr sets Vaddr field to given value. + +### HasVaddr + +`func (o *ImportedFunctionDetailOutputBody) HasVaddr() bool` + +HasVaddr returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImportedFunctionEntry.md b/docs/ImportedFunctionEntry.md new file mode 100644 index 0000000..47e0d01 --- /dev/null +++ b/docs/ImportedFunctionEntry.md @@ -0,0 +1,223 @@ +# ImportedFunctionEntry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ImportedFunctionId** | **int64** | | +**IsFunction** | **bool** | False for imported data symbols. | +**LibraryName** | **string** | Library the symbol is imported from. '<EXTERNAL>' for unattributed imports. | +**LibraryVersion** | Pointer to **string** | Versioned symbol tag, when the loader records one. | [optional] +**Name** | **string** | | +**OriginalName** | Pointer to **string** | Pre-demangling / pre-aliasing name, when it differs from name. | [optional] +**StubVaddrs** | **[]int64** | PLT/stub addresses that resolve external call edges (function_call_edges.callee_vaddr) to this import. Use these to link a caller's external callee to this import. | +**Vaddr** | Pointer to **int64** | Virtual address of the import, when known. | [optional] + +## Methods + +### NewImportedFunctionEntry + +`func NewImportedFunctionEntry(importedFunctionId int64, isFunction bool, libraryName string, name string, stubVaddrs []int64, ) *ImportedFunctionEntry` + +NewImportedFunctionEntry instantiates a new ImportedFunctionEntry object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewImportedFunctionEntryWithDefaults + +`func NewImportedFunctionEntryWithDefaults() *ImportedFunctionEntry` + +NewImportedFunctionEntryWithDefaults instantiates a new ImportedFunctionEntry object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetImportedFunctionId + +`func (o *ImportedFunctionEntry) GetImportedFunctionId() int64` + +GetImportedFunctionId returns the ImportedFunctionId field if non-nil, zero value otherwise. + +### GetImportedFunctionIdOk + +`func (o *ImportedFunctionEntry) GetImportedFunctionIdOk() (*int64, bool)` + +GetImportedFunctionIdOk returns a tuple with the ImportedFunctionId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetImportedFunctionId + +`func (o *ImportedFunctionEntry) SetImportedFunctionId(v int64)` + +SetImportedFunctionId sets ImportedFunctionId field to given value. + + +### GetIsFunction + +`func (o *ImportedFunctionEntry) GetIsFunction() bool` + +GetIsFunction returns the IsFunction field if non-nil, zero value otherwise. + +### GetIsFunctionOk + +`func (o *ImportedFunctionEntry) GetIsFunctionOk() (*bool, bool)` + +GetIsFunctionOk returns a tuple with the IsFunction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsFunction + +`func (o *ImportedFunctionEntry) SetIsFunction(v bool)` + +SetIsFunction sets IsFunction field to given value. + + +### GetLibraryName + +`func (o *ImportedFunctionEntry) GetLibraryName() string` + +GetLibraryName returns the LibraryName field if non-nil, zero value otherwise. + +### GetLibraryNameOk + +`func (o *ImportedFunctionEntry) GetLibraryNameOk() (*string, bool)` + +GetLibraryNameOk returns a tuple with the LibraryName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLibraryName + +`func (o *ImportedFunctionEntry) SetLibraryName(v string)` + +SetLibraryName sets LibraryName field to given value. + + +### GetLibraryVersion + +`func (o *ImportedFunctionEntry) GetLibraryVersion() string` + +GetLibraryVersion returns the LibraryVersion field if non-nil, zero value otherwise. + +### GetLibraryVersionOk + +`func (o *ImportedFunctionEntry) GetLibraryVersionOk() (*string, bool)` + +GetLibraryVersionOk returns a tuple with the LibraryVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLibraryVersion + +`func (o *ImportedFunctionEntry) SetLibraryVersion(v string)` + +SetLibraryVersion sets LibraryVersion field to given value. + +### HasLibraryVersion + +`func (o *ImportedFunctionEntry) HasLibraryVersion() bool` + +HasLibraryVersion returns a boolean if a field has been set. + +### GetName + +`func (o *ImportedFunctionEntry) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ImportedFunctionEntry) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ImportedFunctionEntry) SetName(v string)` + +SetName sets Name field to given value. + + +### GetOriginalName + +`func (o *ImportedFunctionEntry) GetOriginalName() string` + +GetOriginalName returns the OriginalName field if non-nil, zero value otherwise. + +### GetOriginalNameOk + +`func (o *ImportedFunctionEntry) GetOriginalNameOk() (*string, bool)` + +GetOriginalNameOk returns a tuple with the OriginalName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOriginalName + +`func (o *ImportedFunctionEntry) SetOriginalName(v string)` + +SetOriginalName sets OriginalName field to given value. + +### HasOriginalName + +`func (o *ImportedFunctionEntry) HasOriginalName() bool` + +HasOriginalName returns a boolean if a field has been set. + +### GetStubVaddrs + +`func (o *ImportedFunctionEntry) GetStubVaddrs() []int64` + +GetStubVaddrs returns the StubVaddrs field if non-nil, zero value otherwise. + +### GetStubVaddrsOk + +`func (o *ImportedFunctionEntry) GetStubVaddrsOk() (*[]int64, bool)` + +GetStubVaddrsOk returns a tuple with the StubVaddrs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStubVaddrs + +`func (o *ImportedFunctionEntry) SetStubVaddrs(v []int64)` + +SetStubVaddrs sets StubVaddrs field to given value. + + +### SetStubVaddrsNil + +`func (o *ImportedFunctionEntry) SetStubVaddrsNil(b bool)` + + SetStubVaddrsNil sets the value for StubVaddrs to be an explicit nil + +### UnsetStubVaddrs +`func (o *ImportedFunctionEntry) UnsetStubVaddrs()` + +UnsetStubVaddrs ensures that no value is present for StubVaddrs, not even an explicit nil +### GetVaddr + +`func (o *ImportedFunctionEntry) GetVaddr() int64` + +GetVaddr returns the Vaddr field if non-nil, zero value otherwise. + +### GetVaddrOk + +`func (o *ImportedFunctionEntry) GetVaddrOk() (*int64, bool)` + +GetVaddrOk returns a tuple with the Vaddr field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVaddr + +`func (o *ImportedFunctionEntry) SetVaddr(v int64)` + +SetVaddr sets Vaddr field to given value. + +### HasVaddr + +`func (o *ImportedFunctionEntry) HasVaddr() bool` + +HasVaddr returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IndirectCallSite.md b/docs/IndirectCallSite.md new file mode 100644 index 0000000..05c4dde --- /dev/null +++ b/docs/IndirectCallSite.md @@ -0,0 +1,145 @@ +# IndirectCallSite + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CalleeFunctionId** | Pointer to **int64** | | [optional] +**InstVaddr** | **int64** | Vaddr of the indirect call instruction. | +**IsExternal** | **bool** | | +**TargetName** | Pointer to **string** | | [optional] +**TargetVaddr** | **int64** | Resolved call target vaddr. | + +## Methods + +### NewIndirectCallSite + +`func NewIndirectCallSite(instVaddr int64, isExternal bool, targetVaddr int64, ) *IndirectCallSite` + +NewIndirectCallSite instantiates a new IndirectCallSite object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIndirectCallSiteWithDefaults + +`func NewIndirectCallSiteWithDefaults() *IndirectCallSite` + +NewIndirectCallSiteWithDefaults instantiates a new IndirectCallSite object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCalleeFunctionId + +`func (o *IndirectCallSite) GetCalleeFunctionId() int64` + +GetCalleeFunctionId returns the CalleeFunctionId field if non-nil, zero value otherwise. + +### GetCalleeFunctionIdOk + +`func (o *IndirectCallSite) GetCalleeFunctionIdOk() (*int64, bool)` + +GetCalleeFunctionIdOk returns a tuple with the CalleeFunctionId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCalleeFunctionId + +`func (o *IndirectCallSite) SetCalleeFunctionId(v int64)` + +SetCalleeFunctionId sets CalleeFunctionId field to given value. + +### HasCalleeFunctionId + +`func (o *IndirectCallSite) HasCalleeFunctionId() bool` + +HasCalleeFunctionId returns a boolean if a field has been set. + +### GetInstVaddr + +`func (o *IndirectCallSite) GetInstVaddr() int64` + +GetInstVaddr returns the InstVaddr field if non-nil, zero value otherwise. + +### GetInstVaddrOk + +`func (o *IndirectCallSite) GetInstVaddrOk() (*int64, bool)` + +GetInstVaddrOk returns a tuple with the InstVaddr field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInstVaddr + +`func (o *IndirectCallSite) SetInstVaddr(v int64)` + +SetInstVaddr sets InstVaddr field to given value. + + +### GetIsExternal + +`func (o *IndirectCallSite) GetIsExternal() bool` + +GetIsExternal returns the IsExternal field if non-nil, zero value otherwise. + +### GetIsExternalOk + +`func (o *IndirectCallSite) GetIsExternalOk() (*bool, bool)` + +GetIsExternalOk returns a tuple with the IsExternal field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsExternal + +`func (o *IndirectCallSite) SetIsExternal(v bool)` + +SetIsExternal sets IsExternal field to given value. + + +### GetTargetName + +`func (o *IndirectCallSite) GetTargetName() string` + +GetTargetName returns the TargetName field if non-nil, zero value otherwise. + +### GetTargetNameOk + +`func (o *IndirectCallSite) GetTargetNameOk() (*string, bool)` + +GetTargetNameOk returns a tuple with the TargetName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetName + +`func (o *IndirectCallSite) SetTargetName(v string)` + +SetTargetName sets TargetName field to given value. + +### HasTargetName + +`func (o *IndirectCallSite) HasTargetName() bool` + +HasTargetName returns a boolean if a field has been set. + +### GetTargetVaddr + +`func (o *IndirectCallSite) GetTargetVaddr() int64` + +GetTargetVaddr returns the TargetVaddr field if non-nil, zero value otherwise. + +### GetTargetVaddrOk + +`func (o *IndirectCallSite) GetTargetVaddrOk() (*int64, bool)` + +GetTargetVaddrOk returns a tuple with the TargetVaddr field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetVaddr + +`func (o *IndirectCallSite) SetTargetVaddr(v int64)` + +SetTargetVaddr sets TargetVaddr field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IndirectCallSitesOutputBody.md b/docs/IndirectCallSitesOutputBody.md new file mode 100644 index 0000000..a8ce689 --- /dev/null +++ b/docs/IndirectCallSitesOutputBody.md @@ -0,0 +1,82 @@ +# IndirectCallSitesOutputBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FunctionId** | **int64** | | +**Sites** | [**[]IndirectCallSite**](IndirectCallSite.md) | | + +## Methods + +### NewIndirectCallSitesOutputBody + +`func NewIndirectCallSitesOutputBody(functionId int64, sites []IndirectCallSite, ) *IndirectCallSitesOutputBody` + +NewIndirectCallSitesOutputBody instantiates a new IndirectCallSitesOutputBody object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIndirectCallSitesOutputBodyWithDefaults + +`func NewIndirectCallSitesOutputBodyWithDefaults() *IndirectCallSitesOutputBody` + +NewIndirectCallSitesOutputBodyWithDefaults instantiates a new IndirectCallSitesOutputBody object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFunctionId + +`func (o *IndirectCallSitesOutputBody) GetFunctionId() int64` + +GetFunctionId returns the FunctionId field if non-nil, zero value otherwise. + +### GetFunctionIdOk + +`func (o *IndirectCallSitesOutputBody) GetFunctionIdOk() (*int64, bool)` + +GetFunctionIdOk returns a tuple with the FunctionId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFunctionId + +`func (o *IndirectCallSitesOutputBody) SetFunctionId(v int64)` + +SetFunctionId sets FunctionId field to given value. + + +### GetSites + +`func (o *IndirectCallSitesOutputBody) GetSites() []IndirectCallSite` + +GetSites returns the Sites field if non-nil, zero value otherwise. + +### GetSitesOk + +`func (o *IndirectCallSitesOutputBody) GetSitesOk() (*[]IndirectCallSite, bool)` + +GetSitesOk returns a tuple with the Sites field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSites + +`func (o *IndirectCallSitesOutputBody) SetSites(v []IndirectCallSite)` + +SetSites sets Sites field to given value. + + +### SetSitesNil + +`func (o *IndirectCallSitesOutputBody) SetSitesNil(b bool)` + + SetSitesNil sets the value for Sites to be an explicit nil + +### UnsetSites +`func (o *IndirectCallSitesOutputBody) UnsetSites()` + +UnsetSites ensures that no value is present for Sites, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListAnalysesOutputBody.md b/docs/ListAnalysesOutputBody.md new file mode 100644 index 0000000..1624036 --- /dev/null +++ b/docs/ListAnalysesOutputBody.md @@ -0,0 +1,108 @@ +# ListAnalysesOutputBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NextPageToken** | Pointer to **string** | Opaque cursor to fetch the next page; empty on the last page | [optional] +**PageSize** | **int64** | Number of results in this page | +**Results** | [**[]AnalysisRecordBody**](AnalysisRecordBody.md) | The page of matching analyses | + +## Methods + +### NewListAnalysesOutputBody + +`func NewListAnalysesOutputBody(pageSize int64, results []AnalysisRecordBody, ) *ListAnalysesOutputBody` + +NewListAnalysesOutputBody instantiates a new ListAnalysesOutputBody object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewListAnalysesOutputBodyWithDefaults + +`func NewListAnalysesOutputBodyWithDefaults() *ListAnalysesOutputBody` + +NewListAnalysesOutputBodyWithDefaults instantiates a new ListAnalysesOutputBody object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetNextPageToken + +`func (o *ListAnalysesOutputBody) GetNextPageToken() string` + +GetNextPageToken returns the NextPageToken field if non-nil, zero value otherwise. + +### GetNextPageTokenOk + +`func (o *ListAnalysesOutputBody) GetNextPageTokenOk() (*string, bool)` + +GetNextPageTokenOk returns a tuple with the NextPageToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextPageToken + +`func (o *ListAnalysesOutputBody) SetNextPageToken(v string)` + +SetNextPageToken sets NextPageToken field to given value. + +### HasNextPageToken + +`func (o *ListAnalysesOutputBody) HasNextPageToken() bool` + +HasNextPageToken returns a boolean if a field has been set. + +### GetPageSize + +`func (o *ListAnalysesOutputBody) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *ListAnalysesOutputBody) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *ListAnalysesOutputBody) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + + +### GetResults + +`func (o *ListAnalysesOutputBody) GetResults() []AnalysisRecordBody` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *ListAnalysesOutputBody) GetResultsOk() (*[]AnalysisRecordBody, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *ListAnalysesOutputBody) SetResults(v []AnalysisRecordBody)` + +SetResults sets Results field to given value. + + +### SetResultsNil + +`func (o *ListAnalysesOutputBody) SetResultsNil(b bool)` + + SetResultsNil sets the value for Results to be an explicit nil + +### UnsetResults +`func (o *ListAnalysesOutputBody) UnsetResults()` + +UnsetResults ensures that no value is present for Results, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListArchiveContentsOutputBody.md b/docs/ListArchiveContentsOutputBody.md new file mode 100644 index 0000000..bd7b6d7 --- /dev/null +++ b/docs/ListArchiveContentsOutputBody.md @@ -0,0 +1,145 @@ +# ListArchiveContentsOutputBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Entries** | [**[]ArchiveContentEntry**](ArchiveContentEntry.md) | Files inside the archive, with paths relative to the archive root | +**HasNext** | **bool** | Whether a further page of entries follows this one. | +**Page** | **int64** | Page number of this response (1-indexed). | +**PageSize** | **int64** | Number of entries per page. | +**TotalCount** | **int64** | Total number of file entries in the archive, ignoring pagination. | + +## Methods + +### NewListArchiveContentsOutputBody + +`func NewListArchiveContentsOutputBody(entries []ArchiveContentEntry, hasNext bool, page int64, pageSize int64, totalCount int64, ) *ListArchiveContentsOutputBody` + +NewListArchiveContentsOutputBody instantiates a new ListArchiveContentsOutputBody object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewListArchiveContentsOutputBodyWithDefaults + +`func NewListArchiveContentsOutputBodyWithDefaults() *ListArchiveContentsOutputBody` + +NewListArchiveContentsOutputBodyWithDefaults instantiates a new ListArchiveContentsOutputBody object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEntries + +`func (o *ListArchiveContentsOutputBody) GetEntries() []ArchiveContentEntry` + +GetEntries returns the Entries field if non-nil, zero value otherwise. + +### GetEntriesOk + +`func (o *ListArchiveContentsOutputBody) GetEntriesOk() (*[]ArchiveContentEntry, bool)` + +GetEntriesOk returns a tuple with the Entries field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEntries + +`func (o *ListArchiveContentsOutputBody) SetEntries(v []ArchiveContentEntry)` + +SetEntries sets Entries field to given value. + + +### SetEntriesNil + +`func (o *ListArchiveContentsOutputBody) SetEntriesNil(b bool)` + + SetEntriesNil sets the value for Entries to be an explicit nil + +### UnsetEntries +`func (o *ListArchiveContentsOutputBody) UnsetEntries()` + +UnsetEntries ensures that no value is present for Entries, not even an explicit nil +### GetHasNext + +`func (o *ListArchiveContentsOutputBody) GetHasNext() bool` + +GetHasNext returns the HasNext field if non-nil, zero value otherwise. + +### GetHasNextOk + +`func (o *ListArchiveContentsOutputBody) GetHasNextOk() (*bool, bool)` + +GetHasNextOk returns a tuple with the HasNext field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHasNext + +`func (o *ListArchiveContentsOutputBody) SetHasNext(v bool)` + +SetHasNext sets HasNext field to given value. + + +### GetPage + +`func (o *ListArchiveContentsOutputBody) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *ListArchiveContentsOutputBody) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *ListArchiveContentsOutputBody) SetPage(v int64)` + +SetPage sets Page field to given value. + + +### GetPageSize + +`func (o *ListArchiveContentsOutputBody) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *ListArchiveContentsOutputBody) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *ListArchiveContentsOutputBody) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + + +### GetTotalCount + +`func (o *ListArchiveContentsOutputBody) GetTotalCount() int64` + +GetTotalCount returns the TotalCount field if non-nil, zero value otherwise. + +### GetTotalCountOk + +`func (o *ListArchiveContentsOutputBody) GetTotalCountOk() (*int64, bool)` + +GetTotalCountOk returns a tuple with the TotalCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalCount + +`func (o *ListArchiveContentsOutputBody) SetTotalCount(v int64)` + +SetTotalCount sets TotalCount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListImportedFunctionsOutputBody.md b/docs/ListImportedFunctionsOutputBody.md new file mode 100644 index 0000000..f78cbd8 --- /dev/null +++ b/docs/ListImportedFunctionsOutputBody.md @@ -0,0 +1,82 @@ +# ListImportedFunctionsOutputBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ImportedFunctions** | [**[]ImportedFunctionEntry**](ImportedFunctionEntry.md) | | +**TotalCount** | **int64** | Total imported functions for the binary, ignoring pagination. | + +## Methods + +### NewListImportedFunctionsOutputBody + +`func NewListImportedFunctionsOutputBody(importedFunctions []ImportedFunctionEntry, totalCount int64, ) *ListImportedFunctionsOutputBody` + +NewListImportedFunctionsOutputBody instantiates a new ListImportedFunctionsOutputBody object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewListImportedFunctionsOutputBodyWithDefaults + +`func NewListImportedFunctionsOutputBodyWithDefaults() *ListImportedFunctionsOutputBody` + +NewListImportedFunctionsOutputBodyWithDefaults instantiates a new ListImportedFunctionsOutputBody object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetImportedFunctions + +`func (o *ListImportedFunctionsOutputBody) GetImportedFunctions() []ImportedFunctionEntry` + +GetImportedFunctions returns the ImportedFunctions field if non-nil, zero value otherwise. + +### GetImportedFunctionsOk + +`func (o *ListImportedFunctionsOutputBody) GetImportedFunctionsOk() (*[]ImportedFunctionEntry, bool)` + +GetImportedFunctionsOk returns a tuple with the ImportedFunctions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetImportedFunctions + +`func (o *ListImportedFunctionsOutputBody) SetImportedFunctions(v []ImportedFunctionEntry)` + +SetImportedFunctions sets ImportedFunctions field to given value. + + +### SetImportedFunctionsNil + +`func (o *ListImportedFunctionsOutputBody) SetImportedFunctionsNil(b bool)` + + SetImportedFunctionsNil sets the value for ImportedFunctions to be an explicit nil + +### UnsetImportedFunctions +`func (o *ListImportedFunctionsOutputBody) UnsetImportedFunctions()` + +UnsetImportedFunctions ensures that no value is present for ImportedFunctions, not even an explicit nil +### GetTotalCount + +`func (o *ListImportedFunctionsOutputBody) GetTotalCount() int64` + +GetTotalCount returns the TotalCount field if non-nil, zero value otherwise. + +### GetTotalCountOk + +`func (o *ListImportedFunctionsOutputBody) GetTotalCountOk() (*int64, bool)` + +GetTotalCountOk returns a tuple with the TotalCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalCount + +`func (o *ListImportedFunctionsOutputBody) SetTotalCount(v int64)` + +SetTotalCount sets TotalCount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SandboxOptions.md b/docs/SandboxOptions.md index 0e2f4bd..d0fa0f8 100644 --- a/docs/SandboxOptions.md +++ b/docs/SandboxOptions.md @@ -8,6 +8,9 @@ Name | Type | Description | Notes **CommandLineArgs** | Pointer to **string** | The command line parameters to pass to the dynamic execution sandbox. Requires `sandbox` to be True. | [optional] [default to ""] **StartMethod** | Pointer to [**NullableSandboxStartMethod**](SandboxStartMethod.md) | | [optional] **Timeout** | Pointer to [**SandboxTimeout**](SandboxTimeout.md) | Maximum execution time for the sandbox run, in seconds. Allowed values: 120 (2m), 180 (3m), 300 (5m), 600 (10m). | [optional] [default to SANDBOXTIMEOUT__120] +**ArchiveSha256Hash** | Pointer to **NullableString** | | [optional] +**ArchiveEntryPath** | Pointer to **NullableString** | | [optional] +**ArchivePassword** | Pointer to **NullableString** | | [optional] ## Methods @@ -138,6 +141,111 @@ SetTimeout sets Timeout field to given value. HasTimeout returns a boolean if a field has been set. +### GetArchiveSha256Hash + +`func (o *SandboxOptions) GetArchiveSha256Hash() string` + +GetArchiveSha256Hash returns the ArchiveSha256Hash field if non-nil, zero value otherwise. + +### GetArchiveSha256HashOk + +`func (o *SandboxOptions) GetArchiveSha256HashOk() (*string, bool)` + +GetArchiveSha256HashOk returns a tuple with the ArchiveSha256Hash field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArchiveSha256Hash + +`func (o *SandboxOptions) SetArchiveSha256Hash(v string)` + +SetArchiveSha256Hash sets ArchiveSha256Hash field to given value. + +### HasArchiveSha256Hash + +`func (o *SandboxOptions) HasArchiveSha256Hash() bool` + +HasArchiveSha256Hash returns a boolean if a field has been set. + +### SetArchiveSha256HashNil + +`func (o *SandboxOptions) SetArchiveSha256HashNil(b bool)` + + SetArchiveSha256HashNil sets the value for ArchiveSha256Hash to be an explicit nil + +### UnsetArchiveSha256Hash +`func (o *SandboxOptions) UnsetArchiveSha256Hash()` + +UnsetArchiveSha256Hash ensures that no value is present for ArchiveSha256Hash, not even an explicit nil +### GetArchiveEntryPath + +`func (o *SandboxOptions) GetArchiveEntryPath() string` + +GetArchiveEntryPath returns the ArchiveEntryPath field if non-nil, zero value otherwise. + +### GetArchiveEntryPathOk + +`func (o *SandboxOptions) GetArchiveEntryPathOk() (*string, bool)` + +GetArchiveEntryPathOk returns a tuple with the ArchiveEntryPath field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArchiveEntryPath + +`func (o *SandboxOptions) SetArchiveEntryPath(v string)` + +SetArchiveEntryPath sets ArchiveEntryPath field to given value. + +### HasArchiveEntryPath + +`func (o *SandboxOptions) HasArchiveEntryPath() bool` + +HasArchiveEntryPath returns a boolean if a field has been set. + +### SetArchiveEntryPathNil + +`func (o *SandboxOptions) SetArchiveEntryPathNil(b bool)` + + SetArchiveEntryPathNil sets the value for ArchiveEntryPath to be an explicit nil + +### UnsetArchiveEntryPath +`func (o *SandboxOptions) UnsetArchiveEntryPath()` + +UnsetArchiveEntryPath ensures that no value is present for ArchiveEntryPath, not even an explicit nil +### GetArchivePassword + +`func (o *SandboxOptions) GetArchivePassword() string` + +GetArchivePassword returns the ArchivePassword field if non-nil, zero value otherwise. + +### GetArchivePasswordOk + +`func (o *SandboxOptions) GetArchivePasswordOk() (*string, bool)` + +GetArchivePasswordOk returns a tuple with the ArchivePassword field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArchivePassword + +`func (o *SandboxOptions) SetArchivePassword(v string)` + +SetArchivePassword sets ArchivePassword field to given value. + +### HasArchivePassword + +`func (o *SandboxOptions) HasArchivePassword() bool` + +HasArchivePassword returns a boolean if a field has been set. + +### SetArchivePasswordNil + +`func (o *SandboxOptions) SetArchivePasswordNil(b bool)` + + SetArchivePasswordNil sets the value for ArchivePassword to be an explicit nil + +### UnsetArchivePassword +`func (o *SandboxOptions) UnsetArchivePassword()` + +UnsetArchivePassword ensures that no value is present for ArchivePassword, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SseEventToolCallProgressData.md b/docs/SseEventToolCallProgressData.md new file mode 100644 index 0000000..e591a9f --- /dev/null +++ b/docs/SseEventToolCallProgressData.md @@ -0,0 +1,129 @@ +# SseEventToolCallProgressData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | **interface{}** | | +**EventId** | **int64** | | +**SourceRunId** | Pointer to **string** | | [optional] +**Type** | **string** | | + +## Methods + +### NewSseEventToolCallProgressData + +`func NewSseEventToolCallProgressData(data interface{}, eventId int64, type_ string, ) *SseEventToolCallProgressData` + +NewSseEventToolCallProgressData instantiates a new SseEventToolCallProgressData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSseEventToolCallProgressDataWithDefaults + +`func NewSseEventToolCallProgressDataWithDefaults() *SseEventToolCallProgressData` + +NewSseEventToolCallProgressDataWithDefaults instantiates a new SseEventToolCallProgressData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *SseEventToolCallProgressData) GetData() interface{}` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *SseEventToolCallProgressData) GetDataOk() (*interface{}, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *SseEventToolCallProgressData) SetData(v interface{})` + +SetData sets Data field to given value. + + +### SetDataNil + +`func (o *SseEventToolCallProgressData) SetDataNil(b bool)` + + SetDataNil sets the value for Data to be an explicit nil + +### UnsetData +`func (o *SseEventToolCallProgressData) UnsetData()` + +UnsetData ensures that no value is present for Data, not even an explicit nil +### GetEventId + +`func (o *SseEventToolCallProgressData) GetEventId() int64` + +GetEventId returns the EventId field if non-nil, zero value otherwise. + +### GetEventIdOk + +`func (o *SseEventToolCallProgressData) GetEventIdOk() (*int64, bool)` + +GetEventIdOk returns a tuple with the EventId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEventId + +`func (o *SseEventToolCallProgressData) SetEventId(v int64)` + +SetEventId sets EventId field to given value. + + +### GetSourceRunId + +`func (o *SseEventToolCallProgressData) GetSourceRunId() string` + +GetSourceRunId returns the SourceRunId field if non-nil, zero value otherwise. + +### GetSourceRunIdOk + +`func (o *SseEventToolCallProgressData) GetSourceRunIdOk() (*string, bool)` + +GetSourceRunIdOk returns a tuple with the SourceRunId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSourceRunId + +`func (o *SseEventToolCallProgressData) SetSourceRunId(v string)` + +SetSourceRunId sets SourceRunId field to given value. + +### HasSourceRunId + +`func (o *SseEventToolCallProgressData) HasSourceRunId() bool` + +HasSourceRunId returns a boolean if a field has been set. + +### GetType + +`func (o *SseEventToolCallProgressData) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *SseEventToolCallProgressData) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *SseEventToolCallProgressData) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StartMatchingForAnalysisInputBody.md b/docs/StartMatchingForAnalysisInputBody.md index a1a25a9..ae020f7 100644 --- a/docs/StartMatchingForAnalysisInputBody.md +++ b/docs/StartMatchingForAnalysisInputBody.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Filters** | Pointer to [**MatchFilters**](MatchFilters.md) | Narrow the candidate pool. | [optional] **MinSimilarity** | Pointer to **float64** | Similarity floor as a percentage. Defaults to 90. | [optional] +**NoCache** | Pointer to **bool** | By default a completed matching run for the same request is reused (response status=COMPLETED, no new run). Set true to force a fresh run. | [optional] **ResultsPerFunction** | Pointer to **int64** | Max matches returned per source function. Defaults to 1. | [optional] ## Methods @@ -77,6 +78,31 @@ SetMinSimilarity sets MinSimilarity field to given value. HasMinSimilarity returns a boolean if a field has been set. +### GetNoCache + +`func (o *StartMatchingForAnalysisInputBody) GetNoCache() bool` + +GetNoCache returns the NoCache field if non-nil, zero value otherwise. + +### GetNoCacheOk + +`func (o *StartMatchingForAnalysisInputBody) GetNoCacheOk() (*bool, bool)` + +GetNoCacheOk returns a tuple with the NoCache field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNoCache + +`func (o *StartMatchingForAnalysisInputBody) SetNoCache(v bool)` + +SetNoCache sets NoCache field to given value. + +### HasNoCache + +`func (o *StartMatchingForAnalysisInputBody) HasNoCache() bool` + +HasNoCache returns a boolean if a field has been set. + ### GetResultsPerFunction `func (o *StartMatchingForAnalysisInputBody) GetResultsPerFunction() int64` diff --git a/docs/StartMatchingForFunctionsInputBody.md b/docs/StartMatchingForFunctionsInputBody.md index c5f3fd3..d60937e 100644 --- a/docs/StartMatchingForFunctionsInputBody.md +++ b/docs/StartMatchingForFunctionsInputBody.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **Filters** | Pointer to [**MatchFilters**](MatchFilters.md) | Narrow the candidate pool. | [optional] **FunctionIds** | **[]int64** | Source function IDs to match against the rest of the corpus. | **MinSimilarity** | Pointer to **float64** | Similarity floor as a percentage. Defaults to 90. | [optional] +**NoCache** | Pointer to **bool** | By default a completed matching run for the same request is reused (response status=COMPLETED, no new run). Set true to force a fresh run. | [optional] **ResultsPerFunction** | Pointer to **int64** | Max matches returned per source function. Defaults to 1. | [optional] **UseCanonicalNames** | Pointer to **bool** | Collapse near-duplicate candidate names into canonical buckets and return per-name confidences (the response 'confidences' array). Adds a canonicalisation step; defaults to false. | [optional] @@ -109,6 +110,31 @@ SetMinSimilarity sets MinSimilarity field to given value. HasMinSimilarity returns a boolean if a field has been set. +### GetNoCache + +`func (o *StartMatchingForFunctionsInputBody) GetNoCache() bool` + +GetNoCache returns the NoCache field if non-nil, zero value otherwise. + +### GetNoCacheOk + +`func (o *StartMatchingForFunctionsInputBody) GetNoCacheOk() (*bool, bool)` + +GetNoCacheOk returns a tuple with the NoCache field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNoCache + +`func (o *StartMatchingForFunctionsInputBody) SetNoCache(v bool)` + +SetNoCache sets NoCache field to given value. + +### HasNoCache + +`func (o *StartMatchingForFunctionsInputBody) HasNoCache() bool` + +HasNoCache returns a boolean if a field has been set. + ### GetResultsPerFunction `func (o *StartMatchingForFunctionsInputBody) GetResultsPerFunction() int64` diff --git a/docs/StartMatchingOutputBody.md b/docs/StartMatchingOutputBody.md index a18e8c1..821d760 100644 --- a/docs/StartMatchingOutputBody.md +++ b/docs/StartMatchingOutputBody.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**MatchId** | **string** | Opaque token for this matching run. Pass it to the GET/status endpoints' match_id query parameter to fetch this exact run. | **Messages** | [**[]ProgressMessage**](ProgressMessage.md) | Log messages emitted during execution | **Status** | **string** | Current workflow status | **Step** | **string** | Name of the current step | @@ -14,7 +15,7 @@ Name | Type | Description | Notes ### NewStartMatchingOutputBody -`func NewStartMatchingOutputBody(messages []ProgressMessage, status string, step string, stepIndex int64, stepsTotal int64, ) *StartMatchingOutputBody` +`func NewStartMatchingOutputBody(matchId string, messages []ProgressMessage, status string, step string, stepIndex int64, stepsTotal int64, ) *StartMatchingOutputBody` NewStartMatchingOutputBody instantiates a new StartMatchingOutputBody object This constructor will assign default values to properties that have it defined, @@ -29,6 +30,26 @@ NewStartMatchingOutputBodyWithDefaults instantiates a new StartMatchingOutputBod This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set +### GetMatchId + +`func (o *StartMatchingOutputBody) GetMatchId() string` + +GetMatchId returns the MatchId field if non-nil, zero value otherwise. + +### GetMatchIdOk + +`func (o *StartMatchingOutputBody) GetMatchIdOk() (*string, bool)` + +GetMatchIdOk returns a tuple with the MatchId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMatchId + +`func (o *StartMatchingOutputBody) SetMatchId(v string)` + +SetMatchId sets MatchId field to given value. + + ### GetMessages `func (o *StartMatchingOutputBody) GetMessages() []ProgressMessage` diff --git a/docs/TriggerDynamicExecutionInputBody.md b/docs/TriggerDynamicExecutionInputBody.md index 0b29594..1477329 100644 --- a/docs/TriggerDynamicExecutionInputBody.md +++ b/docs/TriggerDynamicExecutionInputBody.md @@ -4,6 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**ArchiveEntryPath** | Pointer to **string** | Relative path of the entry inside the archive to execute | [optional] +**ArchivePassword** | Pointer to **string** | Password for an encrypted archive | [optional] +**ArchiveSha256Hash** | Pointer to **string** | SHA-256 of the archive object to send to the sandbox instead of the analysed binary | [optional] **CommandLineArgs** | Pointer to **string** | Command-line arguments passed to the sample when the sandbox launches it | [optional] **StartMethod** | Pointer to **string** | How the sandbox launches the sample. Defaults to the sandbox's standard behaviour when omitted. | [optional] **Timeout** | Pointer to **int64** | Maximum sandbox execution time in seconds | [optional] [default to 120] @@ -27,6 +30,81 @@ NewTriggerDynamicExecutionInputBodyWithDefaults instantiates a new TriggerDynami This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set +### GetArchiveEntryPath + +`func (o *TriggerDynamicExecutionInputBody) GetArchiveEntryPath() string` + +GetArchiveEntryPath returns the ArchiveEntryPath field if non-nil, zero value otherwise. + +### GetArchiveEntryPathOk + +`func (o *TriggerDynamicExecutionInputBody) GetArchiveEntryPathOk() (*string, bool)` + +GetArchiveEntryPathOk returns a tuple with the ArchiveEntryPath field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArchiveEntryPath + +`func (o *TriggerDynamicExecutionInputBody) SetArchiveEntryPath(v string)` + +SetArchiveEntryPath sets ArchiveEntryPath field to given value. + +### HasArchiveEntryPath + +`func (o *TriggerDynamicExecutionInputBody) HasArchiveEntryPath() bool` + +HasArchiveEntryPath returns a boolean if a field has been set. + +### GetArchivePassword + +`func (o *TriggerDynamicExecutionInputBody) GetArchivePassword() string` + +GetArchivePassword returns the ArchivePassword field if non-nil, zero value otherwise. + +### GetArchivePasswordOk + +`func (o *TriggerDynamicExecutionInputBody) GetArchivePasswordOk() (*string, bool)` + +GetArchivePasswordOk returns a tuple with the ArchivePassword field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArchivePassword + +`func (o *TriggerDynamicExecutionInputBody) SetArchivePassword(v string)` + +SetArchivePassword sets ArchivePassword field to given value. + +### HasArchivePassword + +`func (o *TriggerDynamicExecutionInputBody) HasArchivePassword() bool` + +HasArchivePassword returns a boolean if a field has been set. + +### GetArchiveSha256Hash + +`func (o *TriggerDynamicExecutionInputBody) GetArchiveSha256Hash() string` + +GetArchiveSha256Hash returns the ArchiveSha256Hash field if non-nil, zero value otherwise. + +### GetArchiveSha256HashOk + +`func (o *TriggerDynamicExecutionInputBody) GetArchiveSha256HashOk() (*string, bool)` + +GetArchiveSha256HashOk returns a tuple with the ArchiveSha256Hash field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArchiveSha256Hash + +`func (o *TriggerDynamicExecutionInputBody) SetArchiveSha256Hash(v string)` + +SetArchiveSha256Hash sets ArchiveSha256Hash field to given value. + +### HasArchiveSha256Hash + +`func (o *TriggerDynamicExecutionInputBody) HasArchiveSha256Hash() bool` + +HasArchiveSha256Hash returns a boolean if a field has been set. + ### GetCommandLineArgs `func (o *TriggerDynamicExecutionInputBody) GetCommandLineArgs() string` diff --git a/docs/UploadResponse.md b/docs/UploadResponse.md index 124bf96..6e03857 100644 --- a/docs/UploadResponse.md +++ b/docs/UploadResponse.md @@ -7,12 +7,16 @@ Name | Type | Description | Notes **Sha256Hash** | **string** | | **FileType** | [**UploadFileType**](UploadFileType.md) | | **Filename** | **string** | | +**Mime** | **string** | | +**IsArchive** | **bool** | | +**CanSandbox** | **bool** | | +**CanExtract** | **bool** | | ## Methods ### NewUploadResponse -`func NewUploadResponse(sha256Hash string, fileType UploadFileType, filename string, ) *UploadResponse` +`func NewUploadResponse(sha256Hash string, fileType UploadFileType, filename string, mime string, isArchive bool, canSandbox bool, canExtract bool, ) *UploadResponse` NewUploadResponse instantiates a new UploadResponse object This constructor will assign default values to properties that have it defined, @@ -87,6 +91,86 @@ and a boolean to check if the value has been set. SetFilename sets Filename field to given value. +### GetMime + +`func (o *UploadResponse) GetMime() string` + +GetMime returns the Mime field if non-nil, zero value otherwise. + +### GetMimeOk + +`func (o *UploadResponse) GetMimeOk() (*string, bool)` + +GetMimeOk returns a tuple with the Mime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMime + +`func (o *UploadResponse) SetMime(v string)` + +SetMime sets Mime field to given value. + + +### GetIsArchive + +`func (o *UploadResponse) GetIsArchive() bool` + +GetIsArchive returns the IsArchive field if non-nil, zero value otherwise. + +### GetIsArchiveOk + +`func (o *UploadResponse) GetIsArchiveOk() (*bool, bool)` + +GetIsArchiveOk returns a tuple with the IsArchive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsArchive + +`func (o *UploadResponse) SetIsArchive(v bool)` + +SetIsArchive sets IsArchive field to given value. + + +### GetCanSandbox + +`func (o *UploadResponse) GetCanSandbox() bool` + +GetCanSandbox returns the CanSandbox field if non-nil, zero value otherwise. + +### GetCanSandboxOk + +`func (o *UploadResponse) GetCanSandboxOk() (*bool, bool)` + +GetCanSandboxOk returns a tuple with the CanSandbox field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCanSandbox + +`func (o *UploadResponse) SetCanSandbox(v bool)` + +SetCanSandbox sets CanSandbox field to given value. + + +### GetCanExtract + +`func (o *UploadResponse) GetCanExtract() bool` + +GetCanExtract returns the CanExtract field if non-nil, zero value otherwise. + +### GetCanExtractOk + +`func (o *UploadResponse) GetCanExtractOk() (*bool, bool)` + +GetCanExtractOk returns a tuple with the CanExtract field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCanExtract + +`func (o *UploadResponse) SetCanExtract(v bool)` + +SetCanExtract sets CanExtract field to given value. + + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/User.md b/docs/User.md index 671e8fc..7297150 100644 --- a/docs/User.md +++ b/docs/User.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CreatedAt** | Pointer to **time.Time** | | [optional] +**CreatedAt** | **time.Time** | | **Email** | **string** | | **Profile** | [**UserProfile**](UserProfile.md) | | **Role** | **string** | | @@ -15,7 +15,7 @@ Name | Type | Description | Notes ### NewUser -`func NewUser(email string, profile UserProfile, role string, userId int64, ) *User` +`func NewUser(createdAt time.Time, email string, profile UserProfile, role string, userId int64, ) *User` NewUser instantiates a new User object This constructor will assign default values to properties that have it defined, @@ -49,11 +49,6 @@ and a boolean to check if the value has been set. SetCreatedAt sets CreatedAt field to given value. -### HasCreatedAt - -`func (o *User) HasCreatedAt() bool` - -HasCreatedAt returns a boolean if a field has been set. ### GetEmail diff --git a/v3/api_analyses_core.go b/v3/api_analyses_core.go index e960a25..ab3aab7 100644 --- a/v3/api_analyses_core.go +++ b/v3/api_analyses_core.go @@ -1122,6 +1122,13 @@ type ApiGetAnalysisFunctionMatchesRequest struct { ctx context.Context ApiService *AnalysesCoreAPIService analysisId int64 + matchId *string +} + +// Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. +func (r ApiGetAnalysisFunctionMatchesRequest) MatchId(matchId string) ApiGetAnalysisFunctionMatchesRequest { + r.matchId = &matchId + return r } func (r ApiGetAnalysisFunctionMatchesRequest) Execute() (*GetMatchesOutputBody, *http.Response, error) { @@ -1136,6 +1143,7 @@ Returns the matches blob when the matching workflow has completed. While the wor **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +- `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param analysisId Analysis ID @@ -1174,6 +1182,9 @@ func (a *AnalysesCoreAPIService) GetAnalysisFunctionMatchesExecute(r ApiGetAnaly return localVarReturnValue, nil, reportError("analysisId must be greater than 1") } + if r.matchId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "match_id", r.matchId, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1227,6 +1238,17 @@ func (a *AnalysesCoreAPIService) GetAnalysisFunctionMatchesExecute(r ApiGetAnaly body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 403 { var v APIError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -1289,6 +1311,13 @@ type ApiGetAnalysisFunctionMatchingStatusRequest struct { ctx context.Context ApiService *AnalysesCoreAPIService analysisId int64 + matchId *string +} + +// Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. +func (r ApiGetAnalysisFunctionMatchingStatusRequest) MatchId(matchId string) ApiGetAnalysisFunctionMatchingStatusRequest { + r.matchId = &matchId + return r } func (r ApiGetAnalysisFunctionMatchingStatusRequest) Execute() (*GetMatchesStatusOutputBody, *http.Response, error) { @@ -1303,6 +1332,7 @@ Returns the matching workflow's current status. Does not include the matches blo **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +- `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param analysisId Analysis ID @@ -1341,6 +1371,9 @@ func (a *AnalysesCoreAPIService) GetAnalysisFunctionMatchingStatusExecute(r ApiG return localVarReturnValue, nil, reportError("analysisId must be greater than 1") } + if r.matchId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "match_id", r.matchId, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1394,6 +1427,17 @@ func (a *AnalysesCoreAPIService) GetAnalysisFunctionMatchingStatusExecute(r ApiG body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 403 { var v APIError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -3657,6 +3701,173 @@ func (a *AnalysesCoreAPIService) UploadFileExecute(r ApiUploadFileRequest) (*Bas return localVarReturnValue, localVarHTTPResponse, nil } +type ApiV3GetAnalysisAutoUnstripStatusRequest struct { + ctx context.Context + ApiService *AnalysesCoreAPIService + analysisId int64 +} + +func (r ApiV3GetAnalysisAutoUnstripStatusRequest) Execute() (*AutoUnstripStatusOutputBody, *http.Response, error) { + return r.ApiService.V3GetAnalysisAutoUnstripStatusExecute(r) +} + +/* +V3GetAnalysisAutoUnstripStatus Get the auto-unstrip status for an analysis. + +Returns the status of the auto-unstrip task for the binary backing the analysis. One of `UNINITIALISED`, `PENDING`, `RUNNING`, `COMPLETED`, `FAILED`. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param analysisId Analysis ID + @return ApiV3GetAnalysisAutoUnstripStatusRequest +*/ +func (a *AnalysesCoreAPIService) V3GetAnalysisAutoUnstripStatus(ctx context.Context, analysisId int64) ApiV3GetAnalysisAutoUnstripStatusRequest { + return ApiV3GetAnalysisAutoUnstripStatusRequest{ + ApiService: a, + ctx: ctx, + analysisId: analysisId, + } +} + +// Execute executes the request +// @return AutoUnstripStatusOutputBody +func (a *AnalysesCoreAPIService) V3GetAnalysisAutoUnstripStatusExecute(r ApiV3GetAnalysisAutoUnstripStatusRequest) (*AutoUnstripStatusOutputBody, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AutoUnstripStatusOutputBody + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnalysesCoreAPIService.V3GetAnalysisAutoUnstripStatus") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v3/analyses/{analysis_id}/auto-unstrip/status" + localVarPath = strings.Replace(localVarPath, "{"+"analysis_id"+"}", url.PathEscape(parameterValueToString(r.analysisId, "analysisId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.analysisId < 1 { + return localVarReturnValue, nil, reportError("analysisId must be greater than 1") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["APIKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 403 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiV3GetAnalysisStringsRequest struct { ctx context.Context ApiService *AnalysesCoreAPIService @@ -4067,6 +4278,278 @@ func (a *AnalysesCoreAPIService) V3GetAnalysisStringsStatusExecute(r ApiV3GetAna return localVarReturnValue, localVarHTTPResponse, nil } +type ApiV3ListAnalysesRequest struct { + ctx context.Context + ApiService *AnalysesCoreAPIService + searchTerm *string + analysisScope *[]string + status *[]string + modelName *[]*string + usernames *[]*string + sha256Hash *string + pageSize *int64 + nextPageToken *string + orderBy *string + order *string +} + +func (r ApiV3ListAnalysesRequest) SearchTerm(searchTerm string) ApiV3ListAnalysesRequest { + r.searchTerm = &searchTerm + return r +} + +// Leave empty for no filter +func (r ApiV3ListAnalysesRequest) AnalysisScope(analysisScope []string) ApiV3ListAnalysesRequest { + r.analysisScope = &analysisScope + return r +} + +func (r ApiV3ListAnalysesRequest) Status(status []string) ApiV3ListAnalysesRequest { + r.status = &status + return r +} + +func (r ApiV3ListAnalysesRequest) ModelName(modelName []*string) ApiV3ListAnalysesRequest { + r.modelName = &modelName + return r +} + +func (r ApiV3ListAnalysesRequest) Usernames(usernames []*string) ApiV3ListAnalysesRequest { + r.usernames = &usernames + return r +} + +func (r ApiV3ListAnalysesRequest) Sha256Hash(sha256Hash string) ApiV3ListAnalysesRequest { + r.sha256Hash = &sha256Hash + return r +} + +func (r ApiV3ListAnalysesRequest) PageSize(pageSize int64) ApiV3ListAnalysesRequest { + r.pageSize = &pageSize + return r +} + +// Forward-pagination cursor from a prior response. When set, order_by/order are taken from the token (the sort cannot change mid-pagination). +func (r ApiV3ListAnalysesRequest) NextPageToken(nextPageToken string) ApiV3ListAnalysesRequest { + r.nextPageToken = &nextPageToken + return r +} + +func (r ApiV3ListAnalysesRequest) OrderBy(orderBy string) ApiV3ListAnalysesRequest { + r.orderBy = &orderBy + return r +} + +func (r ApiV3ListAnalysesRequest) Order(order string) ApiV3ListAnalysesRequest { + r.order = &order + return r +} + +func (r ApiV3ListAnalysesRequest) Execute() (*ListAnalysesOutputBody, *http.Response, error) { + return r.ApiService.V3ListAnalysesExecute(r) +} + +/* +V3ListAnalyses List analyses + +Returns a page of analyses visible to the caller, filtered and ordered by the query parameters. + +**Error codes:** +- `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiV3ListAnalysesRequest +*/ +func (a *AnalysesCoreAPIService) V3ListAnalyses(ctx context.Context) ApiV3ListAnalysesRequest { + return ApiV3ListAnalysesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ListAnalysesOutputBody +func (a *AnalysesCoreAPIService) V3ListAnalysesExecute(r ApiV3ListAnalysesRequest) (*ListAnalysesOutputBody, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListAnalysesOutputBody + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnalysesCoreAPIService.V3ListAnalyses") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v3/analyses" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.searchTerm != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search_term", r.searchTerm, "form", "") + } + if r.analysisScope != nil { + t := *r.analysisScope + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "analysis_scope", s.Index(i).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "analysis_scope", t, "form", "multi") + } + } else { + var defaultValue []string = []string{"PRIVATE"} + parameterAddToHeaderOrQuery(localVarQueryParams, "analysis_scope", defaultValue, "form", "multi") + r.analysisScope = &defaultValue + } + if r.status != nil { + t := *r.status + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "status", s.Index(i).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "status", t, "form", "multi") + } + } + if r.modelName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "model_name", r.modelName, "form", "csv") + } + if r.usernames != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "usernames", r.usernames, "form", "csv") + } + if r.sha256Hash != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sha256_hash", r.sha256Hash, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } else { + var defaultValue int64 = 20 + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", defaultValue, "form", "") + r.pageSize = &defaultValue + } + if r.nextPageToken != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "next_page_token", r.nextPageToken, "form", "") + } + if r.orderBy != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order_by", r.orderBy, "form", "") + } else { + var defaultValue string = "created" + parameterAddToHeaderOrQuery(localVarQueryParams, "order_by", defaultValue, "form", "") + r.orderBy = &defaultValue + } + if r.order != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order", r.order, "form", "") + } else { + var defaultValue string = "DESC" + parameterAddToHeaderOrQuery(localVarQueryParams, "order", defaultValue, "form", "") + r.order = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["APIKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiV3ListExampleAnalysesRequest struct { ctx context.Context ApiService *AnalysesCoreAPIService diff --git a/v3/api_functions_core.go b/v3/api_functions_core.go index be5a6fe..82f9cc1 100644 --- a/v3/api_functions_core.go +++ b/v3/api_functions_core.go @@ -2895,6 +2895,173 @@ func (a *FunctionsCoreAPIService) GetFunctionDetails_4Execute(r ApiGetFunctionDe return localVarReturnValue, localVarHTTPResponse, nil } +type ApiGetFunctionIndirectCallSitesRequest struct { + ctx context.Context + ApiService *FunctionsCoreAPIService + functionId int64 +} + +func (r ApiGetFunctionIndirectCallSitesRequest) Execute() (*IndirectCallSitesOutputBody, *http.Response, error) { + return r.ApiService.GetFunctionIndirectCallSitesExecute(r) +} + +/* +GetFunctionIndirectCallSites Get indirect call sites for a function + +Returns the function's indirect call instructions with their resolved call target. + +**Error codes:** +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param functionId Function ID + @return ApiGetFunctionIndirectCallSitesRequest +*/ +func (a *FunctionsCoreAPIService) GetFunctionIndirectCallSites(ctx context.Context, functionId int64) ApiGetFunctionIndirectCallSitesRequest { + return ApiGetFunctionIndirectCallSitesRequest{ + ApiService: a, + ctx: ctx, + functionId: functionId, + } +} + +// Execute executes the request +// @return IndirectCallSitesOutputBody +func (a *FunctionsCoreAPIService) GetFunctionIndirectCallSitesExecute(r ApiGetFunctionIndirectCallSitesRequest) (*IndirectCallSitesOutputBody, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *IndirectCallSitesOutputBody + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FunctionsCoreAPIService.GetFunctionIndirectCallSites") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v3/functions/{function_id}/indirect-call-sites" + localVarPath = strings.Replace(localVarPath, "{"+"function_id"+"}", url.PathEscape(parameterValueToString(r.functionId, "functionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.functionId < 1 { + return localVarReturnValue, nil, reportError("functionId must be greater than 1") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["APIKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 403 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiGetFunctionStringsRequest struct { ctx context.Context ApiService *FunctionsCoreAPIService @@ -3460,10 +3627,17 @@ func (a *FunctionsCoreAPIService) GetFunctionsCalleesCallersExecute(r ApiGetFunc type ApiGetFunctionsMatchesRequest struct { ctx context.Context ApiService *FunctionsCoreAPIService + matchId *string functionIds *[]int64 } -// Source function IDs whose matches to fetch. +// Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. +func (r ApiGetFunctionsMatchesRequest) MatchId(matchId string) ApiGetFunctionsMatchesRequest { + r.matchId = &matchId + return r +} + +// Source function IDs whose matches to fetch. Required unless match_id is supplied. func (r ApiGetFunctionsMatchesRequest) FunctionIds(functionIds []int64) ApiGetFunctionsMatchesRequest { r.functionIds = &functionIds return r @@ -3513,14 +3687,13 @@ func (a *FunctionsCoreAPIService) GetFunctionsMatchesExecute(r ApiGetFunctionsMa localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.functionIds == nil { - return localVarReturnValue, nil, reportError("functionIds is required and must be specified") + + if r.matchId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "match_id", r.matchId, "form", "") } - if len(*r.functionIds) < 1 { - return localVarReturnValue, nil, reportError("functionIds must have at least 1 elements") + if r.functionIds != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "function_ids", r.functionIds, "form", "csv") } - - parameterAddToHeaderOrQuery(localVarQueryParams, "function_ids", r.functionIds, "form", "csv") // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -3646,10 +3819,17 @@ func (a *FunctionsCoreAPIService) GetFunctionsMatchesExecute(r ApiGetFunctionsMa type ApiGetFunctionsMatchingStatusRequest struct { ctx context.Context ApiService *FunctionsCoreAPIService + matchId *string functionIds *[]int64 } -// Source function IDs whose matches to fetch. +// Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. +func (r ApiGetFunctionsMatchingStatusRequest) MatchId(matchId string) ApiGetFunctionsMatchingStatusRequest { + r.matchId = &matchId + return r +} + +// Source function IDs whose matches to fetch. Required unless match_id is supplied. func (r ApiGetFunctionsMatchingStatusRequest) FunctionIds(functionIds []int64) ApiGetFunctionsMatchingStatusRequest { r.functionIds = &functionIds return r @@ -3699,14 +3879,13 @@ func (a *FunctionsCoreAPIService) GetFunctionsMatchingStatusExecute(r ApiGetFunc localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.functionIds == nil { - return localVarReturnValue, nil, reportError("functionIds is required and must be specified") + + if r.matchId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "match_id", r.matchId, "form", "") } - if len(*r.functionIds) < 1 { - return localVarReturnValue, nil, reportError("functionIds must have at least 1 elements") + if r.functionIds != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "function_ids", r.functionIds, "form", "csv") } - - parameterAddToHeaderOrQuery(localVarQueryParams, "function_ids", r.functionIds, "form", "csv") // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -3829,34 +4008,21 @@ func (a *FunctionsCoreAPIService) GetFunctionsMatchingStatusExecute(r ApiGetFunc return localVarReturnValue, localVarHTTPResponse, nil } -type ApiListAnalysisFunctionsRequest struct { +type ApiGetImportedFunctionRequest struct { ctx context.Context ApiService *FunctionsCoreAPIService analysisId int64 - offset *int64 - limit *int64 -} - -// Pagination offset. Defaults to 0. -func (r ApiListAnalysisFunctionsRequest) Offset(offset int64) ApiListAnalysisFunctionsRequest { - r.offset = &offset - return r -} - -// Page size. Defaults to 100. -func (r ApiListAnalysisFunctionsRequest) Limit(limit int64) ApiListAnalysisFunctionsRequest { - r.limit = &limit - return r + importedFunctionId int64 } -func (r ApiListAnalysisFunctionsRequest) Execute() (*ListAnalysisFunctionsOutputBody, *http.Response, error) { - return r.ApiService.ListAnalysisFunctionsExecute(r) +func (r ApiGetImportedFunctionRequest) Execute() (*ImportedFunctionDetailOutputBody, *http.Response, error) { + return r.ApiService.GetImportedFunctionExecute(r) } /* -ListAnalysisFunctions List functions in an analysis +GetImportedFunction Get an imported function with its callers -Returns a paginated list of functions belonging to the analysis. `total_count` is the full population size, ignoring pagination. +Returns a single imported symbol plus the internal functions that call it, resolved via the import's PLT/stub addresses within the binary. Answers "which functions call `free`?" for binary navigation. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied @@ -3864,33 +4030,36 @@ Returns a paginated list of functions belonging to the analysis. `total_count` i @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param analysisId Analysis ID - @return ApiListAnalysisFunctionsRequest + @param importedFunctionId Imported function ID + @return ApiGetImportedFunctionRequest */ -func (a *FunctionsCoreAPIService) ListAnalysisFunctions(ctx context.Context, analysisId int64) ApiListAnalysisFunctionsRequest { - return ApiListAnalysisFunctionsRequest{ +func (a *FunctionsCoreAPIService) GetImportedFunction(ctx context.Context, analysisId int64, importedFunctionId int64) ApiGetImportedFunctionRequest { + return ApiGetImportedFunctionRequest{ ApiService: a, ctx: ctx, analysisId: analysisId, + importedFunctionId: importedFunctionId, } } // Execute executes the request -// @return ListAnalysisFunctionsOutputBody -func (a *FunctionsCoreAPIService) ListAnalysisFunctionsExecute(r ApiListAnalysisFunctionsRequest) (*ListAnalysisFunctionsOutputBody, *http.Response, error) { +// @return ImportedFunctionDetailOutputBody +func (a *FunctionsCoreAPIService) GetImportedFunctionExecute(r ApiGetImportedFunctionRequest) (*ImportedFunctionDetailOutputBody, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListAnalysisFunctionsOutputBody + localVarReturnValue *ImportedFunctionDetailOutputBody ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FunctionsCoreAPIService.ListAnalysisFunctions") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FunctionsCoreAPIService.GetImportedFunction") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v3/analyses/{analysis_id}/functions" + localVarPath := localBasePath + "/v3/analyses/{analysis_id}/imported-functions/{imported_function_id}" localVarPath = strings.Replace(localVarPath, "{"+"analysis_id"+"}", url.PathEscape(parameterValueToString(r.analysisId, "analysisId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"imported_function_id"+"}", url.PathEscape(parameterValueToString(r.importedFunctionId, "importedFunctionId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3898,13 +4067,10 @@ func (a *FunctionsCoreAPIService) ListAnalysisFunctionsExecute(r ApiListAnalysis if r.analysisId < 1 { return localVarReturnValue, nil, reportError("analysisId must be greater than 1") } - - if r.offset != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") - } - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + if r.importedFunctionId < 1 { + return localVarReturnValue, nil, reportError("importedFunctionId must be greater than 1") } + // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -4016,58 +4182,432 @@ func (a *FunctionsCoreAPIService) ListAnalysisFunctionsExecute(r ApiListAnalysis return localVarReturnValue, localVarHTTPResponse, nil } -type ApiStartFunctionsMatchingRequest struct { +type ApiListAnalysisFunctionsRequest struct { ctx context.Context ApiService *FunctionsCoreAPIService - startMatchingForFunctionsInputBody *StartMatchingForFunctionsInputBody + analysisId int64 + offset *int64 + limit *int64 } -func (r ApiStartFunctionsMatchingRequest) StartMatchingForFunctionsInputBody(startMatchingForFunctionsInputBody StartMatchingForFunctionsInputBody) ApiStartFunctionsMatchingRequest { - r.startMatchingForFunctionsInputBody = &startMatchingForFunctionsInputBody +// Pagination offset. Defaults to 0. +func (r ApiListAnalysisFunctionsRequest) Offset(offset int64) ApiListAnalysisFunctionsRequest { + r.offset = &offset return r } -func (r ApiStartFunctionsMatchingRequest) Execute() (*StartMatchingOutputBody, *http.Response, error) { - return r.ApiService.StartFunctionsMatchingExecute(r) +// Page size. Defaults to 100. +func (r ApiListAnalysisFunctionsRequest) Limit(limit int64) ApiListAnalysisFunctionsRequest { + r.limit = &limit + return r +} + +func (r ApiListAnalysisFunctionsRequest) Execute() (*ListAnalysisFunctionsOutputBody, *http.Response, error) { + return r.ApiService.ListAnalysisFunctionsExecute(r) } /* -StartFunctionsMatching Start function matching for an explicit set of functions +ListAnalysisFunctions List functions in an analysis -Dispatches the function-matching workflow against the provided function IDs. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. +Returns a paginated list of functions belonging to the analysis. `total_count` is the full population size, ignoring pagination. **Error codes:** -- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied -- `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiStartFunctionsMatchingRequest + @param analysisId Analysis ID + @return ApiListAnalysisFunctionsRequest */ -func (a *FunctionsCoreAPIService) StartFunctionsMatching(ctx context.Context) ApiStartFunctionsMatchingRequest { - return ApiStartFunctionsMatchingRequest{ +func (a *FunctionsCoreAPIService) ListAnalysisFunctions(ctx context.Context, analysisId int64) ApiListAnalysisFunctionsRequest { + return ApiListAnalysisFunctionsRequest{ ApiService: a, ctx: ctx, + analysisId: analysisId, } } // Execute executes the request -// @return StartMatchingOutputBody -func (a *FunctionsCoreAPIService) StartFunctionsMatchingExecute(r ApiStartFunctionsMatchingRequest) (*StartMatchingOutputBody, *http.Response, error) { +// @return ListAnalysisFunctionsOutputBody +func (a *FunctionsCoreAPIService) ListAnalysisFunctionsExecute(r ApiListAnalysisFunctionsRequest) (*ListAnalysisFunctionsOutputBody, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *StartMatchingOutputBody + localVarReturnValue *ListAnalysisFunctionsOutputBody ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FunctionsCoreAPIService.StartFunctionsMatching") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FunctionsCoreAPIService.ListAnalysisFunctions") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v3/functions/matches" - + localVarPath := localBasePath + "/v3/analyses/{analysis_id}/functions" + localVarPath = strings.Replace(localVarPath, "{"+"analysis_id"+"}", url.PathEscape(parameterValueToString(r.analysisId, "analysisId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.analysisId < 1 { + return localVarReturnValue, nil, reportError("analysisId must be greater than 1") + } + + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["APIKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 403 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListImportedFunctionsRequest struct { + ctx context.Context + ApiService *FunctionsCoreAPIService + analysisId int64 + offset *int64 + limit *int64 +} + +// Pagination offset. Defaults to 0. +func (r ApiListImportedFunctionsRequest) Offset(offset int64) ApiListImportedFunctionsRequest { + r.offset = &offset + return r +} + +// Page size. Defaults to 100. +func (r ApiListImportedFunctionsRequest) Limit(limit int64) ApiListImportedFunctionsRequest { + r.limit = &limit + return r +} + +func (r ApiListImportedFunctionsRequest) Execute() (*ListImportedFunctionsOutputBody, *http.Response, error) { + return r.ApiService.ListImportedFunctionsExecute(r) +} + +/* +ListImportedFunctions List imported functions in an analysis + +Returns a paginated list of external/imported symbols (e.g. libc's `free`) linked by the analysis's binary. These are display-only: they carry no embeddings, cannot be renamed, and never participate in match/diff. `total_count` is the full population size, ignoring pagination. + +**Error codes:** +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param analysisId Analysis ID + @return ApiListImportedFunctionsRequest +*/ +func (a *FunctionsCoreAPIService) ListImportedFunctions(ctx context.Context, analysisId int64) ApiListImportedFunctionsRequest { + return ApiListImportedFunctionsRequest{ + ApiService: a, + ctx: ctx, + analysisId: analysisId, + } +} + +// Execute executes the request +// @return ListImportedFunctionsOutputBody +func (a *FunctionsCoreAPIService) ListImportedFunctionsExecute(r ApiListImportedFunctionsRequest) (*ListImportedFunctionsOutputBody, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListImportedFunctionsOutputBody + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FunctionsCoreAPIService.ListImportedFunctions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v3/analyses/{analysis_id}/imported-functions" + localVarPath = strings.Replace(localVarPath, "{"+"analysis_id"+"}", url.PathEscape(parameterValueToString(r.analysisId, "analysisId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.analysisId < 1 { + return localVarReturnValue, nil, reportError("analysisId must be greater than 1") + } + + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["APIKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 403 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiStartFunctionsMatchingRequest struct { + ctx context.Context + ApiService *FunctionsCoreAPIService + startMatchingForFunctionsInputBody *StartMatchingForFunctionsInputBody +} + +func (r ApiStartFunctionsMatchingRequest) StartMatchingForFunctionsInputBody(startMatchingForFunctionsInputBody StartMatchingForFunctionsInputBody) ApiStartFunctionsMatchingRequest { + r.startMatchingForFunctionsInputBody = &startMatchingForFunctionsInputBody + return r +} + +func (r ApiStartFunctionsMatchingRequest) Execute() (*StartMatchingOutputBody, *http.Response, error) { + return r.ApiService.StartFunctionsMatchingExecute(r) +} + +/* +StartFunctionsMatching Start function matching for an explicit set of functions + +Dispatches the function-matching workflow against the provided function IDs. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +- `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiStartFunctionsMatchingRequest +*/ +func (a *FunctionsCoreAPIService) StartFunctionsMatching(ctx context.Context) ApiStartFunctionsMatchingRequest { + return ApiStartFunctionsMatchingRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return StartMatchingOutputBody +func (a *FunctionsCoreAPIService) StartFunctionsMatchingExecute(r ApiStartFunctionsMatchingRequest) (*StartMatchingOutputBody, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *StartMatchingOutputBody + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FunctionsCoreAPIService.StartFunctionsMatching") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v3/functions/matches" + localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} @@ -4198,3 +4738,174 @@ func (a *FunctionsCoreAPIService) StartFunctionsMatchingExecute(r ApiStartFuncti return localVarReturnValue, localVarHTTPResponse, nil } + +type ApiV3CanonicalizeFunctionNamesRequest struct { + ctx context.Context + ApiService *FunctionsCoreAPIService + canonicalizeNamesInputBody *CanonicalizeNamesInputBody +} + +func (r ApiV3CanonicalizeFunctionNamesRequest) CanonicalizeNamesInputBody(canonicalizeNamesInputBody CanonicalizeNamesInputBody) ApiV3CanonicalizeFunctionNamesRequest { + r.canonicalizeNamesInputBody = &canonicalizeNamesInputBody + return r +} + +func (r ApiV3CanonicalizeFunctionNamesRequest) Execute() (*CanonicalizeNamesOutputBody, *http.Response, error) { + return r.ApiService.V3CanonicalizeFunctionNamesExecute(r) +} + +/* +V3CanonicalizeFunctionNames Canonicalize a batch of function names + +Accepts up to 25 raw function names and returns their canonical forms in the same order. A name with no canonical form is returned unchanged. + +**Error codes:** +- `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request +- `503` [`SERVICE_UNAVAILABLE`](/errors/SERVICE_UNAVAILABLE) — Service Unavailable + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiV3CanonicalizeFunctionNamesRequest +*/ +func (a *FunctionsCoreAPIService) V3CanonicalizeFunctionNames(ctx context.Context) ApiV3CanonicalizeFunctionNamesRequest { + return ApiV3CanonicalizeFunctionNamesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CanonicalizeNamesOutputBody +func (a *FunctionsCoreAPIService) V3CanonicalizeFunctionNamesExecute(r ApiV3CanonicalizeFunctionNamesRequest) (*CanonicalizeNamesOutputBody, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CanonicalizeNamesOutputBody + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FunctionsCoreAPIService.V3CanonicalizeFunctionNames") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v3/functions/canonical-names" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.canonicalizeNamesInputBody == nil { + return localVarReturnValue, nil, reportError("canonicalizeNamesInputBody is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.canonicalizeNamesInputBody + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["APIKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/v3/client.go b/v3/client.go index e44da4d..9e16850 100644 --- a/v3/client.go +++ b/v3/client.go @@ -40,7 +40,7 @@ var ( queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) ) -// APIClient manages communication with the RevEng.AI API API vv3.105.0 +// APIClient manages communication with the RevEng.AI API API vv3.114.2 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration diff --git a/v3/configuration.go b/v3/configuration.go index 15b5a3d..84951b3 100644 --- a/v3/configuration.go +++ b/v3/configuration.go @@ -91,7 +91,7 @@ type Configuration struct { func NewConfiguration() *Configuration { cfg := &Configuration{ DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/v3.105.0/go", + UserAgent: "OpenAPI-Generator/v3.114.2/go", Debug: false, Servers: ServerConfigurations{ { diff --git a/v3/model_analysis_record_body.go b/v3/model_analysis_record_body.go new file mode 100644 index 0000000..4a7fad6 --- /dev/null +++ b/v3/model_analysis_record_body.go @@ -0,0 +1,593 @@ +/* +RevEng.AI API + +RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sdk + +import ( + "encoding/json" + "time" + "fmt" +) + +// checks if the AnalysisRecordBody type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnalysisRecordBody{} + +// AnalysisRecordBody struct for AnalysisRecordBody +type AnalysisRecordBody struct { + // Analysis ID + AnalysisId int64 `json:"analysis_id"` + // Scope of the analysis + AnalysisScope string `json:"analysis_scope"` + // Binary base address + BaseAddress int64 `json:"base_address"` + // Binary ID + BinaryId int64 `json:"binary_id"` + // Binary filename + BinaryName string `json:"binary_name"` + // Binary size in bytes + BinarySize int64 `json:"binary_size"` + // When the analysis was created + Creation time.Time `json:"creation"` + // Hash of the binary's provided function boundaries + FunctionBoundariesHash string `json:"function_boundaries_hash"` + // True when the caller owns the analysis + IsOwner bool `json:"is_owner"` + // Model ID + ModelId int64 `json:"model_id"` + // Model name + ModelName string `json:"model_name"` + // SHA-256 hash of the binary + Sha256Hash string `json:"sha_256_hash"` + // Analysis status + Status string `json:"status"` + // Tags associated with the binary + Tags []AnalysisTagBody `json:"tags"` + // Username of the analysis owner + Username string `json:"username"` + AdditionalProperties map[string]interface{} +} + +type _AnalysisRecordBody AnalysisRecordBody + +// NewAnalysisRecordBody instantiates a new AnalysisRecordBody object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnalysisRecordBody(analysisId int64, analysisScope string, baseAddress int64, binaryId int64, binaryName string, binarySize int64, creation time.Time, functionBoundariesHash string, isOwner bool, modelId int64, modelName string, sha256Hash string, status string, tags []AnalysisTagBody, username string) *AnalysisRecordBody { + this := AnalysisRecordBody{} + this.AnalysisId = analysisId + this.AnalysisScope = analysisScope + this.BaseAddress = baseAddress + this.BinaryId = binaryId + this.BinaryName = binaryName + this.BinarySize = binarySize + this.Creation = creation + this.FunctionBoundariesHash = functionBoundariesHash + this.IsOwner = isOwner + this.ModelId = modelId + this.ModelName = modelName + this.Sha256Hash = sha256Hash + this.Status = status + this.Tags = tags + this.Username = username + return &this +} + +// NewAnalysisRecordBodyWithDefaults instantiates a new AnalysisRecordBody object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnalysisRecordBodyWithDefaults() *AnalysisRecordBody { + this := AnalysisRecordBody{} + return &this +} + +// GetAnalysisId returns the AnalysisId field value +func (o *AnalysisRecordBody) GetAnalysisId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.AnalysisId +} + +// GetAnalysisIdOk returns a tuple with the AnalysisId field value +// and a boolean to check if the value has been set. +func (o *AnalysisRecordBody) GetAnalysisIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.AnalysisId, true +} + +// SetAnalysisId sets field value +func (o *AnalysisRecordBody) SetAnalysisId(v int64) { + o.AnalysisId = v +} + +// GetAnalysisScope returns the AnalysisScope field value +func (o *AnalysisRecordBody) GetAnalysisScope() string { + if o == nil { + var ret string + return ret + } + + return o.AnalysisScope +} + +// GetAnalysisScopeOk returns a tuple with the AnalysisScope field value +// and a boolean to check if the value has been set. +func (o *AnalysisRecordBody) GetAnalysisScopeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AnalysisScope, true +} + +// SetAnalysisScope sets field value +func (o *AnalysisRecordBody) SetAnalysisScope(v string) { + o.AnalysisScope = v +} + +// GetBaseAddress returns the BaseAddress field value +func (o *AnalysisRecordBody) GetBaseAddress() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.BaseAddress +} + +// GetBaseAddressOk returns a tuple with the BaseAddress field value +// and a boolean to check if the value has been set. +func (o *AnalysisRecordBody) GetBaseAddressOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.BaseAddress, true +} + +// SetBaseAddress sets field value +func (o *AnalysisRecordBody) SetBaseAddress(v int64) { + o.BaseAddress = v +} + +// GetBinaryId returns the BinaryId field value +func (o *AnalysisRecordBody) GetBinaryId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.BinaryId +} + +// GetBinaryIdOk returns a tuple with the BinaryId field value +// and a boolean to check if the value has been set. +func (o *AnalysisRecordBody) GetBinaryIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.BinaryId, true +} + +// SetBinaryId sets field value +func (o *AnalysisRecordBody) SetBinaryId(v int64) { + o.BinaryId = v +} + +// GetBinaryName returns the BinaryName field value +func (o *AnalysisRecordBody) GetBinaryName() string { + if o == nil { + var ret string + return ret + } + + return o.BinaryName +} + +// GetBinaryNameOk returns a tuple with the BinaryName field value +// and a boolean to check if the value has been set. +func (o *AnalysisRecordBody) GetBinaryNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BinaryName, true +} + +// SetBinaryName sets field value +func (o *AnalysisRecordBody) SetBinaryName(v string) { + o.BinaryName = v +} + +// GetBinarySize returns the BinarySize field value +func (o *AnalysisRecordBody) GetBinarySize() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.BinarySize +} + +// GetBinarySizeOk returns a tuple with the BinarySize field value +// and a boolean to check if the value has been set. +func (o *AnalysisRecordBody) GetBinarySizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.BinarySize, true +} + +// SetBinarySize sets field value +func (o *AnalysisRecordBody) SetBinarySize(v int64) { + o.BinarySize = v +} + +// GetCreation returns the Creation field value +func (o *AnalysisRecordBody) GetCreation() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Creation +} + +// GetCreationOk returns a tuple with the Creation field value +// and a boolean to check if the value has been set. +func (o *AnalysisRecordBody) GetCreationOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Creation, true +} + +// SetCreation sets field value +func (o *AnalysisRecordBody) SetCreation(v time.Time) { + o.Creation = v +} + +// GetFunctionBoundariesHash returns the FunctionBoundariesHash field value +func (o *AnalysisRecordBody) GetFunctionBoundariesHash() string { + if o == nil { + var ret string + return ret + } + + return o.FunctionBoundariesHash +} + +// GetFunctionBoundariesHashOk returns a tuple with the FunctionBoundariesHash field value +// and a boolean to check if the value has been set. +func (o *AnalysisRecordBody) GetFunctionBoundariesHashOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FunctionBoundariesHash, true +} + +// SetFunctionBoundariesHash sets field value +func (o *AnalysisRecordBody) SetFunctionBoundariesHash(v string) { + o.FunctionBoundariesHash = v +} + +// GetIsOwner returns the IsOwner field value +func (o *AnalysisRecordBody) GetIsOwner() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsOwner +} + +// GetIsOwnerOk returns a tuple with the IsOwner field value +// and a boolean to check if the value has been set. +func (o *AnalysisRecordBody) GetIsOwnerOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsOwner, true +} + +// SetIsOwner sets field value +func (o *AnalysisRecordBody) SetIsOwner(v bool) { + o.IsOwner = v +} + +// GetModelId returns the ModelId field value +func (o *AnalysisRecordBody) GetModelId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ModelId +} + +// GetModelIdOk returns a tuple with the ModelId field value +// and a boolean to check if the value has been set. +func (o *AnalysisRecordBody) GetModelIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ModelId, true +} + +// SetModelId sets field value +func (o *AnalysisRecordBody) SetModelId(v int64) { + o.ModelId = v +} + +// GetModelName returns the ModelName field value +func (o *AnalysisRecordBody) GetModelName() string { + if o == nil { + var ret string + return ret + } + + return o.ModelName +} + +// GetModelNameOk returns a tuple with the ModelName field value +// and a boolean to check if the value has been set. +func (o *AnalysisRecordBody) GetModelNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ModelName, true +} + +// SetModelName sets field value +func (o *AnalysisRecordBody) SetModelName(v string) { + o.ModelName = v +} + +// GetSha256Hash returns the Sha256Hash field value +func (o *AnalysisRecordBody) GetSha256Hash() string { + if o == nil { + var ret string + return ret + } + + return o.Sha256Hash +} + +// GetSha256HashOk returns a tuple with the Sha256Hash field value +// and a boolean to check if the value has been set. +func (o *AnalysisRecordBody) GetSha256HashOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Sha256Hash, true +} + +// SetSha256Hash sets field value +func (o *AnalysisRecordBody) SetSha256Hash(v string) { + o.Sha256Hash = v +} + +// GetStatus returns the Status field value +func (o *AnalysisRecordBody) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *AnalysisRecordBody) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *AnalysisRecordBody) SetStatus(v string) { + o.Status = v +} + +// GetTags returns the Tags field value +// If the value is explicit nil, the zero value for []AnalysisTagBody will be returned +func (o *AnalysisRecordBody) GetTags() []AnalysisTagBody { + if o == nil { + var ret []AnalysisTagBody + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnalysisRecordBody) GetTagsOk() ([]AnalysisTagBody, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *AnalysisRecordBody) SetTags(v []AnalysisTagBody) { + o.Tags = v +} + +// GetUsername returns the Username field value +func (o *AnalysisRecordBody) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *AnalysisRecordBody) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *AnalysisRecordBody) SetUsername(v string) { + o.Username = v +} + +func (o AnalysisRecordBody) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnalysisRecordBody) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["analysis_id"] = o.AnalysisId + toSerialize["analysis_scope"] = o.AnalysisScope + toSerialize["base_address"] = o.BaseAddress + toSerialize["binary_id"] = o.BinaryId + toSerialize["binary_name"] = o.BinaryName + toSerialize["binary_size"] = o.BinarySize + toSerialize["creation"] = o.Creation + toSerialize["function_boundaries_hash"] = o.FunctionBoundariesHash + toSerialize["is_owner"] = o.IsOwner + toSerialize["model_id"] = o.ModelId + toSerialize["model_name"] = o.ModelName + toSerialize["sha_256_hash"] = o.Sha256Hash + toSerialize["status"] = o.Status + if o.Tags != nil { + toSerialize["tags"] = o.Tags + } + toSerialize["username"] = o.Username + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnalysisRecordBody) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "analysis_id", + "analysis_scope", + "base_address", + "binary_id", + "binary_name", + "binary_size", + "creation", + "function_boundaries_hash", + "is_owner", + "model_id", + "model_name", + "sha_256_hash", + "status", + "tags", + "username", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAnalysisRecordBody := _AnalysisRecordBody{} + + err = json.Unmarshal(data, &varAnalysisRecordBody) + + if err != nil { + return err + } + + *o = AnalysisRecordBody(varAnalysisRecordBody) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "analysis_id") + delete(additionalProperties, "analysis_scope") + delete(additionalProperties, "base_address") + delete(additionalProperties, "binary_id") + delete(additionalProperties, "binary_name") + delete(additionalProperties, "binary_size") + delete(additionalProperties, "creation") + delete(additionalProperties, "function_boundaries_hash") + delete(additionalProperties, "is_owner") + delete(additionalProperties, "model_id") + delete(additionalProperties, "model_name") + delete(additionalProperties, "sha_256_hash") + delete(additionalProperties, "status") + delete(additionalProperties, "tags") + delete(additionalProperties, "username") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnalysisRecordBody struct { + value *AnalysisRecordBody + isSet bool +} + +func (v NullableAnalysisRecordBody) Get() *AnalysisRecordBody { + return v.value +} + +func (v *NullableAnalysisRecordBody) Set(val *AnalysisRecordBody) { + v.value = val + v.isSet = true +} + +func (v NullableAnalysisRecordBody) IsSet() bool { + return v.isSet +} + +func (v *NullableAnalysisRecordBody) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnalysisRecordBody(val *AnalysisRecordBody) *NullableAnalysisRecordBody { + return &NullableAnalysisRecordBody{value: val, isSet: true} +} + +func (v NullableAnalysisRecordBody) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnalysisRecordBody) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/v3/model_analysis_tag_body.go b/v3/model_analysis_tag_body.go new file mode 100644 index 0000000..14c0419 --- /dev/null +++ b/v3/model_analysis_tag_body.go @@ -0,0 +1,218 @@ +/* +RevEng.AI API + +RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sdk + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AnalysisTagBody type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnalysisTagBody{} + +// AnalysisTagBody struct for AnalysisTagBody +type AnalysisTagBody struct { + // Collection this tag maps to, or null + CollectionId NullableInt64 `json:"collection_id"` + // Tag name + Name string `json:"name"` + // Origin of the tag + Origin string `json:"origin"` +} + +type _AnalysisTagBody AnalysisTagBody + +// NewAnalysisTagBody instantiates a new AnalysisTagBody object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnalysisTagBody(collectionId NullableInt64, name string, origin string) *AnalysisTagBody { + this := AnalysisTagBody{} + this.CollectionId = collectionId + this.Name = name + this.Origin = origin + return &this +} + +// NewAnalysisTagBodyWithDefaults instantiates a new AnalysisTagBody object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnalysisTagBodyWithDefaults() *AnalysisTagBody { + this := AnalysisTagBody{} + return &this +} + +// GetCollectionId returns the CollectionId field value +// If the value is explicit nil, the zero value for int64 will be returned +func (o *AnalysisTagBody) GetCollectionId() int64 { + if o == nil || o.CollectionId.Get() == nil { + var ret int64 + return ret + } + + return *o.CollectionId.Get() +} + +// GetCollectionIdOk returns a tuple with the CollectionId field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnalysisTagBody) GetCollectionIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.CollectionId.Get(), o.CollectionId.IsSet() +} + +// SetCollectionId sets field value +func (o *AnalysisTagBody) SetCollectionId(v int64) { + o.CollectionId.Set(&v) +} + +// GetName returns the Name field value +func (o *AnalysisTagBody) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AnalysisTagBody) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AnalysisTagBody) SetName(v string) { + o.Name = v +} + +// GetOrigin returns the Origin field value +func (o *AnalysisTagBody) GetOrigin() string { + if o == nil { + var ret string + return ret + } + + return o.Origin +} + +// GetOriginOk returns a tuple with the Origin field value +// and a boolean to check if the value has been set. +func (o *AnalysisTagBody) GetOriginOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Origin, true +} + +// SetOrigin sets field value +func (o *AnalysisTagBody) SetOrigin(v string) { + o.Origin = v +} + +func (o AnalysisTagBody) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnalysisTagBody) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["collection_id"] = o.CollectionId.Get() + toSerialize["name"] = o.Name + toSerialize["origin"] = o.Origin + return toSerialize, nil +} + +func (o *AnalysisTagBody) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "collection_id", + "name", + "origin", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAnalysisTagBody := _AnalysisTagBody{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAnalysisTagBody) + + if err != nil { + return err + } + + *o = AnalysisTagBody(varAnalysisTagBody) + + return err +} + +type NullableAnalysisTagBody struct { + value *AnalysisTagBody + isSet bool +} + +func (v NullableAnalysisTagBody) Get() *AnalysisTagBody { + return v.value +} + +func (v *NullableAnalysisTagBody) Set(val *AnalysisTagBody) { + v.value = val + v.isSet = true +} + +func (v NullableAnalysisTagBody) IsSet() bool { + return v.isSet +} + +func (v *NullableAnalysisTagBody) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnalysisTagBody(val *AnalysisTagBody) *NullableAnalysisTagBody { + return &NullableAnalysisTagBody{value: val, isSet: true} +} + +func (v NullableAnalysisTagBody) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnalysisTagBody) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/v3/model_archive_content_entry.go b/v3/model_archive_content_entry.go new file mode 100644 index 0000000..b0dcc57 --- /dev/null +++ b/v3/model_archive_content_entry.go @@ -0,0 +1,228 @@ +/* +RevEng.AI API + +RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sdk + +import ( + "encoding/json" + "fmt" +) + +// checks if the ArchiveContentEntry type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ArchiveContentEntry{} + +// ArchiveContentEntry struct for ArchiveContentEntry +type ArchiveContentEntry struct { + // Whether this entry is password-protected + Encrypted bool `json:"encrypted"` + // Path relative to the archive root + Path string `json:"path"` + // Uncompressed size in bytes + Size int64 `json:"size"` + AdditionalProperties map[string]interface{} +} + +type _ArchiveContentEntry ArchiveContentEntry + +// NewArchiveContentEntry instantiates a new ArchiveContentEntry object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewArchiveContentEntry(encrypted bool, path string, size int64) *ArchiveContentEntry { + this := ArchiveContentEntry{} + this.Encrypted = encrypted + this.Path = path + this.Size = size + return &this +} + +// NewArchiveContentEntryWithDefaults instantiates a new ArchiveContentEntry object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewArchiveContentEntryWithDefaults() *ArchiveContentEntry { + this := ArchiveContentEntry{} + return &this +} + +// GetEncrypted returns the Encrypted field value +func (o *ArchiveContentEntry) GetEncrypted() bool { + if o == nil { + var ret bool + return ret + } + + return o.Encrypted +} + +// GetEncryptedOk returns a tuple with the Encrypted field value +// and a boolean to check if the value has been set. +func (o *ArchiveContentEntry) GetEncryptedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Encrypted, true +} + +// SetEncrypted sets field value +func (o *ArchiveContentEntry) SetEncrypted(v bool) { + o.Encrypted = v +} + +// GetPath returns the Path field value +func (o *ArchiveContentEntry) GetPath() string { + if o == nil { + var ret string + return ret + } + + return o.Path +} + +// GetPathOk returns a tuple with the Path field value +// and a boolean to check if the value has been set. +func (o *ArchiveContentEntry) GetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Path, true +} + +// SetPath sets field value +func (o *ArchiveContentEntry) SetPath(v string) { + o.Path = v +} + +// GetSize returns the Size field value +func (o *ArchiveContentEntry) GetSize() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value +// and a boolean to check if the value has been set. +func (o *ArchiveContentEntry) GetSizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Size, true +} + +// SetSize sets field value +func (o *ArchiveContentEntry) SetSize(v int64) { + o.Size = v +} + +func (o ArchiveContentEntry) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ArchiveContentEntry) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["encrypted"] = o.Encrypted + toSerialize["path"] = o.Path + toSerialize["size"] = o.Size + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ArchiveContentEntry) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "encrypted", + "path", + "size", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varArchiveContentEntry := _ArchiveContentEntry{} + + err = json.Unmarshal(data, &varArchiveContentEntry) + + if err != nil { + return err + } + + *o = ArchiveContentEntry(varArchiveContentEntry) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "encrypted") + delete(additionalProperties, "path") + delete(additionalProperties, "size") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableArchiveContentEntry struct { + value *ArchiveContentEntry + isSet bool +} + +func (v NullableArchiveContentEntry) Get() *ArchiveContentEntry { + return v.value +} + +func (v *NullableArchiveContentEntry) Set(val *ArchiveContentEntry) { + v.value = val + v.isSet = true +} + +func (v NullableArchiveContentEntry) IsSet() bool { + return v.isSet +} + +func (v *NullableArchiveContentEntry) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArchiveContentEntry(val *ArchiveContentEntry) *NullableArchiveContentEntry { + return &NullableArchiveContentEntry{value: val, isSet: true} +} + +func (v NullableArchiveContentEntry) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableArchiveContentEntry) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/v3/model_auto_unstrip_status_output_body.go b/v3/model_auto_unstrip_status_output_body.go new file mode 100644 index 0000000..d981f8c --- /dev/null +++ b/v3/model_auto_unstrip_status_output_body.go @@ -0,0 +1,158 @@ +/* +RevEng.AI API + +RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sdk + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AutoUnstripStatusOutputBody type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AutoUnstripStatusOutputBody{} + +// AutoUnstripStatusOutputBody struct for AutoUnstripStatusOutputBody +type AutoUnstripStatusOutputBody struct { + // Auto-unstrip task status + Status string `json:"status"` +} + +type _AutoUnstripStatusOutputBody AutoUnstripStatusOutputBody + +// NewAutoUnstripStatusOutputBody instantiates a new AutoUnstripStatusOutputBody object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAutoUnstripStatusOutputBody(status string) *AutoUnstripStatusOutputBody { + this := AutoUnstripStatusOutputBody{} + this.Status = status + return &this +} + +// NewAutoUnstripStatusOutputBodyWithDefaults instantiates a new AutoUnstripStatusOutputBody object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAutoUnstripStatusOutputBodyWithDefaults() *AutoUnstripStatusOutputBody { + this := AutoUnstripStatusOutputBody{} + return &this +} + +// GetStatus returns the Status field value +func (o *AutoUnstripStatusOutputBody) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *AutoUnstripStatusOutputBody) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *AutoUnstripStatusOutputBody) SetStatus(v string) { + o.Status = v +} + +func (o AutoUnstripStatusOutputBody) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AutoUnstripStatusOutputBody) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + return toSerialize, nil +} + +func (o *AutoUnstripStatusOutputBody) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAutoUnstripStatusOutputBody := _AutoUnstripStatusOutputBody{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAutoUnstripStatusOutputBody) + + if err != nil { + return err + } + + *o = AutoUnstripStatusOutputBody(varAutoUnstripStatusOutputBody) + + return err +} + +type NullableAutoUnstripStatusOutputBody struct { + value *AutoUnstripStatusOutputBody + isSet bool +} + +func (v NullableAutoUnstripStatusOutputBody) Get() *AutoUnstripStatusOutputBody { + return v.value +} + +func (v *NullableAutoUnstripStatusOutputBody) Set(val *AutoUnstripStatusOutputBody) { + v.value = val + v.isSet = true +} + +func (v NullableAutoUnstripStatusOutputBody) IsSet() bool { + return v.isSet +} + +func (v *NullableAutoUnstripStatusOutputBody) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAutoUnstripStatusOutputBody(val *AutoUnstripStatusOutputBody) *NullableAutoUnstripStatusOutputBody { + return &NullableAutoUnstripStatusOutputBody{value: val, isSet: true} +} + +func (v NullableAutoUnstripStatusOutputBody) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAutoUnstripStatusOutputBody) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/v3/model_batch_binary_match_result.go b/v3/model_batch_binary_match_result.go index 9205c50..2770e0b 100644 --- a/v3/model_batch_binary_match_result.go +++ b/v3/model_batch_binary_match_result.go @@ -23,6 +23,8 @@ type BatchBinaryMatchResult struct { BinaryId int64 `json:"binary_id"` // Error description when status=FAILED. ErrorMessage *string `json:"error_message,omitempty"` + // Opaque token for this binary's matching run. Present on dispatch and when statuses were fetched by token. + MatchId *string `json:"match_id,omitempty"` // Number of source functions that received at least one candidate match. Only meaningful when status=COMPLETED. MatchedFunctionCount int64 `json:"matched_function_count"` // Per-binary workflow status @@ -108,6 +110,38 @@ func (o *BatchBinaryMatchResult) SetErrorMessage(v string) { o.ErrorMessage = &v } +// GetMatchId returns the MatchId field value if set, zero value otherwise. +func (o *BatchBinaryMatchResult) GetMatchId() string { + if o == nil || IsNil(o.MatchId) { + var ret string + return ret + } + return *o.MatchId +} + +// GetMatchIdOk returns a tuple with the MatchId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BatchBinaryMatchResult) GetMatchIdOk() (*string, bool) { + if o == nil || IsNil(o.MatchId) { + return nil, false + } + return o.MatchId, true +} + +// HasMatchId returns a boolean if a field has been set. +func (o *BatchBinaryMatchResult) HasMatchId() bool { + if o != nil && !IsNil(o.MatchId) { + return true + } + + return false +} + +// SetMatchId gets a reference to the given string and assigns it to the MatchId field. +func (o *BatchBinaryMatchResult) SetMatchId(v string) { + o.MatchId = &v +} + // GetMatchedFunctionCount returns the MatchedFunctionCount field value func (o *BatchBinaryMatchResult) GetMatchedFunctionCount() int64 { if o == nil { @@ -170,6 +204,9 @@ func (o BatchBinaryMatchResult) ToMap() (map[string]interface{}, error) { if !IsNil(o.ErrorMessage) { toSerialize["error_message"] = o.ErrorMessage } + if !IsNil(o.MatchId) { + toSerialize["match_id"] = o.MatchId + } toSerialize["matched_function_count"] = o.MatchedFunctionCount toSerialize["status"] = o.Status @@ -219,6 +256,7 @@ func (o *BatchBinaryMatchResult) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "binary_id") delete(additionalProperties, "error_message") + delete(additionalProperties, "match_id") delete(additionalProperties, "matched_function_count") delete(additionalProperties, "status") o.AdditionalProperties = additionalProperties diff --git a/v3/model_canonical_name.go b/v3/model_canonical_name.go new file mode 100644 index 0000000..67c875d --- /dev/null +++ b/v3/model_canonical_name.go @@ -0,0 +1,187 @@ +/* +RevEng.AI API + +RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sdk + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CanonicalName type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CanonicalName{} + +// CanonicalName struct for CanonicalName +type CanonicalName struct { + // Canonical form of the name, or the input name itself when it has no canonical form. + CanonicalName string `json:"canonical_name"` + // The input function name. + Name string `json:"name"` +} + +type _CanonicalName CanonicalName + +// NewCanonicalName instantiates a new CanonicalName object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCanonicalName(canonicalName string, name string) *CanonicalName { + this := CanonicalName{} + this.CanonicalName = canonicalName + this.Name = name + return &this +} + +// NewCanonicalNameWithDefaults instantiates a new CanonicalName object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCanonicalNameWithDefaults() *CanonicalName { + this := CanonicalName{} + return &this +} + +// GetCanonicalName returns the CanonicalName field value +func (o *CanonicalName) GetCanonicalName() string { + if o == nil { + var ret string + return ret + } + + return o.CanonicalName +} + +// GetCanonicalNameOk returns a tuple with the CanonicalName field value +// and a boolean to check if the value has been set. +func (o *CanonicalName) GetCanonicalNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CanonicalName, true +} + +// SetCanonicalName sets field value +func (o *CanonicalName) SetCanonicalName(v string) { + o.CanonicalName = v +} + +// GetName returns the Name field value +func (o *CanonicalName) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CanonicalName) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CanonicalName) SetName(v string) { + o.Name = v +} + +func (o CanonicalName) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CanonicalName) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["canonical_name"] = o.CanonicalName + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *CanonicalName) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "canonical_name", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCanonicalName := _CanonicalName{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCanonicalName) + + if err != nil { + return err + } + + *o = CanonicalName(varCanonicalName) + + return err +} + +type NullableCanonicalName struct { + value *CanonicalName + isSet bool +} + +func (v NullableCanonicalName) Get() *CanonicalName { + return v.value +} + +func (v *NullableCanonicalName) Set(val *CanonicalName) { + v.value = val + v.isSet = true +} + +func (v NullableCanonicalName) IsSet() bool { + return v.isSet +} + +func (v *NullableCanonicalName) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCanonicalName(val *CanonicalName) *NullableCanonicalName { + return &NullableCanonicalName{value: val, isSet: true} +} + +func (v NullableCanonicalName) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCanonicalName) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/v3/model_canonicalize_names_input_body.go b/v3/model_canonicalize_names_input_body.go new file mode 100644 index 0000000..5e73a8b --- /dev/null +++ b/v3/model_canonicalize_names_input_body.go @@ -0,0 +1,162 @@ +/* +RevEng.AI API + +RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sdk + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CanonicalizeNamesInputBody type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CanonicalizeNamesInputBody{} + +// CanonicalizeNamesInputBody struct for CanonicalizeNamesInputBody +type CanonicalizeNamesInputBody struct { + // Function names to canonicalize. + Names []string `json:"names"` +} + +type _CanonicalizeNamesInputBody CanonicalizeNamesInputBody + +// NewCanonicalizeNamesInputBody instantiates a new CanonicalizeNamesInputBody object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCanonicalizeNamesInputBody(names []string) *CanonicalizeNamesInputBody { + this := CanonicalizeNamesInputBody{} + this.Names = names + return &this +} + +// NewCanonicalizeNamesInputBodyWithDefaults instantiates a new CanonicalizeNamesInputBody object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCanonicalizeNamesInputBodyWithDefaults() *CanonicalizeNamesInputBody { + this := CanonicalizeNamesInputBody{} + return &this +} + +// GetNames returns the Names field value +// If the value is explicit nil, the zero value for []string will be returned +func (o *CanonicalizeNamesInputBody) GetNames() []string { + if o == nil { + var ret []string + return ret + } + + return o.Names +} + +// GetNamesOk returns a tuple with the Names field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CanonicalizeNamesInputBody) GetNamesOk() ([]string, bool) { + if o == nil || IsNil(o.Names) { + return nil, false + } + return o.Names, true +} + +// SetNames sets field value +func (o *CanonicalizeNamesInputBody) SetNames(v []string) { + o.Names = v +} + +func (o CanonicalizeNamesInputBody) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CanonicalizeNamesInputBody) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Names != nil { + toSerialize["names"] = o.Names + } + return toSerialize, nil +} + +func (o *CanonicalizeNamesInputBody) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "names", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCanonicalizeNamesInputBody := _CanonicalizeNamesInputBody{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCanonicalizeNamesInputBody) + + if err != nil { + return err + } + + *o = CanonicalizeNamesInputBody(varCanonicalizeNamesInputBody) + + return err +} + +type NullableCanonicalizeNamesInputBody struct { + value *CanonicalizeNamesInputBody + isSet bool +} + +func (v NullableCanonicalizeNamesInputBody) Get() *CanonicalizeNamesInputBody { + return v.value +} + +func (v *NullableCanonicalizeNamesInputBody) Set(val *CanonicalizeNamesInputBody) { + v.value = val + v.isSet = true +} + +func (v NullableCanonicalizeNamesInputBody) IsSet() bool { + return v.isSet +} + +func (v *NullableCanonicalizeNamesInputBody) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCanonicalizeNamesInputBody(val *CanonicalizeNamesInputBody) *NullableCanonicalizeNamesInputBody { + return &NullableCanonicalizeNamesInputBody{value: val, isSet: true} +} + +func (v NullableCanonicalizeNamesInputBody) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCanonicalizeNamesInputBody) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/v3/model_canonicalize_names_output_body.go b/v3/model_canonicalize_names_output_body.go new file mode 100644 index 0000000..9d45e61 --- /dev/null +++ b/v3/model_canonicalize_names_output_body.go @@ -0,0 +1,162 @@ +/* +RevEng.AI API + +RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sdk + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CanonicalizeNamesOutputBody type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CanonicalizeNamesOutputBody{} + +// CanonicalizeNamesOutputBody struct for CanonicalizeNamesOutputBody +type CanonicalizeNamesOutputBody struct { + // Canonicalized names in the same order as the input. + Results []CanonicalName `json:"results"` +} + +type _CanonicalizeNamesOutputBody CanonicalizeNamesOutputBody + +// NewCanonicalizeNamesOutputBody instantiates a new CanonicalizeNamesOutputBody object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCanonicalizeNamesOutputBody(results []CanonicalName) *CanonicalizeNamesOutputBody { + this := CanonicalizeNamesOutputBody{} + this.Results = results + return &this +} + +// NewCanonicalizeNamesOutputBodyWithDefaults instantiates a new CanonicalizeNamesOutputBody object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCanonicalizeNamesOutputBodyWithDefaults() *CanonicalizeNamesOutputBody { + this := CanonicalizeNamesOutputBody{} + return &this +} + +// GetResults returns the Results field value +// If the value is explicit nil, the zero value for []CanonicalName will be returned +func (o *CanonicalizeNamesOutputBody) GetResults() []CanonicalName { + if o == nil { + var ret []CanonicalName + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CanonicalizeNamesOutputBody) GetResultsOk() ([]CanonicalName, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *CanonicalizeNamesOutputBody) SetResults(v []CanonicalName) { + o.Results = v +} + +func (o CanonicalizeNamesOutputBody) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CanonicalizeNamesOutputBody) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Results != nil { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +func (o *CanonicalizeNamesOutputBody) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCanonicalizeNamesOutputBody := _CanonicalizeNamesOutputBody{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCanonicalizeNamesOutputBody) + + if err != nil { + return err + } + + *o = CanonicalizeNamesOutputBody(varCanonicalizeNamesOutputBody) + + return err +} + +type NullableCanonicalizeNamesOutputBody struct { + value *CanonicalizeNamesOutputBody + isSet bool +} + +func (v NullableCanonicalizeNamesOutputBody) Get() *CanonicalizeNamesOutputBody { + return v.value +} + +func (v *NullableCanonicalizeNamesOutputBody) Set(val *CanonicalizeNamesOutputBody) { + v.value = val + v.isSet = true +} + +func (v NullableCanonicalizeNamesOutputBody) IsSet() bool { + return v.isSet +} + +func (v *NullableCanonicalizeNamesOutputBody) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCanonicalizeNamesOutputBody(val *CanonicalizeNamesOutputBody) *NullableCanonicalizeNamesOutputBody { + return &NullableCanonicalizeNamesOutputBody{value: val, isSet: true} +} + +func (v NullableCanonicalizeNamesOutputBody) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCanonicalizeNamesOutputBody) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/v3/model_event_tool_call_progress.go b/v3/model_event_tool_call_progress.go new file mode 100644 index 0000000..43e7c15 --- /dev/null +++ b/v3/model_event_tool_call_progress.go @@ -0,0 +1,273 @@ +/* +RevEng.AI API + +RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sdk + +import ( + "encoding/json" + "fmt" +) + +// checks if the EventTOOLCALLPROGRESS type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EventTOOLCALLPROGRESS{} + +// EventTOOLCALLPROGRESS struct for EventTOOLCALLPROGRESS +type EventTOOLCALLPROGRESS struct { + Data SseEventToolCallProgressData `json:"data"` + // The event name. + Event string `json:"event"` + // The event ID. + Id *int32 `json:"id,omitempty"` + // The retry time in milliseconds. + Retry *int32 `json:"retry,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _EventTOOLCALLPROGRESS EventTOOLCALLPROGRESS + +// NewEventTOOLCALLPROGRESS instantiates a new EventTOOLCALLPROGRESS object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEventTOOLCALLPROGRESS(data SseEventToolCallProgressData, event string) *EventTOOLCALLPROGRESS { + this := EventTOOLCALLPROGRESS{} + this.Data = data + this.Event = event + return &this +} + +// NewEventTOOLCALLPROGRESSWithDefaults instantiates a new EventTOOLCALLPROGRESS object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEventTOOLCALLPROGRESSWithDefaults() *EventTOOLCALLPROGRESS { + this := EventTOOLCALLPROGRESS{} + return &this +} + +// GetData returns the Data field value +func (o *EventTOOLCALLPROGRESS) GetData() SseEventToolCallProgressData { + if o == nil { + var ret SseEventToolCallProgressData + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *EventTOOLCALLPROGRESS) GetDataOk() (*SseEventToolCallProgressData, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *EventTOOLCALLPROGRESS) SetData(v SseEventToolCallProgressData) { + o.Data = v +} + +// GetEvent returns the Event field value +func (o *EventTOOLCALLPROGRESS) GetEvent() string { + if o == nil { + var ret string + return ret + } + + return o.Event +} + +// GetEventOk returns a tuple with the Event field value +// and a boolean to check if the value has been set. +func (o *EventTOOLCALLPROGRESS) GetEventOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Event, true +} + +// SetEvent sets field value +func (o *EventTOOLCALLPROGRESS) SetEvent(v string) { + o.Event = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EventTOOLCALLPROGRESS) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EventTOOLCALLPROGRESS) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EventTOOLCALLPROGRESS) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *EventTOOLCALLPROGRESS) SetId(v int32) { + o.Id = &v +} + +// GetRetry returns the Retry field value if set, zero value otherwise. +func (o *EventTOOLCALLPROGRESS) GetRetry() int32 { + if o == nil || IsNil(o.Retry) { + var ret int32 + return ret + } + return *o.Retry +} + +// GetRetryOk returns a tuple with the Retry field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EventTOOLCALLPROGRESS) GetRetryOk() (*int32, bool) { + if o == nil || IsNil(o.Retry) { + return nil, false + } + return o.Retry, true +} + +// HasRetry returns a boolean if a field has been set. +func (o *EventTOOLCALLPROGRESS) HasRetry() bool { + if o != nil && !IsNil(o.Retry) { + return true + } + + return false +} + +// SetRetry gets a reference to the given int32 and assigns it to the Retry field. +func (o *EventTOOLCALLPROGRESS) SetRetry(v int32) { + o.Retry = &v +} + +func (o EventTOOLCALLPROGRESS) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EventTOOLCALLPROGRESS) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + toSerialize["event"] = o.Event + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Retry) { + toSerialize["retry"] = o.Retry + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *EventTOOLCALLPROGRESS) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + "event", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEventTOOLCALLPROGRESS := _EventTOOLCALLPROGRESS{} + + err = json.Unmarshal(data, &varEventTOOLCALLPROGRESS) + + if err != nil { + return err + } + + *o = EventTOOLCALLPROGRESS(varEventTOOLCALLPROGRESS) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "data") + delete(additionalProperties, "event") + delete(additionalProperties, "id") + delete(additionalProperties, "retry") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableEventTOOLCALLPROGRESS struct { + value *EventTOOLCALLPROGRESS + isSet bool +} + +func (v NullableEventTOOLCALLPROGRESS) Get() *EventTOOLCALLPROGRESS { + return v.value +} + +func (v *NullableEventTOOLCALLPROGRESS) Set(val *EventTOOLCALLPROGRESS) { + v.value = val + v.isSet = true +} + +func (v NullableEventTOOLCALLPROGRESS) IsSet() bool { + return v.isSet +} + +func (v *NullableEventTOOLCALLPROGRESS) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEventTOOLCALLPROGRESS(val *EventTOOLCALLPROGRESS) *NullableEventTOOLCALLPROGRESS { + return &NullableEventTOOLCALLPROGRESS{value: val, isSet: true} +} + +func (v NullableEventTOOLCALLPROGRESS) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEventTOOLCALLPROGRESS) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/v3/model_imported_function_caller_entry.go b/v3/model_imported_function_caller_entry.go new file mode 100644 index 0000000..6632b59 --- /dev/null +++ b/v3/model_imported_function_caller_entry.go @@ -0,0 +1,242 @@ +/* +RevEng.AI API + +RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sdk + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ImportedFunctionCallerEntry type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ImportedFunctionCallerEntry{} + +// ImportedFunctionCallerEntry struct for ImportedFunctionCallerEntry +type ImportedFunctionCallerEntry struct { + FunctionId int64 `json:"function_id"` + FunctionName string `json:"function_name"` + FunctionVaddr int64 `json:"function_vaddr"` + // The PLT/stub address this caller targets. + StubVaddr int64 `json:"stub_vaddr"` +} + +type _ImportedFunctionCallerEntry ImportedFunctionCallerEntry + +// NewImportedFunctionCallerEntry instantiates a new ImportedFunctionCallerEntry object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewImportedFunctionCallerEntry(functionId int64, functionName string, functionVaddr int64, stubVaddr int64) *ImportedFunctionCallerEntry { + this := ImportedFunctionCallerEntry{} + this.FunctionId = functionId + this.FunctionName = functionName + this.FunctionVaddr = functionVaddr + this.StubVaddr = stubVaddr + return &this +} + +// NewImportedFunctionCallerEntryWithDefaults instantiates a new ImportedFunctionCallerEntry object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewImportedFunctionCallerEntryWithDefaults() *ImportedFunctionCallerEntry { + this := ImportedFunctionCallerEntry{} + return &this +} + +// GetFunctionId returns the FunctionId field value +func (o *ImportedFunctionCallerEntry) GetFunctionId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.FunctionId +} + +// GetFunctionIdOk returns a tuple with the FunctionId field value +// and a boolean to check if the value has been set. +func (o *ImportedFunctionCallerEntry) GetFunctionIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.FunctionId, true +} + +// SetFunctionId sets field value +func (o *ImportedFunctionCallerEntry) SetFunctionId(v int64) { + o.FunctionId = v +} + +// GetFunctionName returns the FunctionName field value +func (o *ImportedFunctionCallerEntry) GetFunctionName() string { + if o == nil { + var ret string + return ret + } + + return o.FunctionName +} + +// GetFunctionNameOk returns a tuple with the FunctionName field value +// and a boolean to check if the value has been set. +func (o *ImportedFunctionCallerEntry) GetFunctionNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FunctionName, true +} + +// SetFunctionName sets field value +func (o *ImportedFunctionCallerEntry) SetFunctionName(v string) { + o.FunctionName = v +} + +// GetFunctionVaddr returns the FunctionVaddr field value +func (o *ImportedFunctionCallerEntry) GetFunctionVaddr() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.FunctionVaddr +} + +// GetFunctionVaddrOk returns a tuple with the FunctionVaddr field value +// and a boolean to check if the value has been set. +func (o *ImportedFunctionCallerEntry) GetFunctionVaddrOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.FunctionVaddr, true +} + +// SetFunctionVaddr sets field value +func (o *ImportedFunctionCallerEntry) SetFunctionVaddr(v int64) { + o.FunctionVaddr = v +} + +// GetStubVaddr returns the StubVaddr field value +func (o *ImportedFunctionCallerEntry) GetStubVaddr() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.StubVaddr +} + +// GetStubVaddrOk returns a tuple with the StubVaddr field value +// and a boolean to check if the value has been set. +func (o *ImportedFunctionCallerEntry) GetStubVaddrOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.StubVaddr, true +} + +// SetStubVaddr sets field value +func (o *ImportedFunctionCallerEntry) SetStubVaddr(v int64) { + o.StubVaddr = v +} + +func (o ImportedFunctionCallerEntry) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ImportedFunctionCallerEntry) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["function_id"] = o.FunctionId + toSerialize["function_name"] = o.FunctionName + toSerialize["function_vaddr"] = o.FunctionVaddr + toSerialize["stub_vaddr"] = o.StubVaddr + return toSerialize, nil +} + +func (o *ImportedFunctionCallerEntry) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "function_id", + "function_name", + "function_vaddr", + "stub_vaddr", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varImportedFunctionCallerEntry := _ImportedFunctionCallerEntry{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varImportedFunctionCallerEntry) + + if err != nil { + return err + } + + *o = ImportedFunctionCallerEntry(varImportedFunctionCallerEntry) + + return err +} + +type NullableImportedFunctionCallerEntry struct { + value *ImportedFunctionCallerEntry + isSet bool +} + +func (v NullableImportedFunctionCallerEntry) Get() *ImportedFunctionCallerEntry { + return v.value +} + +func (v *NullableImportedFunctionCallerEntry) Set(val *ImportedFunctionCallerEntry) { + v.value = val + v.isSet = true +} + +func (v NullableImportedFunctionCallerEntry) IsSet() bool { + return v.isSet +} + +func (v *NullableImportedFunctionCallerEntry) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImportedFunctionCallerEntry(val *ImportedFunctionCallerEntry) *NullableImportedFunctionCallerEntry { + return &NullableImportedFunctionCallerEntry{value: val, isSet: true} +} + +func (v NullableImportedFunctionCallerEntry) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImportedFunctionCallerEntry) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/v3/model_imported_function_detail_output_body.go b/v3/model_imported_function_detail_output_body.go new file mode 100644 index 0000000..2237231 --- /dev/null +++ b/v3/model_imported_function_detail_output_body.go @@ -0,0 +1,420 @@ +/* +RevEng.AI API + +RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sdk + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ImportedFunctionDetailOutputBody type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ImportedFunctionDetailOutputBody{} + +// ImportedFunctionDetailOutputBody struct for ImportedFunctionDetailOutputBody +type ImportedFunctionDetailOutputBody struct { + // Internal functions that call this import, resolved via its PLT/stub addresses. + Callers []ImportedFunctionCallerEntry `json:"callers"` + ImportedFunctionId int64 `json:"imported_function_id"` + // False for imported data symbols. + IsFunction bool `json:"is_function"` + // Library the symbol is imported from. '' for unattributed imports. + LibraryName string `json:"library_name"` + // Versioned symbol tag, when the loader records one. + LibraryVersion *string `json:"library_version,omitempty"` + Name string `json:"name"` + // Pre-demangling / pre-aliasing name, when it differs from name. + OriginalName *string `json:"original_name,omitempty"` + // PLT/stub addresses that resolve external call edges (function_call_edges.callee_vaddr) to this import. Use these to link a caller's external callee to this import. + StubVaddrs []int64 `json:"stub_vaddrs"` + // Virtual address of the import, when known. + Vaddr *int64 `json:"vaddr,omitempty"` +} + +type _ImportedFunctionDetailOutputBody ImportedFunctionDetailOutputBody + +// NewImportedFunctionDetailOutputBody instantiates a new ImportedFunctionDetailOutputBody object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewImportedFunctionDetailOutputBody(callers []ImportedFunctionCallerEntry, importedFunctionId int64, isFunction bool, libraryName string, name string, stubVaddrs []int64) *ImportedFunctionDetailOutputBody { + this := ImportedFunctionDetailOutputBody{} + this.Callers = callers + this.ImportedFunctionId = importedFunctionId + this.IsFunction = isFunction + this.LibraryName = libraryName + this.Name = name + this.StubVaddrs = stubVaddrs + return &this +} + +// NewImportedFunctionDetailOutputBodyWithDefaults instantiates a new ImportedFunctionDetailOutputBody object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewImportedFunctionDetailOutputBodyWithDefaults() *ImportedFunctionDetailOutputBody { + this := ImportedFunctionDetailOutputBody{} + return &this +} + +// GetCallers returns the Callers field value +// If the value is explicit nil, the zero value for []ImportedFunctionCallerEntry will be returned +func (o *ImportedFunctionDetailOutputBody) GetCallers() []ImportedFunctionCallerEntry { + if o == nil { + var ret []ImportedFunctionCallerEntry + return ret + } + + return o.Callers +} + +// GetCallersOk returns a tuple with the Callers field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ImportedFunctionDetailOutputBody) GetCallersOk() ([]ImportedFunctionCallerEntry, bool) { + if o == nil || IsNil(o.Callers) { + return nil, false + } + return o.Callers, true +} + +// SetCallers sets field value +func (o *ImportedFunctionDetailOutputBody) SetCallers(v []ImportedFunctionCallerEntry) { + o.Callers = v +} + +// GetImportedFunctionId returns the ImportedFunctionId field value +func (o *ImportedFunctionDetailOutputBody) GetImportedFunctionId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ImportedFunctionId +} + +// GetImportedFunctionIdOk returns a tuple with the ImportedFunctionId field value +// and a boolean to check if the value has been set. +func (o *ImportedFunctionDetailOutputBody) GetImportedFunctionIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ImportedFunctionId, true +} + +// SetImportedFunctionId sets field value +func (o *ImportedFunctionDetailOutputBody) SetImportedFunctionId(v int64) { + o.ImportedFunctionId = v +} + +// GetIsFunction returns the IsFunction field value +func (o *ImportedFunctionDetailOutputBody) GetIsFunction() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsFunction +} + +// GetIsFunctionOk returns a tuple with the IsFunction field value +// and a boolean to check if the value has been set. +func (o *ImportedFunctionDetailOutputBody) GetIsFunctionOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsFunction, true +} + +// SetIsFunction sets field value +func (o *ImportedFunctionDetailOutputBody) SetIsFunction(v bool) { + o.IsFunction = v +} + +// GetLibraryName returns the LibraryName field value +func (o *ImportedFunctionDetailOutputBody) GetLibraryName() string { + if o == nil { + var ret string + return ret + } + + return o.LibraryName +} + +// GetLibraryNameOk returns a tuple with the LibraryName field value +// and a boolean to check if the value has been set. +func (o *ImportedFunctionDetailOutputBody) GetLibraryNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LibraryName, true +} + +// SetLibraryName sets field value +func (o *ImportedFunctionDetailOutputBody) SetLibraryName(v string) { + o.LibraryName = v +} + +// GetLibraryVersion returns the LibraryVersion field value if set, zero value otherwise. +func (o *ImportedFunctionDetailOutputBody) GetLibraryVersion() string { + if o == nil || IsNil(o.LibraryVersion) { + var ret string + return ret + } + return *o.LibraryVersion +} + +// GetLibraryVersionOk returns a tuple with the LibraryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportedFunctionDetailOutputBody) GetLibraryVersionOk() (*string, bool) { + if o == nil || IsNil(o.LibraryVersion) { + return nil, false + } + return o.LibraryVersion, true +} + +// HasLibraryVersion returns a boolean if a field has been set. +func (o *ImportedFunctionDetailOutputBody) HasLibraryVersion() bool { + if o != nil && !IsNil(o.LibraryVersion) { + return true + } + + return false +} + +// SetLibraryVersion gets a reference to the given string and assigns it to the LibraryVersion field. +func (o *ImportedFunctionDetailOutputBody) SetLibraryVersion(v string) { + o.LibraryVersion = &v +} + +// GetName returns the Name field value +func (o *ImportedFunctionDetailOutputBody) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ImportedFunctionDetailOutputBody) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ImportedFunctionDetailOutputBody) SetName(v string) { + o.Name = v +} + +// GetOriginalName returns the OriginalName field value if set, zero value otherwise. +func (o *ImportedFunctionDetailOutputBody) GetOriginalName() string { + if o == nil || IsNil(o.OriginalName) { + var ret string + return ret + } + return *o.OriginalName +} + +// GetOriginalNameOk returns a tuple with the OriginalName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportedFunctionDetailOutputBody) GetOriginalNameOk() (*string, bool) { + if o == nil || IsNil(o.OriginalName) { + return nil, false + } + return o.OriginalName, true +} + +// HasOriginalName returns a boolean if a field has been set. +func (o *ImportedFunctionDetailOutputBody) HasOriginalName() bool { + if o != nil && !IsNil(o.OriginalName) { + return true + } + + return false +} + +// SetOriginalName gets a reference to the given string and assigns it to the OriginalName field. +func (o *ImportedFunctionDetailOutputBody) SetOriginalName(v string) { + o.OriginalName = &v +} + +// GetStubVaddrs returns the StubVaddrs field value +// If the value is explicit nil, the zero value for []int64 will be returned +func (o *ImportedFunctionDetailOutputBody) GetStubVaddrs() []int64 { + if o == nil { + var ret []int64 + return ret + } + + return o.StubVaddrs +} + +// GetStubVaddrsOk returns a tuple with the StubVaddrs field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ImportedFunctionDetailOutputBody) GetStubVaddrsOk() ([]int64, bool) { + if o == nil || IsNil(o.StubVaddrs) { + return nil, false + } + return o.StubVaddrs, true +} + +// SetStubVaddrs sets field value +func (o *ImportedFunctionDetailOutputBody) SetStubVaddrs(v []int64) { + o.StubVaddrs = v +} + +// GetVaddr returns the Vaddr field value if set, zero value otherwise. +func (o *ImportedFunctionDetailOutputBody) GetVaddr() int64 { + if o == nil || IsNil(o.Vaddr) { + var ret int64 + return ret + } + return *o.Vaddr +} + +// GetVaddrOk returns a tuple with the Vaddr field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportedFunctionDetailOutputBody) GetVaddrOk() (*int64, bool) { + if o == nil || IsNil(o.Vaddr) { + return nil, false + } + return o.Vaddr, true +} + +// HasVaddr returns a boolean if a field has been set. +func (o *ImportedFunctionDetailOutputBody) HasVaddr() bool { + if o != nil && !IsNil(o.Vaddr) { + return true + } + + return false +} + +// SetVaddr gets a reference to the given int64 and assigns it to the Vaddr field. +func (o *ImportedFunctionDetailOutputBody) SetVaddr(v int64) { + o.Vaddr = &v +} + +func (o ImportedFunctionDetailOutputBody) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ImportedFunctionDetailOutputBody) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Callers != nil { + toSerialize["callers"] = o.Callers + } + toSerialize["imported_function_id"] = o.ImportedFunctionId + toSerialize["is_function"] = o.IsFunction + toSerialize["library_name"] = o.LibraryName + if !IsNil(o.LibraryVersion) { + toSerialize["library_version"] = o.LibraryVersion + } + toSerialize["name"] = o.Name + if !IsNil(o.OriginalName) { + toSerialize["original_name"] = o.OriginalName + } + if o.StubVaddrs != nil { + toSerialize["stub_vaddrs"] = o.StubVaddrs + } + if !IsNil(o.Vaddr) { + toSerialize["vaddr"] = o.Vaddr + } + return toSerialize, nil +} + +func (o *ImportedFunctionDetailOutputBody) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "callers", + "imported_function_id", + "is_function", + "library_name", + "name", + "stub_vaddrs", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varImportedFunctionDetailOutputBody := _ImportedFunctionDetailOutputBody{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varImportedFunctionDetailOutputBody) + + if err != nil { + return err + } + + *o = ImportedFunctionDetailOutputBody(varImportedFunctionDetailOutputBody) + + return err +} + +type NullableImportedFunctionDetailOutputBody struct { + value *ImportedFunctionDetailOutputBody + isSet bool +} + +func (v NullableImportedFunctionDetailOutputBody) Get() *ImportedFunctionDetailOutputBody { + return v.value +} + +func (v *NullableImportedFunctionDetailOutputBody) Set(val *ImportedFunctionDetailOutputBody) { + v.value = val + v.isSet = true +} + +func (v NullableImportedFunctionDetailOutputBody) IsSet() bool { + return v.isSet +} + +func (v *NullableImportedFunctionDetailOutputBody) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImportedFunctionDetailOutputBody(val *ImportedFunctionDetailOutputBody) *NullableImportedFunctionDetailOutputBody { + return &NullableImportedFunctionDetailOutputBody{value: val, isSet: true} +} + +func (v NullableImportedFunctionDetailOutputBody) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImportedFunctionDetailOutputBody) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/v3/model_imported_function_entry.go b/v3/model_imported_function_entry.go new file mode 100644 index 0000000..ecb8517 --- /dev/null +++ b/v3/model_imported_function_entry.go @@ -0,0 +1,404 @@ +/* +RevEng.AI API + +RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sdk + +import ( + "encoding/json" + "fmt" +) + +// checks if the ImportedFunctionEntry type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ImportedFunctionEntry{} + +// ImportedFunctionEntry struct for ImportedFunctionEntry +type ImportedFunctionEntry struct { + ImportedFunctionId int64 `json:"imported_function_id"` + // False for imported data symbols. + IsFunction bool `json:"is_function"` + // Library the symbol is imported from. '' for unattributed imports. + LibraryName string `json:"library_name"` + // Versioned symbol tag, when the loader records one. + LibraryVersion *string `json:"library_version,omitempty"` + Name string `json:"name"` + // Pre-demangling / pre-aliasing name, when it differs from name. + OriginalName *string `json:"original_name,omitempty"` + // PLT/stub addresses that resolve external call edges (function_call_edges.callee_vaddr) to this import. Use these to link a caller's external callee to this import. + StubVaddrs []int64 `json:"stub_vaddrs"` + // Virtual address of the import, when known. + Vaddr *int64 `json:"vaddr,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ImportedFunctionEntry ImportedFunctionEntry + +// NewImportedFunctionEntry instantiates a new ImportedFunctionEntry object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewImportedFunctionEntry(importedFunctionId int64, isFunction bool, libraryName string, name string, stubVaddrs []int64) *ImportedFunctionEntry { + this := ImportedFunctionEntry{} + this.ImportedFunctionId = importedFunctionId + this.IsFunction = isFunction + this.LibraryName = libraryName + this.Name = name + this.StubVaddrs = stubVaddrs + return &this +} + +// NewImportedFunctionEntryWithDefaults instantiates a new ImportedFunctionEntry object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewImportedFunctionEntryWithDefaults() *ImportedFunctionEntry { + this := ImportedFunctionEntry{} + return &this +} + +// GetImportedFunctionId returns the ImportedFunctionId field value +func (o *ImportedFunctionEntry) GetImportedFunctionId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ImportedFunctionId +} + +// GetImportedFunctionIdOk returns a tuple with the ImportedFunctionId field value +// and a boolean to check if the value has been set. +func (o *ImportedFunctionEntry) GetImportedFunctionIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ImportedFunctionId, true +} + +// SetImportedFunctionId sets field value +func (o *ImportedFunctionEntry) SetImportedFunctionId(v int64) { + o.ImportedFunctionId = v +} + +// GetIsFunction returns the IsFunction field value +func (o *ImportedFunctionEntry) GetIsFunction() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsFunction +} + +// GetIsFunctionOk returns a tuple with the IsFunction field value +// and a boolean to check if the value has been set. +func (o *ImportedFunctionEntry) GetIsFunctionOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsFunction, true +} + +// SetIsFunction sets field value +func (o *ImportedFunctionEntry) SetIsFunction(v bool) { + o.IsFunction = v +} + +// GetLibraryName returns the LibraryName field value +func (o *ImportedFunctionEntry) GetLibraryName() string { + if o == nil { + var ret string + return ret + } + + return o.LibraryName +} + +// GetLibraryNameOk returns a tuple with the LibraryName field value +// and a boolean to check if the value has been set. +func (o *ImportedFunctionEntry) GetLibraryNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LibraryName, true +} + +// SetLibraryName sets field value +func (o *ImportedFunctionEntry) SetLibraryName(v string) { + o.LibraryName = v +} + +// GetLibraryVersion returns the LibraryVersion field value if set, zero value otherwise. +func (o *ImportedFunctionEntry) GetLibraryVersion() string { + if o == nil || IsNil(o.LibraryVersion) { + var ret string + return ret + } + return *o.LibraryVersion +} + +// GetLibraryVersionOk returns a tuple with the LibraryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportedFunctionEntry) GetLibraryVersionOk() (*string, bool) { + if o == nil || IsNil(o.LibraryVersion) { + return nil, false + } + return o.LibraryVersion, true +} + +// HasLibraryVersion returns a boolean if a field has been set. +func (o *ImportedFunctionEntry) HasLibraryVersion() bool { + if o != nil && !IsNil(o.LibraryVersion) { + return true + } + + return false +} + +// SetLibraryVersion gets a reference to the given string and assigns it to the LibraryVersion field. +func (o *ImportedFunctionEntry) SetLibraryVersion(v string) { + o.LibraryVersion = &v +} + +// GetName returns the Name field value +func (o *ImportedFunctionEntry) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ImportedFunctionEntry) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ImportedFunctionEntry) SetName(v string) { + o.Name = v +} + +// GetOriginalName returns the OriginalName field value if set, zero value otherwise. +func (o *ImportedFunctionEntry) GetOriginalName() string { + if o == nil || IsNil(o.OriginalName) { + var ret string + return ret + } + return *o.OriginalName +} + +// GetOriginalNameOk returns a tuple with the OriginalName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportedFunctionEntry) GetOriginalNameOk() (*string, bool) { + if o == nil || IsNil(o.OriginalName) { + return nil, false + } + return o.OriginalName, true +} + +// HasOriginalName returns a boolean if a field has been set. +func (o *ImportedFunctionEntry) HasOriginalName() bool { + if o != nil && !IsNil(o.OriginalName) { + return true + } + + return false +} + +// SetOriginalName gets a reference to the given string and assigns it to the OriginalName field. +func (o *ImportedFunctionEntry) SetOriginalName(v string) { + o.OriginalName = &v +} + +// GetStubVaddrs returns the StubVaddrs field value +// If the value is explicit nil, the zero value for []int64 will be returned +func (o *ImportedFunctionEntry) GetStubVaddrs() []int64 { + if o == nil { + var ret []int64 + return ret + } + + return o.StubVaddrs +} + +// GetStubVaddrsOk returns a tuple with the StubVaddrs field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ImportedFunctionEntry) GetStubVaddrsOk() ([]int64, bool) { + if o == nil || IsNil(o.StubVaddrs) { + return nil, false + } + return o.StubVaddrs, true +} + +// SetStubVaddrs sets field value +func (o *ImportedFunctionEntry) SetStubVaddrs(v []int64) { + o.StubVaddrs = v +} + +// GetVaddr returns the Vaddr field value if set, zero value otherwise. +func (o *ImportedFunctionEntry) GetVaddr() int64 { + if o == nil || IsNil(o.Vaddr) { + var ret int64 + return ret + } + return *o.Vaddr +} + +// GetVaddrOk returns a tuple with the Vaddr field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportedFunctionEntry) GetVaddrOk() (*int64, bool) { + if o == nil || IsNil(o.Vaddr) { + return nil, false + } + return o.Vaddr, true +} + +// HasVaddr returns a boolean if a field has been set. +func (o *ImportedFunctionEntry) HasVaddr() bool { + if o != nil && !IsNil(o.Vaddr) { + return true + } + + return false +} + +// SetVaddr gets a reference to the given int64 and assigns it to the Vaddr field. +func (o *ImportedFunctionEntry) SetVaddr(v int64) { + o.Vaddr = &v +} + +func (o ImportedFunctionEntry) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ImportedFunctionEntry) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["imported_function_id"] = o.ImportedFunctionId + toSerialize["is_function"] = o.IsFunction + toSerialize["library_name"] = o.LibraryName + if !IsNil(o.LibraryVersion) { + toSerialize["library_version"] = o.LibraryVersion + } + toSerialize["name"] = o.Name + if !IsNil(o.OriginalName) { + toSerialize["original_name"] = o.OriginalName + } + if o.StubVaddrs != nil { + toSerialize["stub_vaddrs"] = o.StubVaddrs + } + if !IsNil(o.Vaddr) { + toSerialize["vaddr"] = o.Vaddr + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ImportedFunctionEntry) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "imported_function_id", + "is_function", + "library_name", + "name", + "stub_vaddrs", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varImportedFunctionEntry := _ImportedFunctionEntry{} + + err = json.Unmarshal(data, &varImportedFunctionEntry) + + if err != nil { + return err + } + + *o = ImportedFunctionEntry(varImportedFunctionEntry) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "imported_function_id") + delete(additionalProperties, "is_function") + delete(additionalProperties, "library_name") + delete(additionalProperties, "library_version") + delete(additionalProperties, "name") + delete(additionalProperties, "original_name") + delete(additionalProperties, "stub_vaddrs") + delete(additionalProperties, "vaddr") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableImportedFunctionEntry struct { + value *ImportedFunctionEntry + isSet bool +} + +func (v NullableImportedFunctionEntry) Get() *ImportedFunctionEntry { + return v.value +} + +func (v *NullableImportedFunctionEntry) Set(val *ImportedFunctionEntry) { + v.value = val + v.isSet = true +} + +func (v NullableImportedFunctionEntry) IsSet() bool { + return v.isSet +} + +func (v *NullableImportedFunctionEntry) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImportedFunctionEntry(val *ImportedFunctionEntry) *NullableImportedFunctionEntry { + return &NullableImportedFunctionEntry{value: val, isSet: true} +} + +func (v NullableImportedFunctionEntry) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImportedFunctionEntry) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/v3/model_indirect_call_site.go b/v3/model_indirect_call_site.go new file mode 100644 index 0000000..4a2b9ea --- /dev/null +++ b/v3/model_indirect_call_site.go @@ -0,0 +1,287 @@ +/* +RevEng.AI API + +RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sdk + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the IndirectCallSite type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IndirectCallSite{} + +// IndirectCallSite struct for IndirectCallSite +type IndirectCallSite struct { + CalleeFunctionId *int64 `json:"callee_function_id,omitempty"` + // Vaddr of the indirect call instruction. + InstVaddr int64 `json:"inst_vaddr"` + IsExternal bool `json:"is_external"` + TargetName *string `json:"target_name,omitempty"` + // Resolved call target vaddr. + TargetVaddr int64 `json:"target_vaddr"` +} + +type _IndirectCallSite IndirectCallSite + +// NewIndirectCallSite instantiates a new IndirectCallSite object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIndirectCallSite(instVaddr int64, isExternal bool, targetVaddr int64) *IndirectCallSite { + this := IndirectCallSite{} + this.InstVaddr = instVaddr + this.IsExternal = isExternal + this.TargetVaddr = targetVaddr + return &this +} + +// NewIndirectCallSiteWithDefaults instantiates a new IndirectCallSite object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIndirectCallSiteWithDefaults() *IndirectCallSite { + this := IndirectCallSite{} + return &this +} + +// GetCalleeFunctionId returns the CalleeFunctionId field value if set, zero value otherwise. +func (o *IndirectCallSite) GetCalleeFunctionId() int64 { + if o == nil || IsNil(o.CalleeFunctionId) { + var ret int64 + return ret + } + return *o.CalleeFunctionId +} + +// GetCalleeFunctionIdOk returns a tuple with the CalleeFunctionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndirectCallSite) GetCalleeFunctionIdOk() (*int64, bool) { + if o == nil || IsNil(o.CalleeFunctionId) { + return nil, false + } + return o.CalleeFunctionId, true +} + +// HasCalleeFunctionId returns a boolean if a field has been set. +func (o *IndirectCallSite) HasCalleeFunctionId() bool { + if o != nil && !IsNil(o.CalleeFunctionId) { + return true + } + + return false +} + +// SetCalleeFunctionId gets a reference to the given int64 and assigns it to the CalleeFunctionId field. +func (o *IndirectCallSite) SetCalleeFunctionId(v int64) { + o.CalleeFunctionId = &v +} + +// GetInstVaddr returns the InstVaddr field value +func (o *IndirectCallSite) GetInstVaddr() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.InstVaddr +} + +// GetInstVaddrOk returns a tuple with the InstVaddr field value +// and a boolean to check if the value has been set. +func (o *IndirectCallSite) GetInstVaddrOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.InstVaddr, true +} + +// SetInstVaddr sets field value +func (o *IndirectCallSite) SetInstVaddr(v int64) { + o.InstVaddr = v +} + +// GetIsExternal returns the IsExternal field value +func (o *IndirectCallSite) GetIsExternal() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsExternal +} + +// GetIsExternalOk returns a tuple with the IsExternal field value +// and a boolean to check if the value has been set. +func (o *IndirectCallSite) GetIsExternalOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsExternal, true +} + +// SetIsExternal sets field value +func (o *IndirectCallSite) SetIsExternal(v bool) { + o.IsExternal = v +} + +// GetTargetName returns the TargetName field value if set, zero value otherwise. +func (o *IndirectCallSite) GetTargetName() string { + if o == nil || IsNil(o.TargetName) { + var ret string + return ret + } + return *o.TargetName +} + +// GetTargetNameOk returns a tuple with the TargetName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndirectCallSite) GetTargetNameOk() (*string, bool) { + if o == nil || IsNil(o.TargetName) { + return nil, false + } + return o.TargetName, true +} + +// HasTargetName returns a boolean if a field has been set. +func (o *IndirectCallSite) HasTargetName() bool { + if o != nil && !IsNil(o.TargetName) { + return true + } + + return false +} + +// SetTargetName gets a reference to the given string and assigns it to the TargetName field. +func (o *IndirectCallSite) SetTargetName(v string) { + o.TargetName = &v +} + +// GetTargetVaddr returns the TargetVaddr field value +func (o *IndirectCallSite) GetTargetVaddr() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.TargetVaddr +} + +// GetTargetVaddrOk returns a tuple with the TargetVaddr field value +// and a boolean to check if the value has been set. +func (o *IndirectCallSite) GetTargetVaddrOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.TargetVaddr, true +} + +// SetTargetVaddr sets field value +func (o *IndirectCallSite) SetTargetVaddr(v int64) { + o.TargetVaddr = v +} + +func (o IndirectCallSite) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IndirectCallSite) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CalleeFunctionId) { + toSerialize["callee_function_id"] = o.CalleeFunctionId + } + toSerialize["inst_vaddr"] = o.InstVaddr + toSerialize["is_external"] = o.IsExternal + if !IsNil(o.TargetName) { + toSerialize["target_name"] = o.TargetName + } + toSerialize["target_vaddr"] = o.TargetVaddr + return toSerialize, nil +} + +func (o *IndirectCallSite) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "inst_vaddr", + "is_external", + "target_vaddr", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIndirectCallSite := _IndirectCallSite{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIndirectCallSite) + + if err != nil { + return err + } + + *o = IndirectCallSite(varIndirectCallSite) + + return err +} + +type NullableIndirectCallSite struct { + value *IndirectCallSite + isSet bool +} + +func (v NullableIndirectCallSite) Get() *IndirectCallSite { + return v.value +} + +func (v *NullableIndirectCallSite) Set(val *IndirectCallSite) { + v.value = val + v.isSet = true +} + +func (v NullableIndirectCallSite) IsSet() bool { + return v.isSet +} + +func (v *NullableIndirectCallSite) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIndirectCallSite(val *IndirectCallSite) *NullableIndirectCallSite { + return &NullableIndirectCallSite{value: val, isSet: true} +} + +func (v NullableIndirectCallSite) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIndirectCallSite) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/v3/model_indirect_call_sites_output_body.go b/v3/model_indirect_call_sites_output_body.go new file mode 100644 index 0000000..555d342 --- /dev/null +++ b/v3/model_indirect_call_sites_output_body.go @@ -0,0 +1,189 @@ +/* +RevEng.AI API + +RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sdk + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the IndirectCallSitesOutputBody type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IndirectCallSitesOutputBody{} + +// IndirectCallSitesOutputBody struct for IndirectCallSitesOutputBody +type IndirectCallSitesOutputBody struct { + FunctionId int64 `json:"function_id"` + Sites []IndirectCallSite `json:"sites"` +} + +type _IndirectCallSitesOutputBody IndirectCallSitesOutputBody + +// NewIndirectCallSitesOutputBody instantiates a new IndirectCallSitesOutputBody object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIndirectCallSitesOutputBody(functionId int64, sites []IndirectCallSite) *IndirectCallSitesOutputBody { + this := IndirectCallSitesOutputBody{} + this.FunctionId = functionId + this.Sites = sites + return &this +} + +// NewIndirectCallSitesOutputBodyWithDefaults instantiates a new IndirectCallSitesOutputBody object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIndirectCallSitesOutputBodyWithDefaults() *IndirectCallSitesOutputBody { + this := IndirectCallSitesOutputBody{} + return &this +} + +// GetFunctionId returns the FunctionId field value +func (o *IndirectCallSitesOutputBody) GetFunctionId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.FunctionId +} + +// GetFunctionIdOk returns a tuple with the FunctionId field value +// and a boolean to check if the value has been set. +func (o *IndirectCallSitesOutputBody) GetFunctionIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.FunctionId, true +} + +// SetFunctionId sets field value +func (o *IndirectCallSitesOutputBody) SetFunctionId(v int64) { + o.FunctionId = v +} + +// GetSites returns the Sites field value +// If the value is explicit nil, the zero value for []IndirectCallSite will be returned +func (o *IndirectCallSitesOutputBody) GetSites() []IndirectCallSite { + if o == nil { + var ret []IndirectCallSite + return ret + } + + return o.Sites +} + +// GetSitesOk returns a tuple with the Sites field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *IndirectCallSitesOutputBody) GetSitesOk() ([]IndirectCallSite, bool) { + if o == nil || IsNil(o.Sites) { + return nil, false + } + return o.Sites, true +} + +// SetSites sets field value +func (o *IndirectCallSitesOutputBody) SetSites(v []IndirectCallSite) { + o.Sites = v +} + +func (o IndirectCallSitesOutputBody) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IndirectCallSitesOutputBody) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["function_id"] = o.FunctionId + if o.Sites != nil { + toSerialize["sites"] = o.Sites + } + return toSerialize, nil +} + +func (o *IndirectCallSitesOutputBody) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "function_id", + "sites", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIndirectCallSitesOutputBody := _IndirectCallSitesOutputBody{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIndirectCallSitesOutputBody) + + if err != nil { + return err + } + + *o = IndirectCallSitesOutputBody(varIndirectCallSitesOutputBody) + + return err +} + +type NullableIndirectCallSitesOutputBody struct { + value *IndirectCallSitesOutputBody + isSet bool +} + +func (v NullableIndirectCallSitesOutputBody) Get() *IndirectCallSitesOutputBody { + return v.value +} + +func (v *NullableIndirectCallSitesOutputBody) Set(val *IndirectCallSitesOutputBody) { + v.value = val + v.isSet = true +} + +func (v NullableIndirectCallSitesOutputBody) IsSet() bool { + return v.isSet +} + +func (v *NullableIndirectCallSitesOutputBody) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIndirectCallSitesOutputBody(val *IndirectCallSitesOutputBody) *NullableIndirectCallSitesOutputBody { + return &NullableIndirectCallSitesOutputBody{value: val, isSet: true} +} + +func (v NullableIndirectCallSitesOutputBody) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIndirectCallSitesOutputBody) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/v3/model_list_analyses_output_body.go b/v3/model_list_analyses_output_body.go new file mode 100644 index 0000000..040f784 --- /dev/null +++ b/v3/model_list_analyses_output_body.go @@ -0,0 +1,228 @@ +/* +RevEng.AI API + +RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sdk + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ListAnalysesOutputBody type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListAnalysesOutputBody{} + +// ListAnalysesOutputBody struct for ListAnalysesOutputBody +type ListAnalysesOutputBody struct { + // Opaque cursor to fetch the next page; empty on the last page + NextPageToken *string `json:"next_page_token,omitempty"` + // Number of results in this page + PageSize int64 `json:"page_size"` + // The page of matching analyses + Results []AnalysisRecordBody `json:"results"` +} + +type _ListAnalysesOutputBody ListAnalysesOutputBody + +// NewListAnalysesOutputBody instantiates a new ListAnalysesOutputBody object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListAnalysesOutputBody(pageSize int64, results []AnalysisRecordBody) *ListAnalysesOutputBody { + this := ListAnalysesOutputBody{} + this.PageSize = pageSize + this.Results = results + return &this +} + +// NewListAnalysesOutputBodyWithDefaults instantiates a new ListAnalysesOutputBody object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListAnalysesOutputBodyWithDefaults() *ListAnalysesOutputBody { + this := ListAnalysesOutputBody{} + return &this +} + +// GetNextPageToken returns the NextPageToken field value if set, zero value otherwise. +func (o *ListAnalysesOutputBody) GetNextPageToken() string { + if o == nil || IsNil(o.NextPageToken) { + var ret string + return ret + } + return *o.NextPageToken +} + +// GetNextPageTokenOk returns a tuple with the NextPageToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListAnalysesOutputBody) GetNextPageTokenOk() (*string, bool) { + if o == nil || IsNil(o.NextPageToken) { + return nil, false + } + return o.NextPageToken, true +} + +// HasNextPageToken returns a boolean if a field has been set. +func (o *ListAnalysesOutputBody) HasNextPageToken() bool { + if o != nil && !IsNil(o.NextPageToken) { + return true + } + + return false +} + +// SetNextPageToken gets a reference to the given string and assigns it to the NextPageToken field. +func (o *ListAnalysesOutputBody) SetNextPageToken(v string) { + o.NextPageToken = &v +} + +// GetPageSize returns the PageSize field value +func (o *ListAnalysesOutputBody) GetPageSize() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value +// and a boolean to check if the value has been set. +func (o *ListAnalysesOutputBody) GetPageSizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.PageSize, true +} + +// SetPageSize sets field value +func (o *ListAnalysesOutputBody) SetPageSize(v int64) { + o.PageSize = v +} + +// GetResults returns the Results field value +// If the value is explicit nil, the zero value for []AnalysisRecordBody will be returned +func (o *ListAnalysesOutputBody) GetResults() []AnalysisRecordBody { + if o == nil { + var ret []AnalysisRecordBody + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ListAnalysesOutputBody) GetResultsOk() ([]AnalysisRecordBody, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *ListAnalysesOutputBody) SetResults(v []AnalysisRecordBody) { + o.Results = v +} + +func (o ListAnalysesOutputBody) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListAnalysesOutputBody) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.NextPageToken) { + toSerialize["next_page_token"] = o.NextPageToken + } + toSerialize["page_size"] = o.PageSize + if o.Results != nil { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +func (o *ListAnalysesOutputBody) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "page_size", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varListAnalysesOutputBody := _ListAnalysesOutputBody{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varListAnalysesOutputBody) + + if err != nil { + return err + } + + *o = ListAnalysesOutputBody(varListAnalysesOutputBody) + + return err +} + +type NullableListAnalysesOutputBody struct { + value *ListAnalysesOutputBody + isSet bool +} + +func (v NullableListAnalysesOutputBody) Get() *ListAnalysesOutputBody { + return v.value +} + +func (v *NullableListAnalysesOutputBody) Set(val *ListAnalysesOutputBody) { + v.value = val + v.isSet = true +} + +func (v NullableListAnalysesOutputBody) IsSet() bool { + return v.isSet +} + +func (v *NullableListAnalysesOutputBody) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListAnalysesOutputBody(val *ListAnalysesOutputBody) *NullableListAnalysesOutputBody { + return &NullableListAnalysesOutputBody{value: val, isSet: true} +} + +func (v NullableListAnalysesOutputBody) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListAnalysesOutputBody) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/v3/model_list_archive_contents_output_body.go b/v3/model_list_archive_contents_output_body.go new file mode 100644 index 0000000..4e3b94b --- /dev/null +++ b/v3/model_list_archive_contents_output_body.go @@ -0,0 +1,292 @@ +/* +RevEng.AI API + +RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sdk + +import ( + "encoding/json" + "fmt" +) + +// checks if the ListArchiveContentsOutputBody type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListArchiveContentsOutputBody{} + +// ListArchiveContentsOutputBody struct for ListArchiveContentsOutputBody +type ListArchiveContentsOutputBody struct { + // Files inside the archive, with paths relative to the archive root + Entries []ArchiveContentEntry `json:"entries"` + // Whether a further page of entries follows this one. + HasNext bool `json:"has_next"` + // Page number of this response (1-indexed). + Page int64 `json:"page"` + // Number of entries per page. + PageSize int64 `json:"page_size"` + // Total number of file entries in the archive, ignoring pagination. + TotalCount int64 `json:"total_count"` + AdditionalProperties map[string]interface{} +} + +type _ListArchiveContentsOutputBody ListArchiveContentsOutputBody + +// NewListArchiveContentsOutputBody instantiates a new ListArchiveContentsOutputBody object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListArchiveContentsOutputBody(entries []ArchiveContentEntry, hasNext bool, page int64, pageSize int64, totalCount int64) *ListArchiveContentsOutputBody { + this := ListArchiveContentsOutputBody{} + this.Entries = entries + this.HasNext = hasNext + this.Page = page + this.PageSize = pageSize + this.TotalCount = totalCount + return &this +} + +// NewListArchiveContentsOutputBodyWithDefaults instantiates a new ListArchiveContentsOutputBody object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListArchiveContentsOutputBodyWithDefaults() *ListArchiveContentsOutputBody { + this := ListArchiveContentsOutputBody{} + return &this +} + +// GetEntries returns the Entries field value +// If the value is explicit nil, the zero value for []ArchiveContentEntry will be returned +func (o *ListArchiveContentsOutputBody) GetEntries() []ArchiveContentEntry { + if o == nil { + var ret []ArchiveContentEntry + return ret + } + + return o.Entries +} + +// GetEntriesOk returns a tuple with the Entries field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ListArchiveContentsOutputBody) GetEntriesOk() ([]ArchiveContentEntry, bool) { + if o == nil || IsNil(o.Entries) { + return nil, false + } + return o.Entries, true +} + +// SetEntries sets field value +func (o *ListArchiveContentsOutputBody) SetEntries(v []ArchiveContentEntry) { + o.Entries = v +} + +// GetHasNext returns the HasNext field value +func (o *ListArchiveContentsOutputBody) GetHasNext() bool { + if o == nil { + var ret bool + return ret + } + + return o.HasNext +} + +// GetHasNextOk returns a tuple with the HasNext field value +// and a boolean to check if the value has been set. +func (o *ListArchiveContentsOutputBody) GetHasNextOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.HasNext, true +} + +// SetHasNext sets field value +func (o *ListArchiveContentsOutputBody) SetHasNext(v bool) { + o.HasNext = v +} + +// GetPage returns the Page field value +func (o *ListArchiveContentsOutputBody) GetPage() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Page +} + +// GetPageOk returns a tuple with the Page field value +// and a boolean to check if the value has been set. +func (o *ListArchiveContentsOutputBody) GetPageOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Page, true +} + +// SetPage sets field value +func (o *ListArchiveContentsOutputBody) SetPage(v int64) { + o.Page = v +} + +// GetPageSize returns the PageSize field value +func (o *ListArchiveContentsOutputBody) GetPageSize() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value +// and a boolean to check if the value has been set. +func (o *ListArchiveContentsOutputBody) GetPageSizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.PageSize, true +} + +// SetPageSize sets field value +func (o *ListArchiveContentsOutputBody) SetPageSize(v int64) { + o.PageSize = v +} + +// GetTotalCount returns the TotalCount field value +func (o *ListArchiveContentsOutputBody) GetTotalCount() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.TotalCount +} + +// GetTotalCountOk returns a tuple with the TotalCount field value +// and a boolean to check if the value has been set. +func (o *ListArchiveContentsOutputBody) GetTotalCountOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.TotalCount, true +} + +// SetTotalCount sets field value +func (o *ListArchiveContentsOutputBody) SetTotalCount(v int64) { + o.TotalCount = v +} + +func (o ListArchiveContentsOutputBody) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListArchiveContentsOutputBody) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Entries != nil { + toSerialize["entries"] = o.Entries + } + toSerialize["has_next"] = o.HasNext + toSerialize["page"] = o.Page + toSerialize["page_size"] = o.PageSize + toSerialize["total_count"] = o.TotalCount + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListArchiveContentsOutputBody) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "entries", + "has_next", + "page", + "page_size", + "total_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varListArchiveContentsOutputBody := _ListArchiveContentsOutputBody{} + + err = json.Unmarshal(data, &varListArchiveContentsOutputBody) + + if err != nil { + return err + } + + *o = ListArchiveContentsOutputBody(varListArchiveContentsOutputBody) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "entries") + delete(additionalProperties, "has_next") + delete(additionalProperties, "page") + delete(additionalProperties, "page_size") + delete(additionalProperties, "total_count") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListArchiveContentsOutputBody struct { + value *ListArchiveContentsOutputBody + isSet bool +} + +func (v NullableListArchiveContentsOutputBody) Get() *ListArchiveContentsOutputBody { + return v.value +} + +func (v *NullableListArchiveContentsOutputBody) Set(val *ListArchiveContentsOutputBody) { + v.value = val + v.isSet = true +} + +func (v NullableListArchiveContentsOutputBody) IsSet() bool { + return v.isSet +} + +func (v *NullableListArchiveContentsOutputBody) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListArchiveContentsOutputBody(val *ListArchiveContentsOutputBody) *NullableListArchiveContentsOutputBody { + return &NullableListArchiveContentsOutputBody{value: val, isSet: true} +} + +func (v NullableListArchiveContentsOutputBody) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListArchiveContentsOutputBody) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/v3/model_list_imported_functions_output_body.go b/v3/model_list_imported_functions_output_body.go new file mode 100644 index 0000000..2121e4c --- /dev/null +++ b/v3/model_list_imported_functions_output_body.go @@ -0,0 +1,190 @@ +/* +RevEng.AI API + +RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sdk + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ListImportedFunctionsOutputBody type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListImportedFunctionsOutputBody{} + +// ListImportedFunctionsOutputBody struct for ListImportedFunctionsOutputBody +type ListImportedFunctionsOutputBody struct { + ImportedFunctions []ImportedFunctionEntry `json:"imported_functions"` + // Total imported functions for the binary, ignoring pagination. + TotalCount int64 `json:"total_count"` +} + +type _ListImportedFunctionsOutputBody ListImportedFunctionsOutputBody + +// NewListImportedFunctionsOutputBody instantiates a new ListImportedFunctionsOutputBody object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListImportedFunctionsOutputBody(importedFunctions []ImportedFunctionEntry, totalCount int64) *ListImportedFunctionsOutputBody { + this := ListImportedFunctionsOutputBody{} + this.ImportedFunctions = importedFunctions + this.TotalCount = totalCount + return &this +} + +// NewListImportedFunctionsOutputBodyWithDefaults instantiates a new ListImportedFunctionsOutputBody object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListImportedFunctionsOutputBodyWithDefaults() *ListImportedFunctionsOutputBody { + this := ListImportedFunctionsOutputBody{} + return &this +} + +// GetImportedFunctions returns the ImportedFunctions field value +// If the value is explicit nil, the zero value for []ImportedFunctionEntry will be returned +func (o *ListImportedFunctionsOutputBody) GetImportedFunctions() []ImportedFunctionEntry { + if o == nil { + var ret []ImportedFunctionEntry + return ret + } + + return o.ImportedFunctions +} + +// GetImportedFunctionsOk returns a tuple with the ImportedFunctions field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ListImportedFunctionsOutputBody) GetImportedFunctionsOk() ([]ImportedFunctionEntry, bool) { + if o == nil || IsNil(o.ImportedFunctions) { + return nil, false + } + return o.ImportedFunctions, true +} + +// SetImportedFunctions sets field value +func (o *ListImportedFunctionsOutputBody) SetImportedFunctions(v []ImportedFunctionEntry) { + o.ImportedFunctions = v +} + +// GetTotalCount returns the TotalCount field value +func (o *ListImportedFunctionsOutputBody) GetTotalCount() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.TotalCount +} + +// GetTotalCountOk returns a tuple with the TotalCount field value +// and a boolean to check if the value has been set. +func (o *ListImportedFunctionsOutputBody) GetTotalCountOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.TotalCount, true +} + +// SetTotalCount sets field value +func (o *ListImportedFunctionsOutputBody) SetTotalCount(v int64) { + o.TotalCount = v +} + +func (o ListImportedFunctionsOutputBody) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListImportedFunctionsOutputBody) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ImportedFunctions != nil { + toSerialize["imported_functions"] = o.ImportedFunctions + } + toSerialize["total_count"] = o.TotalCount + return toSerialize, nil +} + +func (o *ListImportedFunctionsOutputBody) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "imported_functions", + "total_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varListImportedFunctionsOutputBody := _ListImportedFunctionsOutputBody{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varListImportedFunctionsOutputBody) + + if err != nil { + return err + } + + *o = ListImportedFunctionsOutputBody(varListImportedFunctionsOutputBody) + + return err +} + +type NullableListImportedFunctionsOutputBody struct { + value *ListImportedFunctionsOutputBody + isSet bool +} + +func (v NullableListImportedFunctionsOutputBody) Get() *ListImportedFunctionsOutputBody { + return v.value +} + +func (v *NullableListImportedFunctionsOutputBody) Set(val *ListImportedFunctionsOutputBody) { + v.value = val + v.isSet = true +} + +func (v NullableListImportedFunctionsOutputBody) IsSet() bool { + return v.isSet +} + +func (v *NullableListImportedFunctionsOutputBody) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListImportedFunctionsOutputBody(val *ListImportedFunctionsOutputBody) *NullableListImportedFunctionsOutputBody { + return &NullableListImportedFunctionsOutputBody{value: val, isSet: true} +} + +func (v NullableListImportedFunctionsOutputBody) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListImportedFunctionsOutputBody) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/v3/model_sandbox_options.go b/v3/model_sandbox_options.go index d8798f5..c580304 100644 --- a/v3/model_sandbox_options.go +++ b/v3/model_sandbox_options.go @@ -24,6 +24,9 @@ type SandboxOptions struct { StartMethod NullableSandboxStartMethod `json:"start_method,omitempty"` // Maximum execution time for the sandbox run, in seconds. Allowed values: 120 (2m), 180 (3m), 300 (5m), 600 (10m). Timeout *SandboxTimeout `json:"timeout,omitempty"` + ArchiveSha256Hash NullableString `json:"archive_sha_256_hash,omitempty"` + ArchiveEntryPath NullableString `json:"archive_entry_path,omitempty"` + ArchivePassword NullableString `json:"archive_password,omitempty"` AdditionalProperties map[string]interface{} } @@ -196,6 +199,132 @@ func (o *SandboxOptions) SetTimeout(v SandboxTimeout) { o.Timeout = &v } +// GetArchiveSha256Hash returns the ArchiveSha256Hash field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SandboxOptions) GetArchiveSha256Hash() string { + if o == nil || IsNil(o.ArchiveSha256Hash.Get()) { + var ret string + return ret + } + return *o.ArchiveSha256Hash.Get() +} + +// GetArchiveSha256HashOk returns a tuple with the ArchiveSha256Hash field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SandboxOptions) GetArchiveSha256HashOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ArchiveSha256Hash.Get(), o.ArchiveSha256Hash.IsSet() +} + +// HasArchiveSha256Hash returns a boolean if a field has been set. +func (o *SandboxOptions) HasArchiveSha256Hash() bool { + if o != nil && o.ArchiveSha256Hash.IsSet() { + return true + } + + return false +} + +// SetArchiveSha256Hash gets a reference to the given NullableString and assigns it to the ArchiveSha256Hash field. +func (o *SandboxOptions) SetArchiveSha256Hash(v string) { + o.ArchiveSha256Hash.Set(&v) +} +// SetArchiveSha256HashNil sets the value for ArchiveSha256Hash to be an explicit nil +func (o *SandboxOptions) SetArchiveSha256HashNil() { + o.ArchiveSha256Hash.Set(nil) +} + +// UnsetArchiveSha256Hash ensures that no value is present for ArchiveSha256Hash, not even an explicit nil +func (o *SandboxOptions) UnsetArchiveSha256Hash() { + o.ArchiveSha256Hash.Unset() +} + +// GetArchiveEntryPath returns the ArchiveEntryPath field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SandboxOptions) GetArchiveEntryPath() string { + if o == nil || IsNil(o.ArchiveEntryPath.Get()) { + var ret string + return ret + } + return *o.ArchiveEntryPath.Get() +} + +// GetArchiveEntryPathOk returns a tuple with the ArchiveEntryPath field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SandboxOptions) GetArchiveEntryPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ArchiveEntryPath.Get(), o.ArchiveEntryPath.IsSet() +} + +// HasArchiveEntryPath returns a boolean if a field has been set. +func (o *SandboxOptions) HasArchiveEntryPath() bool { + if o != nil && o.ArchiveEntryPath.IsSet() { + return true + } + + return false +} + +// SetArchiveEntryPath gets a reference to the given NullableString and assigns it to the ArchiveEntryPath field. +func (o *SandboxOptions) SetArchiveEntryPath(v string) { + o.ArchiveEntryPath.Set(&v) +} +// SetArchiveEntryPathNil sets the value for ArchiveEntryPath to be an explicit nil +func (o *SandboxOptions) SetArchiveEntryPathNil() { + o.ArchiveEntryPath.Set(nil) +} + +// UnsetArchiveEntryPath ensures that no value is present for ArchiveEntryPath, not even an explicit nil +func (o *SandboxOptions) UnsetArchiveEntryPath() { + o.ArchiveEntryPath.Unset() +} + +// GetArchivePassword returns the ArchivePassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SandboxOptions) GetArchivePassword() string { + if o == nil || IsNil(o.ArchivePassword.Get()) { + var ret string + return ret + } + return *o.ArchivePassword.Get() +} + +// GetArchivePasswordOk returns a tuple with the ArchivePassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SandboxOptions) GetArchivePasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ArchivePassword.Get(), o.ArchivePassword.IsSet() +} + +// HasArchivePassword returns a boolean if a field has been set. +func (o *SandboxOptions) HasArchivePassword() bool { + if o != nil && o.ArchivePassword.IsSet() { + return true + } + + return false +} + +// SetArchivePassword gets a reference to the given NullableString and assigns it to the ArchivePassword field. +func (o *SandboxOptions) SetArchivePassword(v string) { + o.ArchivePassword.Set(&v) +} +// SetArchivePasswordNil sets the value for ArchivePassword to be an explicit nil +func (o *SandboxOptions) SetArchivePasswordNil() { + o.ArchivePassword.Set(nil) +} + +// UnsetArchivePassword ensures that no value is present for ArchivePassword, not even an explicit nil +func (o *SandboxOptions) UnsetArchivePassword() { + o.ArchivePassword.Unset() +} + func (o SandboxOptions) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -218,6 +347,15 @@ func (o SandboxOptions) ToMap() (map[string]interface{}, error) { if !IsNil(o.Timeout) { toSerialize["timeout"] = o.Timeout } + if o.ArchiveSha256Hash.IsSet() { + toSerialize["archive_sha_256_hash"] = o.ArchiveSha256Hash.Get() + } + if o.ArchiveEntryPath.IsSet() { + toSerialize["archive_entry_path"] = o.ArchiveEntryPath.Get() + } + if o.ArchivePassword.IsSet() { + toSerialize["archive_password"] = o.ArchivePassword.Get() + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -244,6 +382,9 @@ func (o *SandboxOptions) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "command_line_args") delete(additionalProperties, "start_method") delete(additionalProperties, "timeout") + delete(additionalProperties, "archive_sha_256_hash") + delete(additionalProperties, "archive_entry_path") + delete(additionalProperties, "archive_password") o.AdditionalProperties = additionalProperties } diff --git a/v3/model_server_sent_events_inner.go b/v3/model_server_sent_events_inner.go index 0f4a371..6ff89b2 100644 --- a/v3/model_server_sent_events_inner.go +++ b/v3/model_server_sent_events_inner.go @@ -30,6 +30,7 @@ type ServerSentEventsInner struct { EventTITLEUPDATED *EventTITLEUPDATED EventTOOLCALLARGSDELTA *EventTOOLCALLARGSDELTA EventTOOLCALLEND *EventTOOLCALLEND + EventTOOLCALLPROGRESS *EventTOOLCALLPROGRESS EventTOOLCALLRESULT *EventTOOLCALLRESULT EventTOOLCALLSTART *EventTOOLCALLSTART EventTOOLCONFIRMATIONREQUIRED *EventTOOLCONFIRMATIONREQUIRED @@ -126,6 +127,13 @@ func EventTOOLCALLENDAsServerSentEventsInner(v *EventTOOLCALLEND) ServerSentEven } } +// EventTOOLCALLPROGRESSAsServerSentEventsInner is a convenience function that returns EventTOOLCALLPROGRESS wrapped in ServerSentEventsInner +func EventTOOLCALLPROGRESSAsServerSentEventsInner(v *EventTOOLCALLPROGRESS) ServerSentEventsInner { + return ServerSentEventsInner{ + EventTOOLCALLPROGRESS: v, + } +} + // EventTOOLCALLRESULTAsServerSentEventsInner is a convenience function that returns EventTOOLCALLRESULT wrapped in ServerSentEventsInner func EventTOOLCALLRESULTAsServerSentEventsInner(v *EventTOOLCALLRESULT) ServerSentEventsInner { return ServerSentEventsInner{ @@ -373,6 +381,23 @@ func (dst *ServerSentEventsInner) UnmarshalJSON(data []byte) error { dst.EventTOOLCALLEND = nil } + // try to unmarshal data into EventTOOLCALLPROGRESS + err = newStrictDecoder(data).Decode(&dst.EventTOOLCALLPROGRESS) + if err == nil { + jsonEventTOOLCALLPROGRESS, _ := json.Marshal(dst.EventTOOLCALLPROGRESS) + if string(jsonEventTOOLCALLPROGRESS) == "{}" { // empty struct + dst.EventTOOLCALLPROGRESS = nil + } else { + if err = validator.Validate(dst.EventTOOLCALLPROGRESS); err != nil { + dst.EventTOOLCALLPROGRESS = nil + } else { + match++ + } + } + } else { + dst.EventTOOLCALLPROGRESS = nil + } + // try to unmarshal data into EventTOOLCALLRESULT err = newStrictDecoder(data).Decode(&dst.EventTOOLCALLRESULT) if err == nil { @@ -439,6 +464,7 @@ func (dst *ServerSentEventsInner) UnmarshalJSON(data []byte) error { dst.EventTITLEUPDATED = nil dst.EventTOOLCALLARGSDELTA = nil dst.EventTOOLCALLEND = nil + dst.EventTOOLCALLPROGRESS = nil dst.EventTOOLCALLRESULT = nil dst.EventTOOLCALLSTART = nil dst.EventTOOLCONFIRMATIONREQUIRED = nil @@ -505,6 +531,10 @@ func (src ServerSentEventsInner) MarshalJSON() ([]byte, error) { return json.Marshal(&src.EventTOOLCALLEND) } + if src.EventTOOLCALLPROGRESS != nil { + return json.Marshal(&src.EventTOOLCALLPROGRESS) + } + if src.EventTOOLCALLRESULT != nil { return json.Marshal(&src.EventTOOLCALLRESULT) } @@ -577,6 +607,10 @@ func (obj *ServerSentEventsInner) GetActualInstance() (interface{}) { return obj.EventTOOLCALLEND } + if obj.EventTOOLCALLPROGRESS != nil { + return obj.EventTOOLCALLPROGRESS + } + if obj.EventTOOLCALLRESULT != nil { return obj.EventTOOLCALLRESULT } @@ -647,6 +681,10 @@ func (obj ServerSentEventsInner) GetActualInstanceValue() (interface{}) { return *obj.EventTOOLCALLEND } + if obj.EventTOOLCALLPROGRESS != nil { + return *obj.EventTOOLCALLPROGRESS + } + if obj.EventTOOLCALLRESULT != nil { return *obj.EventTOOLCALLRESULT } diff --git a/v3/model_sse_event_tool_call_progress_data.go b/v3/model_sse_event_tool_call_progress_data.go new file mode 100644 index 0000000..0b0bc75 --- /dev/null +++ b/v3/model_sse_event_tool_call_progress_data.go @@ -0,0 +1,253 @@ +/* +RevEng.AI API + +RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sdk + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the SseEventToolCallProgressData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SseEventToolCallProgressData{} + +// SseEventToolCallProgressData struct for SseEventToolCallProgressData +type SseEventToolCallProgressData struct { + Data interface{} `json:"data"` + EventId int64 `json:"event_id"` + SourceRunId *string `json:"source_run_id,omitempty"` + Type string `json:"type"` +} + +type _SseEventToolCallProgressData SseEventToolCallProgressData + +// NewSseEventToolCallProgressData instantiates a new SseEventToolCallProgressData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSseEventToolCallProgressData(data interface{}, eventId int64, type_ string) *SseEventToolCallProgressData { + this := SseEventToolCallProgressData{} + this.Data = data + this.EventId = eventId + this.Type = type_ + return &this +} + +// NewSseEventToolCallProgressDataWithDefaults instantiates a new SseEventToolCallProgressData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSseEventToolCallProgressDataWithDefaults() *SseEventToolCallProgressData { + this := SseEventToolCallProgressData{} + return &this +} + +// GetData returns the Data field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *SseEventToolCallProgressData) GetData() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SseEventToolCallProgressData) GetDataOk() (*interface{}, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *SseEventToolCallProgressData) SetData(v interface{}) { + o.Data = v +} + +// GetEventId returns the EventId field value +func (o *SseEventToolCallProgressData) GetEventId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.EventId +} + +// GetEventIdOk returns a tuple with the EventId field value +// and a boolean to check if the value has been set. +func (o *SseEventToolCallProgressData) GetEventIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.EventId, true +} + +// SetEventId sets field value +func (o *SseEventToolCallProgressData) SetEventId(v int64) { + o.EventId = v +} + +// GetSourceRunId returns the SourceRunId field value if set, zero value otherwise. +func (o *SseEventToolCallProgressData) GetSourceRunId() string { + if o == nil || IsNil(o.SourceRunId) { + var ret string + return ret + } + return *o.SourceRunId +} + +// GetSourceRunIdOk returns a tuple with the SourceRunId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SseEventToolCallProgressData) GetSourceRunIdOk() (*string, bool) { + if o == nil || IsNil(o.SourceRunId) { + return nil, false + } + return o.SourceRunId, true +} + +// HasSourceRunId returns a boolean if a field has been set. +func (o *SseEventToolCallProgressData) HasSourceRunId() bool { + if o != nil && !IsNil(o.SourceRunId) { + return true + } + + return false +} + +// SetSourceRunId gets a reference to the given string and assigns it to the SourceRunId field. +func (o *SseEventToolCallProgressData) SetSourceRunId(v string) { + o.SourceRunId = &v +} + +// GetType returns the Type field value +func (o *SseEventToolCallProgressData) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *SseEventToolCallProgressData) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *SseEventToolCallProgressData) SetType(v string) { + o.Type = v +} + +func (o SseEventToolCallProgressData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SseEventToolCallProgressData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + toSerialize["event_id"] = o.EventId + if !IsNil(o.SourceRunId) { + toSerialize["source_run_id"] = o.SourceRunId + } + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *SseEventToolCallProgressData) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + "event_id", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSseEventToolCallProgressData := _SseEventToolCallProgressData{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSseEventToolCallProgressData) + + if err != nil { + return err + } + + *o = SseEventToolCallProgressData(varSseEventToolCallProgressData) + + return err +} + +type NullableSseEventToolCallProgressData struct { + value *SseEventToolCallProgressData + isSet bool +} + +func (v NullableSseEventToolCallProgressData) Get() *SseEventToolCallProgressData { + return v.value +} + +func (v *NullableSseEventToolCallProgressData) Set(val *SseEventToolCallProgressData) { + v.value = val + v.isSet = true +} + +func (v NullableSseEventToolCallProgressData) IsSet() bool { + return v.isSet +} + +func (v *NullableSseEventToolCallProgressData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSseEventToolCallProgressData(val *SseEventToolCallProgressData) *NullableSseEventToolCallProgressData { + return &NullableSseEventToolCallProgressData{value: val, isSet: true} +} + +func (v NullableSseEventToolCallProgressData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSseEventToolCallProgressData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/v3/model_start_matching_for_analysis_input_body.go b/v3/model_start_matching_for_analysis_input_body.go index 97938ac..ef1dff4 100644 --- a/v3/model_start_matching_for_analysis_input_body.go +++ b/v3/model_start_matching_for_analysis_input_body.go @@ -22,10 +22,15 @@ type StartMatchingForAnalysisInputBody struct { Filters *MatchFilters `json:"filters,omitempty"` // Similarity floor as a percentage. Defaults to 90. MinSimilarity *float64 `json:"min_similarity,omitempty"` + // By default a completed matching run for the same request is reused (response status=COMPLETED, no new run). Set true to force a fresh run. + NoCache *bool `json:"no_cache,omitempty"` // Max matches returned per source function. Defaults to 1. ResultsPerFunction *int64 `json:"results_per_function,omitempty"` + AdditionalProperties map[string]interface{} } +type _StartMatchingForAnalysisInputBody StartMatchingForAnalysisInputBody + // NewStartMatchingForAnalysisInputBody instantiates a new StartMatchingForAnalysisInputBody object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +112,38 @@ func (o *StartMatchingForAnalysisInputBody) SetMinSimilarity(v float64) { o.MinSimilarity = &v } +// GetNoCache returns the NoCache field value if set, zero value otherwise. +func (o *StartMatchingForAnalysisInputBody) GetNoCache() bool { + if o == nil || IsNil(o.NoCache) { + var ret bool + return ret + } + return *o.NoCache +} + +// GetNoCacheOk returns a tuple with the NoCache field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StartMatchingForAnalysisInputBody) GetNoCacheOk() (*bool, bool) { + if o == nil || IsNil(o.NoCache) { + return nil, false + } + return o.NoCache, true +} + +// HasNoCache returns a boolean if a field has been set. +func (o *StartMatchingForAnalysisInputBody) HasNoCache() bool { + if o != nil && !IsNil(o.NoCache) { + return true + } + + return false +} + +// SetNoCache gets a reference to the given bool and assigns it to the NoCache field. +func (o *StartMatchingForAnalysisInputBody) SetNoCache(v bool) { + o.NoCache = &v +} + // GetResultsPerFunction returns the ResultsPerFunction field value if set, zero value otherwise. func (o *StartMatchingForAnalysisInputBody) GetResultsPerFunction() int64 { if o == nil || IsNil(o.ResultsPerFunction) { @@ -155,12 +192,44 @@ func (o StartMatchingForAnalysisInputBody) ToMap() (map[string]interface{}, erro if !IsNil(o.MinSimilarity) { toSerialize["min_similarity"] = o.MinSimilarity } + if !IsNil(o.NoCache) { + toSerialize["no_cache"] = o.NoCache + } if !IsNil(o.ResultsPerFunction) { toSerialize["results_per_function"] = o.ResultsPerFunction } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *StartMatchingForAnalysisInputBody) UnmarshalJSON(data []byte) (err error) { + varStartMatchingForAnalysisInputBody := _StartMatchingForAnalysisInputBody{} + + err = json.Unmarshal(data, &varStartMatchingForAnalysisInputBody) + + if err != nil { + return err + } + + *o = StartMatchingForAnalysisInputBody(varStartMatchingForAnalysisInputBody) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "filters") + delete(additionalProperties, "min_similarity") + delete(additionalProperties, "no_cache") + delete(additionalProperties, "results_per_function") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableStartMatchingForAnalysisInputBody struct { value *StartMatchingForAnalysisInputBody isSet bool diff --git a/v3/model_start_matching_for_functions_input_body.go b/v3/model_start_matching_for_functions_input_body.go index b4d5e0f..9d9bb46 100644 --- a/v3/model_start_matching_for_functions_input_body.go +++ b/v3/model_start_matching_for_functions_input_body.go @@ -25,6 +25,8 @@ type StartMatchingForFunctionsInputBody struct { FunctionIds []int64 `json:"function_ids"` // Similarity floor as a percentage. Defaults to 90. MinSimilarity *float64 `json:"min_similarity,omitempty"` + // By default a completed matching run for the same request is reused (response status=COMPLETED, no new run). Set true to force a fresh run. + NoCache *bool `json:"no_cache,omitempty"` // Max matches returned per source function. Defaults to 1. ResultsPerFunction *int64 `json:"results_per_function,omitempty"` // Collapse near-duplicate candidate names into canonical buckets and return per-name confidences (the response 'confidences' array). Adds a canonicalisation step; defaults to false. @@ -142,6 +144,38 @@ func (o *StartMatchingForFunctionsInputBody) SetMinSimilarity(v float64) { o.MinSimilarity = &v } +// GetNoCache returns the NoCache field value if set, zero value otherwise. +func (o *StartMatchingForFunctionsInputBody) GetNoCache() bool { + if o == nil || IsNil(o.NoCache) { + var ret bool + return ret + } + return *o.NoCache +} + +// GetNoCacheOk returns a tuple with the NoCache field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StartMatchingForFunctionsInputBody) GetNoCacheOk() (*bool, bool) { + if o == nil || IsNil(o.NoCache) { + return nil, false + } + return o.NoCache, true +} + +// HasNoCache returns a boolean if a field has been set. +func (o *StartMatchingForFunctionsInputBody) HasNoCache() bool { + if o != nil && !IsNil(o.NoCache) { + return true + } + + return false +} + +// SetNoCache gets a reference to the given bool and assigns it to the NoCache field. +func (o *StartMatchingForFunctionsInputBody) SetNoCache(v bool) { + o.NoCache = &v +} + // GetResultsPerFunction returns the ResultsPerFunction field value if set, zero value otherwise. func (o *StartMatchingForFunctionsInputBody) GetResultsPerFunction() int64 { if o == nil || IsNil(o.ResultsPerFunction) { @@ -225,6 +259,9 @@ func (o StartMatchingForFunctionsInputBody) ToMap() (map[string]interface{}, err if !IsNil(o.MinSimilarity) { toSerialize["min_similarity"] = o.MinSimilarity } + if !IsNil(o.NoCache) { + toSerialize["no_cache"] = o.NoCache + } if !IsNil(o.ResultsPerFunction) { toSerialize["results_per_function"] = o.ResultsPerFunction } @@ -277,6 +314,7 @@ func (o *StartMatchingForFunctionsInputBody) UnmarshalJSON(data []byte) (err err delete(additionalProperties, "filters") delete(additionalProperties, "function_ids") delete(additionalProperties, "min_similarity") + delete(additionalProperties, "no_cache") delete(additionalProperties, "results_per_function") delete(additionalProperties, "use_canonical_names") o.AdditionalProperties = additionalProperties diff --git a/v3/model_start_matching_output_body.go b/v3/model_start_matching_output_body.go index 3a3c742..c55cc04 100644 --- a/v3/model_start_matching_output_body.go +++ b/v3/model_start_matching_output_body.go @@ -20,6 +20,8 @@ var _ MappedNullable = &StartMatchingOutputBody{} // StartMatchingOutputBody struct for StartMatchingOutputBody type StartMatchingOutputBody struct { + // Opaque token for this matching run. Pass it to the GET/status endpoints' match_id query parameter to fetch this exact run. + MatchId string `json:"match_id"` // Log messages emitted during execution Messages []ProgressMessage `json:"messages"` // Current workflow status @@ -38,8 +40,9 @@ type _StartMatchingOutputBody StartMatchingOutputBody // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewStartMatchingOutputBody(messages []ProgressMessage, status string, step string, stepIndex int64, stepsTotal int64) *StartMatchingOutputBody { +func NewStartMatchingOutputBody(matchId string, messages []ProgressMessage, status string, step string, stepIndex int64, stepsTotal int64) *StartMatchingOutputBody { this := StartMatchingOutputBody{} + this.MatchId = matchId this.Messages = messages this.Status = status this.Step = step @@ -56,6 +59,30 @@ func NewStartMatchingOutputBodyWithDefaults() *StartMatchingOutputBody { return &this } +// GetMatchId returns the MatchId field value +func (o *StartMatchingOutputBody) GetMatchId() string { + if o == nil { + var ret string + return ret + } + + return o.MatchId +} + +// GetMatchIdOk returns a tuple with the MatchId field value +// and a boolean to check if the value has been set. +func (o *StartMatchingOutputBody) GetMatchIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.MatchId, true +} + +// SetMatchId sets field value +func (o *StartMatchingOutputBody) SetMatchId(v string) { + o.MatchId = v +} + // GetMessages returns the Messages field value // If the value is explicit nil, the zero value for []ProgressMessage will be returned func (o *StartMatchingOutputBody) GetMessages() []ProgressMessage { @@ -188,6 +215,7 @@ func (o StartMatchingOutputBody) MarshalJSON() ([]byte, error) { func (o StartMatchingOutputBody) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + toSerialize["match_id"] = o.MatchId if o.Messages != nil { toSerialize["messages"] = o.Messages } @@ -203,6 +231,7 @@ func (o *StartMatchingOutputBody) UnmarshalJSON(data []byte) (err error) { // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ + "match_id", "messages", "status", "step", diff --git a/v3/model_trigger_dynamic_execution_input_body.go b/v3/model_trigger_dynamic_execution_input_body.go index 1a3a2d9..0acd99e 100644 --- a/v3/model_trigger_dynamic_execution_input_body.go +++ b/v3/model_trigger_dynamic_execution_input_body.go @@ -18,6 +18,12 @@ var _ MappedNullable = &TriggerDynamicExecutionInputBody{} // TriggerDynamicExecutionInputBody struct for TriggerDynamicExecutionInputBody type TriggerDynamicExecutionInputBody struct { + // Relative path of the entry inside the archive to execute + ArchiveEntryPath *string `json:"archive_entry_path,omitempty"` + // Password for an encrypted archive + ArchivePassword *string `json:"archive_password,omitempty"` + // SHA-256 of the archive object to send to the sandbox instead of the analysed binary + ArchiveSha256Hash *string `json:"archive_sha_256_hash,omitempty" validate:"regexp=^[a-fA-F0-9]{64}$"` // Command-line arguments passed to the sample when the sandbox launches it CommandLineArgs *string `json:"command_line_args,omitempty"` // How the sandbox launches the sample. Defaults to the sandbox's standard behaviour when omitted. @@ -50,6 +56,102 @@ func NewTriggerDynamicExecutionInputBodyWithDefaults() *TriggerDynamicExecutionI return &this } +// GetArchiveEntryPath returns the ArchiveEntryPath field value if set, zero value otherwise. +func (o *TriggerDynamicExecutionInputBody) GetArchiveEntryPath() string { + if o == nil || IsNil(o.ArchiveEntryPath) { + var ret string + return ret + } + return *o.ArchiveEntryPath +} + +// GetArchiveEntryPathOk returns a tuple with the ArchiveEntryPath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TriggerDynamicExecutionInputBody) GetArchiveEntryPathOk() (*string, bool) { + if o == nil || IsNil(o.ArchiveEntryPath) { + return nil, false + } + return o.ArchiveEntryPath, true +} + +// HasArchiveEntryPath returns a boolean if a field has been set. +func (o *TriggerDynamicExecutionInputBody) HasArchiveEntryPath() bool { + if o != nil && !IsNil(o.ArchiveEntryPath) { + return true + } + + return false +} + +// SetArchiveEntryPath gets a reference to the given string and assigns it to the ArchiveEntryPath field. +func (o *TriggerDynamicExecutionInputBody) SetArchiveEntryPath(v string) { + o.ArchiveEntryPath = &v +} + +// GetArchivePassword returns the ArchivePassword field value if set, zero value otherwise. +func (o *TriggerDynamicExecutionInputBody) GetArchivePassword() string { + if o == nil || IsNil(o.ArchivePassword) { + var ret string + return ret + } + return *o.ArchivePassword +} + +// GetArchivePasswordOk returns a tuple with the ArchivePassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TriggerDynamicExecutionInputBody) GetArchivePasswordOk() (*string, bool) { + if o == nil || IsNil(o.ArchivePassword) { + return nil, false + } + return o.ArchivePassword, true +} + +// HasArchivePassword returns a boolean if a field has been set. +func (o *TriggerDynamicExecutionInputBody) HasArchivePassword() bool { + if o != nil && !IsNil(o.ArchivePassword) { + return true + } + + return false +} + +// SetArchivePassword gets a reference to the given string and assigns it to the ArchivePassword field. +func (o *TriggerDynamicExecutionInputBody) SetArchivePassword(v string) { + o.ArchivePassword = &v +} + +// GetArchiveSha256Hash returns the ArchiveSha256Hash field value if set, zero value otherwise. +func (o *TriggerDynamicExecutionInputBody) GetArchiveSha256Hash() string { + if o == nil || IsNil(o.ArchiveSha256Hash) { + var ret string + return ret + } + return *o.ArchiveSha256Hash +} + +// GetArchiveSha256HashOk returns a tuple with the ArchiveSha256Hash field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TriggerDynamicExecutionInputBody) GetArchiveSha256HashOk() (*string, bool) { + if o == nil || IsNil(o.ArchiveSha256Hash) { + return nil, false + } + return o.ArchiveSha256Hash, true +} + +// HasArchiveSha256Hash returns a boolean if a field has been set. +func (o *TriggerDynamicExecutionInputBody) HasArchiveSha256Hash() bool { + if o != nil && !IsNil(o.ArchiveSha256Hash) { + return true + } + + return false +} + +// SetArchiveSha256Hash gets a reference to the given string and assigns it to the ArchiveSha256Hash field. +func (o *TriggerDynamicExecutionInputBody) SetArchiveSha256Hash(v string) { + o.ArchiveSha256Hash = &v +} + // GetCommandLineArgs returns the CommandLineArgs field value if set, zero value otherwise. func (o *TriggerDynamicExecutionInputBody) GetCommandLineArgs() string { if o == nil || IsNil(o.CommandLineArgs) { @@ -156,6 +258,15 @@ func (o TriggerDynamicExecutionInputBody) MarshalJSON() ([]byte, error) { func (o TriggerDynamicExecutionInputBody) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ArchiveEntryPath) { + toSerialize["archive_entry_path"] = o.ArchiveEntryPath + } + if !IsNil(o.ArchivePassword) { + toSerialize["archive_password"] = o.ArchivePassword + } + if !IsNil(o.ArchiveSha256Hash) { + toSerialize["archive_sha_256_hash"] = o.ArchiveSha256Hash + } if !IsNil(o.CommandLineArgs) { toSerialize["command_line_args"] = o.CommandLineArgs } @@ -187,6 +298,9 @@ func (o *TriggerDynamicExecutionInputBody) UnmarshalJSON(data []byte) (err error additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "archive_entry_path") + delete(additionalProperties, "archive_password") + delete(additionalProperties, "archive_sha_256_hash") delete(additionalProperties, "command_line_args") delete(additionalProperties, "start_method") delete(additionalProperties, "timeout") diff --git a/v3/model_upload_response.go b/v3/model_upload_response.go index 274d39e..0525704 100644 --- a/v3/model_upload_response.go +++ b/v3/model_upload_response.go @@ -22,6 +22,10 @@ type UploadResponse struct { Sha256Hash string `json:"sha_256_hash"` FileType UploadFileType `json:"file_type"` Filename string `json:"filename"` + Mime string `json:"mime"` + IsArchive bool `json:"is_archive"` + CanSandbox bool `json:"can_sandbox"` + CanExtract bool `json:"can_extract"` AdditionalProperties map[string]interface{} } @@ -31,11 +35,15 @@ type _UploadResponse UploadResponse // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewUploadResponse(sha256Hash string, fileType UploadFileType, filename string) *UploadResponse { +func NewUploadResponse(sha256Hash string, fileType UploadFileType, filename string, mime string, isArchive bool, canSandbox bool, canExtract bool) *UploadResponse { this := UploadResponse{} this.Sha256Hash = sha256Hash this.FileType = fileType this.Filename = filename + this.Mime = mime + this.IsArchive = isArchive + this.CanSandbox = canSandbox + this.CanExtract = canExtract return &this } @@ -119,6 +127,102 @@ func (o *UploadResponse) SetFilename(v string) { o.Filename = v } +// GetMime returns the Mime field value +func (o *UploadResponse) GetMime() string { + if o == nil { + var ret string + return ret + } + + return o.Mime +} + +// GetMimeOk returns a tuple with the Mime field value +// and a boolean to check if the value has been set. +func (o *UploadResponse) GetMimeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Mime, true +} + +// SetMime sets field value +func (o *UploadResponse) SetMime(v string) { + o.Mime = v +} + +// GetIsArchive returns the IsArchive field value +func (o *UploadResponse) GetIsArchive() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsArchive +} + +// GetIsArchiveOk returns a tuple with the IsArchive field value +// and a boolean to check if the value has been set. +func (o *UploadResponse) GetIsArchiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsArchive, true +} + +// SetIsArchive sets field value +func (o *UploadResponse) SetIsArchive(v bool) { + o.IsArchive = v +} + +// GetCanSandbox returns the CanSandbox field value +func (o *UploadResponse) GetCanSandbox() bool { + if o == nil { + var ret bool + return ret + } + + return o.CanSandbox +} + +// GetCanSandboxOk returns a tuple with the CanSandbox field value +// and a boolean to check if the value has been set. +func (o *UploadResponse) GetCanSandboxOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.CanSandbox, true +} + +// SetCanSandbox sets field value +func (o *UploadResponse) SetCanSandbox(v bool) { + o.CanSandbox = v +} + +// GetCanExtract returns the CanExtract field value +func (o *UploadResponse) GetCanExtract() bool { + if o == nil { + var ret bool + return ret + } + + return o.CanExtract +} + +// GetCanExtractOk returns a tuple with the CanExtract field value +// and a boolean to check if the value has been set. +func (o *UploadResponse) GetCanExtractOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.CanExtract, true +} + +// SetCanExtract sets field value +func (o *UploadResponse) SetCanExtract(v bool) { + o.CanExtract = v +} + func (o UploadResponse) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -132,6 +236,10 @@ func (o UploadResponse) ToMap() (map[string]interface{}, error) { toSerialize["sha_256_hash"] = o.Sha256Hash toSerialize["file_type"] = o.FileType toSerialize["filename"] = o.Filename + toSerialize["mime"] = o.Mime + toSerialize["is_archive"] = o.IsArchive + toSerialize["can_sandbox"] = o.CanSandbox + toSerialize["can_extract"] = o.CanExtract for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -148,6 +256,10 @@ func (o *UploadResponse) UnmarshalJSON(data []byte) (err error) { "sha_256_hash", "file_type", "filename", + "mime", + "is_archive", + "can_sandbox", + "can_extract", } allProperties := make(map[string]interface{}) @@ -180,6 +292,10 @@ func (o *UploadResponse) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "sha_256_hash") delete(additionalProperties, "file_type") delete(additionalProperties, "filename") + delete(additionalProperties, "mime") + delete(additionalProperties, "is_archive") + delete(additionalProperties, "can_sandbox") + delete(additionalProperties, "can_extract") o.AdditionalProperties = additionalProperties } diff --git a/v3/model_user.go b/v3/model_user.go index b44627b..c3c1eed 100644 --- a/v3/model_user.go +++ b/v3/model_user.go @@ -21,7 +21,7 @@ var _ MappedNullable = &User{} // User struct for User type User struct { - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt time.Time `json:"created_at"` Email string `json:"email"` Profile UserProfile `json:"profile"` Role string `json:"role"` @@ -35,8 +35,9 @@ type _User User // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewUser(email string, profile UserProfile, role string, userId int64) *User { +func NewUser(createdAt time.Time, email string, profile UserProfile, role string, userId int64) *User { this := User{} + this.CreatedAt = createdAt this.Email = email this.Profile = profile this.Role = role @@ -52,36 +53,28 @@ func NewUserWithDefaults() *User { return &this } -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +// GetCreatedAt returns the CreatedAt field value func (o *User) GetCreatedAt() time.Time { - if o == nil || IsNil(o.CreatedAt) { + if o == nil { var ret time.Time return ret } - return *o.CreatedAt + + return o.CreatedAt } -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// GetCreatedAtOk returns a tuple with the CreatedAt field value // and a boolean to check if the value has been set. func (o *User) GetCreatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.CreatedAt) { + if o == nil { return nil, false } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *User) HasCreatedAt() bool { - if o != nil && !IsNil(o.CreatedAt) { - return true - } - - return false + return &o.CreatedAt, true } -// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +// SetCreatedAt sets field value func (o *User) SetCreatedAt(v time.Time) { - o.CreatedAt = &v + o.CreatedAt = v } // GetEmail returns the Email field value @@ -222,9 +215,7 @@ func (o User) MarshalJSON() ([]byte, error) { func (o User) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.CreatedAt) { - toSerialize["created_at"] = o.CreatedAt - } + toSerialize["created_at"] = o.CreatedAt toSerialize["email"] = o.Email toSerialize["profile"] = o.Profile toSerialize["role"] = o.Role @@ -240,6 +231,7 @@ func (o *User) UnmarshalJSON(data []byte) (err error) { // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ + "created_at", "email", "profile", "role",