diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 1f48dbc3..28940eca 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -11,6 +11,7 @@ build.sbt docs/APIUser.md docs/AbaPaymentInfo.md docs/AbiFunction.md +docs/AcceptFindingRequest.md docs/AccessRegistryAddressItem.md docs/AccessRegistryCurrentStateResponse.md docs/AccessRegistryCurrentStateResponse2.md @@ -201,6 +202,7 @@ docs/CollectionTokenMetadataAttributeDto.md docs/CollectionTokenMetadataDto.md docs/CollectionType.md docs/ComplianceApi.md +docs/ComplianceRequirement.md docs/ComplianceResultFullPayload.md docs/ComplianceResultStatusesEnum.md docs/ComplianceResults.md @@ -784,6 +786,7 @@ docs/RenameConnectedAccountRequest.md docs/RenameConnectedAccountResponse.md docs/RenameCosigner.md docs/RenameVaultAccountResponse.md +docs/ReopenFindingRequest.md docs/ReportConflictResponse.md docs/ReportJob.md docs/ReportJobLinks.md @@ -852,6 +855,7 @@ docs/ScreeningVerdictEnum.md docs/ScreeningVerdictMatchedRule.md docs/SearchNetworkIdsResponse.md docs/SecurityFinding.md +docs/SecurityFindingDetailed.md docs/SecurityPostureManagementApi.md docs/SepaPaymentInfo.md docs/SessionDTO.md @@ -1180,6 +1184,7 @@ docs/UpdateCallbackHandlerRequest.md docs/UpdateCallbackHandlerResponse.md docs/UpdateCounterpartyGroupRequest.md docs/UpdateDraftRequest.md +docs/UpdateFindingExternalRequest.md docs/UpdateLegalEntityRequest.md docs/UpdateTagRequest.md docs/UpdateTokenOwnershipStatusDto.md @@ -1337,6 +1342,7 @@ src/main/java/com/fireblocks/sdk/model/APIUser.java src/main/java/com/fireblocks/sdk/model/AbaPaymentInfo.java src/main/java/com/fireblocks/sdk/model/AbiFunction.java src/main/java/com/fireblocks/sdk/model/AbstractOpenApiSchema.java +src/main/java/com/fireblocks/sdk/model/AcceptFindingRequest.java src/main/java/com/fireblocks/sdk/model/AccessRegistryAddressItem.java src/main/java/com/fireblocks/sdk/model/AccessRegistryCurrentStateResponse.java src/main/java/com/fireblocks/sdk/model/AccessRegistryCurrentStateResponse2.java @@ -1522,6 +1528,7 @@ src/main/java/com/fireblocks/sdk/model/CollectionOwnershipResponse.java src/main/java/com/fireblocks/sdk/model/CollectionTokenMetadataAttributeDto.java src/main/java/com/fireblocks/sdk/model/CollectionTokenMetadataDto.java src/main/java/com/fireblocks/sdk/model/CollectionType.java +src/main/java/com/fireblocks/sdk/model/ComplianceRequirement.java src/main/java/com/fireblocks/sdk/model/ComplianceResultFullPayload.java src/main/java/com/fireblocks/sdk/model/ComplianceResultStatusesEnum.java src/main/java/com/fireblocks/sdk/model/ComplianceResults.java @@ -2078,6 +2085,7 @@ src/main/java/com/fireblocks/sdk/model/RenameConnectedAccountRequest.java src/main/java/com/fireblocks/sdk/model/RenameConnectedAccountResponse.java src/main/java/com/fireblocks/sdk/model/RenameCosigner.java src/main/java/com/fireblocks/sdk/model/RenameVaultAccountResponse.java +src/main/java/com/fireblocks/sdk/model/ReopenFindingRequest.java src/main/java/com/fireblocks/sdk/model/ReportConflictResponse.java src/main/java/com/fireblocks/sdk/model/ReportJob.java src/main/java/com/fireblocks/sdk/model/ReportJobLinks.java @@ -2144,6 +2152,7 @@ src/main/java/com/fireblocks/sdk/model/ScreeningVerdictEnum.java src/main/java/com/fireblocks/sdk/model/ScreeningVerdictMatchedRule.java src/main/java/com/fireblocks/sdk/model/SearchNetworkIdsResponse.java src/main/java/com/fireblocks/sdk/model/SecurityFinding.java +src/main/java/com/fireblocks/sdk/model/SecurityFindingDetailed.java src/main/java/com/fireblocks/sdk/model/SepaPaymentInfo.java src/main/java/com/fireblocks/sdk/model/SessionDTO.java src/main/java/com/fireblocks/sdk/model/SessionMetadata.java @@ -2463,6 +2472,7 @@ src/main/java/com/fireblocks/sdk/model/UpdateCallbackHandlerRequest.java src/main/java/com/fireblocks/sdk/model/UpdateCallbackHandlerResponse.java src/main/java/com/fireblocks/sdk/model/UpdateCounterpartyGroupRequest.java src/main/java/com/fireblocks/sdk/model/UpdateDraftRequest.java +src/main/java/com/fireblocks/sdk/model/UpdateFindingExternalRequest.java src/main/java/com/fireblocks/sdk/model/UpdateLegalEntityRequest.java src/main/java/com/fireblocks/sdk/model/UpdateTagRequest.java src/main/java/com/fireblocks/sdk/model/UpdateTokenOwnershipStatusDto.java @@ -2588,6 +2598,7 @@ src/test/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApiTest.java src/test/java/com/fireblocks/sdk/model/APIUserTest.java src/test/java/com/fireblocks/sdk/model/AbaPaymentInfoTest.java src/test/java/com/fireblocks/sdk/model/AbiFunctionTest.java +src/test/java/com/fireblocks/sdk/model/AcceptFindingRequestTest.java src/test/java/com/fireblocks/sdk/model/AccessRegistryAddressItemTest.java src/test/java/com/fireblocks/sdk/model/AccessRegistryCurrentStateResponse2Test.java src/test/java/com/fireblocks/sdk/model/AccessRegistryCurrentStateResponseTest.java @@ -2773,6 +2784,7 @@ src/test/java/com/fireblocks/sdk/model/CollectionOwnershipResponseTest.java src/test/java/com/fireblocks/sdk/model/CollectionTokenMetadataAttributeDtoTest.java src/test/java/com/fireblocks/sdk/model/CollectionTokenMetadataDtoTest.java src/test/java/com/fireblocks/sdk/model/CollectionTypeTest.java +src/test/java/com/fireblocks/sdk/model/ComplianceRequirementTest.java src/test/java/com/fireblocks/sdk/model/ComplianceResultFullPayloadTest.java src/test/java/com/fireblocks/sdk/model/ComplianceResultStatusesEnumTest.java src/test/java/com/fireblocks/sdk/model/ComplianceResultsTest.java @@ -3329,6 +3341,7 @@ src/test/java/com/fireblocks/sdk/model/RenameConnectedAccountRequestTest.java src/test/java/com/fireblocks/sdk/model/RenameConnectedAccountResponseTest.java src/test/java/com/fireblocks/sdk/model/RenameCosignerTest.java src/test/java/com/fireblocks/sdk/model/RenameVaultAccountResponseTest.java +src/test/java/com/fireblocks/sdk/model/ReopenFindingRequestTest.java src/test/java/com/fireblocks/sdk/model/ReportConflictResponseTest.java src/test/java/com/fireblocks/sdk/model/ReportJobLinksTest.java src/test/java/com/fireblocks/sdk/model/ReportJobResponseTest.java @@ -3394,6 +3407,7 @@ src/test/java/com/fireblocks/sdk/model/ScreeningVerdictEnumTest.java src/test/java/com/fireblocks/sdk/model/ScreeningVerdictMatchedRuleTest.java src/test/java/com/fireblocks/sdk/model/ScreeningVerdictTest.java src/test/java/com/fireblocks/sdk/model/SearchNetworkIdsResponseTest.java +src/test/java/com/fireblocks/sdk/model/SecurityFindingDetailedTest.java src/test/java/com/fireblocks/sdk/model/SecurityFindingTest.java src/test/java/com/fireblocks/sdk/model/SepaPaymentInfoTest.java src/test/java/com/fireblocks/sdk/model/SessionDTOTest.java @@ -3714,6 +3728,7 @@ src/test/java/com/fireblocks/sdk/model/UpdateCallbackHandlerRequestTest.java src/test/java/com/fireblocks/sdk/model/UpdateCallbackHandlerResponseTest.java src/test/java/com/fireblocks/sdk/model/UpdateCounterpartyGroupRequestTest.java src/test/java/com/fireblocks/sdk/model/UpdateDraftRequestTest.java +src/test/java/com/fireblocks/sdk/model/UpdateFindingExternalRequestTest.java src/test/java/com/fireblocks/sdk/model/UpdateLegalEntityRequestTest.java src/test/java/com/fireblocks/sdk/model/UpdateTagRequestTest.java src/test/java/com/fireblocks/sdk/model/UpdateTokenOwnershipStatusDtoTest.java diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index ac00dc70..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,239 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v27.0.0](https://github.com/fireblocks/java-sdk/compare/v15.0.0...v27.0.0) - 2026-08-18 - -### Merged - -- Generated SDK #2768393570 [`#151`](https://github.com/fireblocks/java-sdk/pull/151) - -## [v15.0.0](https://github.com/fireblocks/java-sdk/compare/v14.1.0...v15.0.0) - 2026-03-15 - -### Merged - -- Generated SDK #3733 (major) [`#128`](https://github.com/fireblocks/java-sdk/pull/128) - -## [v14.1.0](https://github.com/fireblocks/java-sdk/compare/v14.0.0...v14.1.0) - 2026-02-26 - -### Merged - -- Generated SDK #2167 [`#126`](https://github.com/fireblocks/java-sdk/pull/126) - -## [v14.0.0](https://github.com/fireblocks/java-sdk/compare/v13.0.0...v14.0.0) - 2026-02-03 - -### Merged - -- Generated SDK #4746 [`#121`](https://github.com/fireblocks/java-sdk/pull/121) - -## [v13.0.0](https://github.com/fireblocks/java-sdk/compare/v12.1.3...v13.0.0) - 2025-11-13 - -### Merged - -- Generated SDK #5834 [`#116`](https://github.com/fireblocks/java-sdk/pull/116) - -## [v12.1.3](https://github.com/fireblocks/java-sdk/compare/v12.1.2...v12.1.3) - 2025-10-22 - -### Merged - -- Generated SDK #8293 [`#115`](https://github.com/fireblocks/java-sdk/pull/115) - -## [v12.1.2](https://github.com/fireblocks/java-sdk/compare/v12.1.1...v12.1.2) - 2025-09-29 - -### Merged - -- Generated SDK #6061 [`#113`](https://github.com/fireblocks/java-sdk/pull/113) - -## [v12.1.1](https://github.com/fireblocks/java-sdk/compare/v12.1.0...v12.1.1) - 2025-09-10 - -### Merged - -- Generated SDK #1410 [`#111`](https://github.com/fireblocks/java-sdk/pull/111) - -## [v12.1.0](https://github.com/fireblocks/java-sdk/compare/v12.0.0...v12.1.0) - 2025-09-09 - -### Merged - -- Generated SDK #4521 [`#109`](https://github.com/fireblocks/java-sdk/pull/109) - -## [v12.0.0](https://github.com/fireblocks/java-sdk/compare/v11.2.0...v12.0.0) - 2025-09-01 - -### Merged - -- Generated SDK #7741 [`#108`](https://github.com/fireblocks/java-sdk/pull/108) - -## [v11.2.0](https://github.com/fireblocks/java-sdk/compare/v11.1.0...v11.2.0) - 2025-08-21 - -### Merged - -- Generated SDK #3302 [`#107`](https://github.com/fireblocks/java-sdk/pull/107) - -## [v11.1.0](https://github.com/fireblocks/java-sdk/compare/v11.0.0...v11.1.0) - 2025-08-11 - -### Merged - -- Generated SDK #1782 [`#105`](https://github.com/fireblocks/java-sdk/pull/105) - -## [v11.0.0](https://github.com/fireblocks/java-sdk/compare/v10.4.0...v11.0.0) - 2025-07-15 - -### Merged - -- Generated SDK #5610 [`#103`](https://github.com/fireblocks/java-sdk/pull/103) - -## [v10.4.0](https://github.com/fireblocks/java-sdk/compare/v10.3.0...v10.4.0) - 2025-06-29 - -### Merged - -- Generated SDK #1492 [`#101`](https://github.com/fireblocks/java-sdk/pull/101) - -## [v10.3.0](https://github.com/fireblocks/java-sdk/compare/v10.2.0...v10.3.0) - 2025-06-18 - -### Merged - -- Generated SDK #4009 [`#99`](https://github.com/fireblocks/java-sdk/pull/99) - -## [v10.2.0](https://github.com/fireblocks/java-sdk/compare/v10.1.1...v10.2.0) - 2025-06-04 - -### Merged - -- Generated SDK #8912 [`#98`](https://github.com/fireblocks/java-sdk/pull/98) - -## [v10.1.1](https://github.com/fireblocks/java-sdk/compare/v10.1.0...v10.1.1) - 2025-05-18 - -### Merged - -- Generated SDK #5019 [`#97`](https://github.com/fireblocks/java-sdk/pull/97) - -## [v10.1.0](https://github.com/fireblocks/java-sdk/compare/v10.0.2...v10.1.0) - 2025-05-07 - -### Merged - -- Generated SDK #7076 [`#95`](https://github.com/fireblocks/java-sdk/pull/95) - -## [v10.0.2](https://github.com/fireblocks/java-sdk/compare/v10.0.1...v10.0.2) - 2025-04-20 - -### Merged - -- Generated SDK #4794 [`#94`](https://github.com/fireblocks/java-sdk/pull/94) - -## [v10.0.1](https://github.com/fireblocks/java-sdk/compare/v10.0.0...v10.0.1) - 2025-04-07 - -### Merged - -- Generated SDK #3065 [`#93`](https://github.com/fireblocks/java-sdk/pull/93) - -## [v10.0.0](https://github.com/fireblocks/java-sdk/compare/v9.0.0...v10.0.0) - 2025-03-30 - -### Merged - -- Generated SDK #619 [`#90`](https://github.com/fireblocks/java-sdk/pull/90) - -## [v9.0.0](https://github.com/fireblocks/java-sdk/compare/v8.1.0...v9.0.0) - 2025-03-17 - -### Merged - -- Generated SDK #645 [`#89`](https://github.com/fireblocks/java-sdk/pull/89) - -## [v8.1.0](https://github.com/fireblocks/java-sdk/compare/v8.0.1...v8.1.0) - 2025-02-24 - -### Merged - -- Generated SDK #9833 [`#84`](https://github.com/fireblocks/java-sdk/pull/84) - -## [v8.0.1](https://github.com/fireblocks/java-sdk/compare/v8.0.0...v8.0.1) - 2025-02-12 - -### Merged - -- Generated SDK #4262 [`#82`](https://github.com/fireblocks/java-sdk/pull/82) - -## [v8.0.0](https://github.com/fireblocks/java-sdk/compare/v7.0.0...v8.0.0) - 2025-02-02 - -### Merged - -- Generated SDK #538 [`#80`](https://github.com/fireblocks/java-sdk/pull/80) - -## [v7.0.0](https://github.com/fireblocks/java-sdk/compare/v6.0.0...v7.0.0) - 2025-01-08 - -### Merged - -- Generated SDK #8699 [`#77`](https://github.com/fireblocks/java-sdk/pull/77) - -## [v6.0.0](https://github.com/fireblocks/java-sdk/compare/v5.0.0...v6.0.0) - 2024-12-05 - -### Merged - -- Generated SDK #1430 [`#73`](https://github.com/fireblocks/java-sdk/pull/73) - -## [v5.0.0](https://github.com/fireblocks/java-sdk/compare/v4.0.0...v5.0.0) - 2024-10-31 - -### Merged - -- Generated SDK #5184 [`#71`](https://github.com/fireblocks/java-sdk/pull/71) - -## [v4.0.0](https://github.com/fireblocks/java-sdk/compare/v3.1.0...v4.0.0) - 2024-09-17 - -### Merged - -- Generated SDK #237 [`#70`](https://github.com/fireblocks/java-sdk/pull/70) - -## [v3.1.0](https://github.com/fireblocks/java-sdk/compare/v3.0.0...v3.1.0) - 2024-07-25 - -### Merged - -- Generated SDK #6749 [`#67`](https://github.com/fireblocks/java-sdk/pull/67) - -## [v3.0.0](https://github.com/fireblocks/java-sdk/compare/v2.1.0...v3.0.0) - 2024-07-17 - -### Merged - -- Generated SDK #6152 [`#65`](https://github.com/fireblocks/java-sdk/pull/65) -- Generated SDK #7984 [`#62`](https://github.com/fireblocks/java-sdk/pull/62) -- Generated SDK #2873 [`#61`](https://github.com/fireblocks/java-sdk/pull/61) - -## [v2.1.0](https://github.com/fireblocks/java-sdk/compare/v2.0.1...v2.1.0) - 2024-06-04 - -### Merged - -- Generated SDK for version COR-46191/fix_pipelines [`#24`](https://github.com/fireblocks/java-sdk/pull/24) -- Generated SDK for version COR-46191/fix_pipelines [`#23`](https://github.com/fireblocks/java-sdk/pull/23) -- Generated SDK for version COR-46191/fix_pipelines [`#22`](https://github.com/fireblocks/java-sdk/pull/22) -- Generated SDK for version COR-46191/fix_pipelines [`#21`](https://github.com/fireblocks/java-sdk/pull/21) - -## [v2.0.1](https://github.com/fireblocks/java-sdk/compare/v2.0.0...v2.0.1) - 2024-06-04 - -### Merged - -- Generated SDK for version COR-46191/fix_pipelines [`#20`](https://github.com/fireblocks/java-sdk/pull/20) - -## [v2.0.0](https://github.com/fireblocks/java-sdk/compare/v1.1.0...v2.0.0) - 2024-05-08 - -### Merged - -- feat: add tokenization api [`#12`](https://github.com/fireblocks/java-sdk/pull/12) - -## [v1.1.0](https://github.com/fireblocks/java-sdk/compare/v1.0.1...v1.1.0) - 2024-04-17 - -### Merged - -- feat: add cosigners beta api [`#11`](https://github.com/fireblocks/java-sdk/pull/11) -- fix: fix readme doc headline [`#10`](https://github.com/fireblocks/java-sdk/pull/10) - -## [v1.0.1](https://github.com/fireblocks/java-sdk/compare/v1.0.0...v1.0.1) - 2024-04-07 - -### Merged - -- Generated SDK for version v1.0.1 [`#9`](https://github.com/fireblocks/java-sdk/pull/9) - -## v1.0.0 - 2024-04-07 - -### Merged - -- Generated SDK for version v1.0.0 GA [`#8`](https://github.com/fireblocks/java-sdk/pull/8) -- v0.0.1-beta [`#6`](https://github.com/fireblocks/java-sdk/pull/6) -- Update GitHub Actions workflows [`#5`](https://github.com/fireblocks/java-sdk/pull/5) -- Generated #1189972817 [`#3`](https://github.com/fireblocks/java-sdk/pull/3) -- Add installation instructions [`#2`](https://github.com/fireblocks/java-sdk/pull/2) -- Added Idempotency & NCW headers support #6 [`#1`](https://github.com/fireblocks/java-sdk/pull/1) diff --git a/README.md b/README.md index 1ec376d6..3ebfdf01 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add this dependency to your project's POM: com.fireblocks.sdk fireblocks-sdk - 27.0.0 + 0.0.0 compile ``` @@ -42,7 +42,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.fireblocks.sdk:fireblocks-sdk:27.0.0" +compile "com.fireblocks.sdk:fireblocks-sdk:0.0.0" ``` ### Others @@ -55,7 +55,7 @@ mvn clean package Then manually install the following JARs: -- `target/fireblocks-sdk-27.0.0.jar` +- `target/fireblocks-sdk-0.0.0.jar` - `target/lib/*.jar` @@ -385,7 +385,9 @@ Class | Method | HTTP request | Description *ReportsBetaApi* | [**getReport**](docs/ReportsBetaApi.md#getReport) | **GET** /reports/{reportId} | Get report status *ReportsBetaApi* | [**listReports**](docs/ReportsBetaApi.md#listReports) | **GET** /reports | List reports *ResetDeviceApi* | [**resetDevice**](docs/ResetDeviceApi.md#resetDevice) | **POST** /management/users/{id}/reset_device | Resets device +*SecurityPostureManagementApi* | [**getSecurityFindingById**](docs/SecurityPostureManagementApi.md#getSecurityFindingById) | **GET** /security/fspm/findings/{id} | Get a FSPM security finding by ID *SecurityPostureManagementApi* | [**getSecurityFindings**](docs/SecurityPostureManagementApi.md#getSecurityFindings) | **GET** /security/fspm/findings | Get FSPM security findings +*SecurityPostureManagementApi* | [**updateSecurityFindingById**](docs/SecurityPostureManagementApi.md#updateSecurityFindingById) | **PATCH** /security/fspm/findings/{id} | Update a FSPM security finding by ID *SmartTransferApi* | [**approveDvPTicketTerm**](docs/SmartTransferApi.md#approveDvPTicketTerm) | **PUT** /smart_transfers/{ticketId}/terms/{termId}/dvp/approve | Set funding source and approval *SmartTransferApi* | [**cancelTicket**](docs/SmartTransferApi.md#cancelTicket) | **PUT** /smart-transfers/{ticketId}/cancel | Cancel Ticket *SmartTransferApi* | [**createTicket**](docs/SmartTransferApi.md#createTicket) | **POST** /smart-transfers | Create Ticket @@ -600,6 +602,7 @@ Class | Method | HTTP request | Description - [APIUser](docs/APIUser.md) - [AbaPaymentInfo](docs/AbaPaymentInfo.md) - [AbiFunction](docs/AbiFunction.md) + - [AcceptFindingRequest](docs/AcceptFindingRequest.md) - [AccessRegistryAddressItem](docs/AccessRegistryAddressItem.md) - [AccessRegistryCurrentStateResponse](docs/AccessRegistryCurrentStateResponse.md) - [AccessRegistryCurrentStateResponse2](docs/AccessRegistryCurrentStateResponse2.md) @@ -785,6 +788,7 @@ Class | Method | HTTP request | Description - [CollectionTokenMetadataAttributeDto](docs/CollectionTokenMetadataAttributeDto.md) - [CollectionTokenMetadataDto](docs/CollectionTokenMetadataDto.md) - [CollectionType](docs/CollectionType.md) + - [ComplianceRequirement](docs/ComplianceRequirement.md) - [ComplianceResultFullPayload](docs/ComplianceResultFullPayload.md) - [ComplianceResultStatusesEnum](docs/ComplianceResultStatusesEnum.md) - [ComplianceResults](docs/ComplianceResults.md) @@ -1341,6 +1345,7 @@ Class | Method | HTTP request | Description - [RenameConnectedAccountResponse](docs/RenameConnectedAccountResponse.md) - [RenameCosigner](docs/RenameCosigner.md) - [RenameVaultAccountResponse](docs/RenameVaultAccountResponse.md) + - [ReopenFindingRequest](docs/ReopenFindingRequest.md) - [ReportConflictResponse](docs/ReportConflictResponse.md) - [ReportJob](docs/ReportJob.md) - [ReportJobLinks](docs/ReportJobLinks.md) @@ -1407,6 +1412,7 @@ Class | Method | HTTP request | Description - [ScreeningVerdictMatchedRule](docs/ScreeningVerdictMatchedRule.md) - [SearchNetworkIdsResponse](docs/SearchNetworkIdsResponse.md) - [SecurityFinding](docs/SecurityFinding.md) + - [SecurityFindingDetailed](docs/SecurityFindingDetailed.md) - [SepaPaymentInfo](docs/SepaPaymentInfo.md) - [SessionDTO](docs/SessionDTO.md) - [SessionMetadata](docs/SessionMetadata.md) @@ -1726,6 +1732,7 @@ Class | Method | HTTP request | Description - [UpdateCallbackHandlerResponse](docs/UpdateCallbackHandlerResponse.md) - [UpdateCounterpartyGroupRequest](docs/UpdateCounterpartyGroupRequest.md) - [UpdateDraftRequest](docs/UpdateDraftRequest.md) + - [UpdateFindingExternalRequest](docs/UpdateFindingExternalRequest.md) - [UpdateLegalEntityRequest](docs/UpdateLegalEntityRequest.md) - [UpdateTagRequest](docs/UpdateTagRequest.md) - [UpdateTokenOwnershipStatusDto](docs/UpdateTokenOwnershipStatusDto.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 53e24a94..1a44c2b0 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -19303,7 +19303,7 @@ paths: get: description: | Returns a paginated list of FSPM security findings for the workspace. - Endpoint Permissions: Security Admin, Security Auditor. + Endpoint Roles: Security Admin, Security Auditor. operationId: getSecurityFindings parameters: - description: Cursor indicating the page position. Omit to fetch the first @@ -19350,10 +19350,6 @@ paths: schema: enum: - USER_MANAGEMENT - - ACCESS_CONTROL - - ADMIN_MANAGEMENT - - SECURITY - - CONFIGURATION - APPROVAL_GROUP_MANAGEMENT - POLICY_ENGINE_UTILIZATION - WORKSPACE_CONFIGURATION @@ -19464,6 +19460,142 @@ paths: \ page_size, severity, category, status);" x-accepts: - application/json + /security/fspm/findings/{id}: + get: + description: | + Returns a single FSPM security finding for the workspace, redacted to the public field set. + Endpoint Roles: Security Admin, Security Auditor. + operationId: getSecurityFindingById + parameters: + - description: Unique identifier of the finding + example: d7ca6101-a65e-4a9c-b6c1-b8bd697e0cd2 + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SecurityFindingDetailed" + description: A single FSPM finding + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Get a FSPM security finding by ID + tags: + - Security Posture Management + x-rate-limit-category: query + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.securityPostureManagement.getSecurityFindingById(securityPostureManagementApiGetSecurityFindingByIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = + fireblocks.securityPostureManagement().getSecurityFindingById(id); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.security_posture_management.get_security_finding_by_id(id); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.securityPostureManagement.getSecurityFindingById(securityPostureManagementApiGetSecurityFindingByIdRequest);" + - lang: Java + source: CompletableFuture> response = + fireblocks.securityPostureManagement().getSecurityFindingById(id); + - lang: Python + source: response = fireblocks.security_posture_management.get_security_finding_by_id(id); + x-accepts: + - application/json + patch: + description: | + Accepts or reopens a finding for the workspace. When accepting a finding + (`status: "ACCEPTED"`), `statusUpdatedReason` is required. + Endpoint Roles: Security Admin. + operationId: updateSecurityFindingById + parameters: + - description: Unique identifier of the finding + example: d7ca6101-a65e-4a9c-b6c1-b8bd697e0cd2 + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateFindingExternalRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SecurityFindingDetailed" + description: The updated FSPM finding + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Update a FSPM security finding by ID + tags: + - Security Posture Management + x-rate-limit-category: write + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.securityPostureManagement.updateSecurityFindingById(securityPostureManagementApiUpdateSecurityFindingByIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.securityPostureManagement().updateSecurityFindingById(updateFindingExternalRequest,\ + \ id, idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.security_posture_management.update_security_finding_by_id(update_finding_external_request,\ + \ id, idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.securityPostureManagement.updateSecurityFindingById(securityPostureManagementApiUpdateSecurityFindingByIdRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.securityPostureManagement().updateSecurityFindingById(updateFindingExternalRequest,\ + \ id, idempotencyKey);" + - lang: Python + source: "response = fireblocks.security_posture_management.update_security_finding_by_id(update_finding_external_request,\ + \ id, idempotency_key);" + x-content-type: application/json + x-accepts: + - application/json /smart_transfers/{ticketId}/dvp/fund: put: description: Create or fulfill dvp ticket order @@ -82075,10 +82207,6 @@ components: description: Category of the finding enum: - USER_MANAGEMENT - - ACCESS_CONTROL - - ADMIN_MANAGEMENT - - SECURITY - - CONFIGURATION - APPROVAL_GROUP_MANAGEMENT - POLICY_ENGINE_UTILIZATION - WORKSPACE_CONFIGURATION @@ -82122,6 +82250,255 @@ components: - data - total type: object + FindingInfo: + additionalProperties: + description: Arbitrary key-value metadata associated with the finding type + description: Additional structured context about the finding. Shape varies by + finding type. + example: + apiKey: e7c3f18c-3060-3748-3563-19c3dbb3fa88 + apiUserName: Security admin api + cosignerId: 02f53cfa-34a3-4393-a451-e13dfab3c157 + cosignerName: Production Co-Signer + type: object + ComplianceRequirement: + description: A compliance requirement associated with a finding + properties: + id: + description: Identifier of the compliance requirement + example: 19894318-338e-4304-848f-9388d140e703 + format: uuid + type: string + standard: + description: The compliance standard this requirement belongs to + example: SOC 2 + type: string + criteria: + description: The specific criteria within the compliance standard + example: CC7.1 + type: string + description: + description: "Human-readable description of the requirement, omitted if\ + \ not available" + example: Continuous monitoring and configuration baselines + type: string + required: + - criteria + - id + - standard + type: object + SecurityFindingDetailed: + description: "A single FSPM finding, redacted to the public field set" + example: + severity: HIGH + mitigationGuidance: "Add a callback implementation to the API user. Alternatively,\ + \ if the API user is no longer needed, you can delete it. To do so, go to\ + \ Developer Center > API Users, click the actions button (3 dots) next to\ + \ the API user, and select Delete. Note that by default this action can\ + \ only be performed by the workspace owner." + statusUpdatedByUserId: 00d77437-3e7a-4e39-8482-55115a7a0892 + riskExplanation: "An API user that is paired with a co-signer and does not\ + \ have a callback implementation is vulnerable to auto-approving, allowing\ + \ malicious transactions to proceed without review." + statusUpdatedAt: 2026-08-16T08:52:57Z + complianceReqs: [] + type: API_COSIGNER_WITH_NO_CALLBACK + title: The API user 'Security admin api' is paired with a co-signer and has + no callback + createdAt: 2026-07-28T11:37:05Z + statusUpdatedReason: "False positive, callback is configured via a different\ + \ mechanism" + id: d7ca6101-a65e-4a9c-b6c1-b8bd697e0cd2 + category: USER_MANAGEMENT + status: OPEN + info: + apiKey: e7c3f18c-3060-3748-3563-19c3dbb3fa88 + apiUserName: Security admin api + cosignerId: 02f53cfa-34a3-4393-a451-e13dfab3c157 + cosignerName: Production Co-Signer + properties: + id: + description: Unique identifier of the finding + example: d7ca6101-a65e-4a9c-b6c1-b8bd697e0cd2 + format: uuid + type: string + type: + description: The finding type identifier + enum: + - API_USER_NOT_WHITELISTED + - CONSOLE_IP_ALLOWLIST_DEACTIVATED + - ADMIN_TH_SET_TO_ALL_AND_MORE_THAN_2_ADMINS + - API_USERS_COUNT_PASSES_TH_AND_OWNER_NOT_MANDATORY + - API_COSIGNER_WITH_NO_CALLBACK + - API_USER_DIDNT_APPROVE_CCR_IN_X_DAYS + - NON_VIEWER_DIDNT_INITIATE_APPROVE_OR_SIGN_TX_OR_CCR_LAST_X_DAYS + - TH_SET_TO_1_AND_MORE_THAN_3_APPROVERS + - ADMIN_TH_SET_TO_1_AND_MORE_THAN_3_ADMINS + - NON_EVM_DAPP_CONNECTIONS_ENABLED_BUT_UNUSED + - OTA_ENABLED_BUT_UNUSED + - POLICY_NOT_UPDATED_RECENTLY + - RAW_SIGNING_ENABLED_BUT_UNUSED + - API_USER_UNUSED_FOR_90_DAYS + - UNUSED_UNLIMITED_TOKEN_ALLOWANCES + - UNUSED_WHITELISTED_ADDRESS + - TRANSACTION_REPETITION_ATTACK + - USER_EMAIL_DOMAIN_NON_BUSINESS + - OUTDATED_MOBILE_APP_VERSION + - SINGLE_HOP_DRAIN_ATTACK + - LATERAL_MOVEMENT_DRAIN_ATTACK + - WORKSPACE_USER_DORMANT_FOR_X_DAYS + example: API_COSIGNER_WITH_NO_CALLBACK + type: string + status: + description: Current status of the finding + enum: + - OPEN + - ACCEPTED + - RESOLVED + example: OPEN + type: string + severity: + description: Severity level of the finding + enum: + - INFO + - LOW + - MEDIUM + - HIGH + example: HIGH + type: string + category: + description: Category of the finding + enum: + - USER_MANAGEMENT + - APPROVAL_GROUP_MANAGEMENT + - POLICY_ENGINE_UTILIZATION + - WORKSPACE_CONFIGURATION + - DEFI_ACCESS + - FLEET_MANAGEMENT + example: USER_MANAGEMENT + type: string + createdAt: + description: When the finding was first detected + example: 2026-07-28T11:37:05Z + format: date-time + type: string + title: + description: Human-readable title of the finding + example: The API user 'Security admin api' is paired with a co-signer and + has no callback + type: string + statusUpdatedAt: + description: "When the finding status was last updated, omitted if the status\ + \ was never updated" + example: 2026-08-16T08:52:57Z + format: date-time + type: string + statusUpdatedByUserId: + description: "The user who last updated the finding status, omitted if the\ + \ status was never updated" + example: 00d77437-3e7a-4e39-8482-55115a7a0892 + format: uuid + type: string + statusUpdatedReason: + description: "The reason provided for the last status update, omitted if\ + \ none was provided" + example: "False positive, callback is configured via a different mechanism" + type: string + info: + additionalProperties: + description: Arbitrary key-value metadata associated with the finding + type + description: Additional structured context about the finding. Shape varies + by finding type. + example: + apiKey: e7c3f18c-3060-3748-3563-19c3dbb3fa88 + apiUserName: Security admin api + cosignerId: 02f53cfa-34a3-4393-a451-e13dfab3c157 + cosignerName: Production Co-Signer + type: object + complianceReqs: + description: Compliance requirements this finding relates to + example: [] + items: + $ref: "#/components/schemas/ComplianceRequirement" + type: array + riskExplanation: + description: Explanation of the risk this finding represents + example: "An API user that is paired with a co-signer and does not have\ + \ a callback implementation is vulnerable to auto-approving, allowing\ + \ malicious transactions to proceed without review." + type: string + mitigationGuidance: + description: Guidance on how to mitigate this finding + example: "Add a callback implementation to the API user. Alternatively,\ + \ if the API user is no longer needed, you can delete it. To do so, go\ + \ to Developer Center > API Users, click the actions button (3 dots) next\ + \ to the API user, and select Delete. Note that by default this action\ + \ can only be performed by the workspace owner." + type: string + required: + - category + - complianceReqs + - createdAt + - id + - info + - mitigationGuidance + - riskExplanation + - severity + - status + - title + - type + type: object + AcceptFindingRequest: + description: Request to accept a FSPM finding. A reason is required. + example: + statusUpdatedReason: Risk accepted - compensating controls are in place + status: ACCEPTED + properties: + status: + description: Marks the finding as accepted. + enum: + - ACCEPTED + example: ACCEPTED + type: string + statusUpdatedReason: + description: The reason for accepting the finding. + example: Risk accepted - compensating controls are in place + minLength: 1 + type: string + required: + - status + - statusUpdatedReason + type: object + ReopenFindingRequest: + description: Request to reopen a FSPM finding. + properties: + status: + description: Marks the finding as open again. + enum: + - OPEN + example: OPEN + type: string + statusUpdatedReason: + description: Ignored when reopening a finding. + example: False positive - reviewed and confirmed no risk + type: string + required: + - status + type: object + UpdateFindingExternalRequest: + description: "Request to update the status of a FSPM finding. Only OPEN (reopen)\ + \ and ACCEPTED (accept) are settable; findings become RESOLVED via automated\ + \ detection, not through this API. `statusUpdatedReason` is required when\ + \ accepting a finding and ignored when reopening." + discriminator: + mapping: + ACCEPTED: "#/components/schemas/AcceptFindingRequest" + OPEN: "#/components/schemas/ReopenFindingRequest" + propertyName: status + oneOf: + - $ref: "#/components/schemas/AcceptFindingRequest" + - $ref: "#/components/schemas/ReopenFindingRequest" PolicyType: description: Policy type enumeration enum: diff --git a/build.gradle b/build.gradle index b55c9f84..d43e483e 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'eclipse' apply plugin: 'com.diffplug.spotless' group = 'com.fireblocks.sdk' -version = '27.0.0' +version = '0.0.0' buildscript { repositories { diff --git a/docs/AcceptFindingRequest.md b/docs/AcceptFindingRequest.md new file mode 100644 index 00000000..6237e8e9 --- /dev/null +++ b/docs/AcceptFindingRequest.md @@ -0,0 +1,23 @@ + + +# AcceptFindingRequest + +Request to accept a FSPM finding. A reason is required. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | [**StatusEnum**](#StatusEnum) | Marks the finding as accepted. | | +|**statusUpdatedReason** | **String** | The reason for accepting the finding. | | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| ACCEPTED | "ACCEPTED" | + + + diff --git a/docs/ComplianceRequirement.md b/docs/ComplianceRequirement.md new file mode 100644 index 00000000..10b16fe1 --- /dev/null +++ b/docs/ComplianceRequirement.md @@ -0,0 +1,17 @@ + + +# ComplianceRequirement + +A compliance requirement associated with a finding + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **UUID** | Identifier of the compliance requirement | | +|**standard** | **String** | The compliance standard this requirement belongs to | | +|**criteria** | **String** | The specific criteria within the compliance standard | | +|**description** | **String** | Human-readable description of the requirement, omitted if not available | [optional] | + + + diff --git a/docs/ReopenFindingRequest.md b/docs/ReopenFindingRequest.md new file mode 100644 index 00000000..8b8eb3f5 --- /dev/null +++ b/docs/ReopenFindingRequest.md @@ -0,0 +1,23 @@ + + +# ReopenFindingRequest + +Request to reopen a FSPM finding. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | [**StatusEnum**](#StatusEnum) | Marks the finding as open again. | | +|**statusUpdatedReason** | **String** | Ignored when reopening a finding. | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| OPEN | "OPEN" | + + + diff --git a/docs/SecurityFinding.md b/docs/SecurityFinding.md index 46c413e0..700118f5 100644 --- a/docs/SecurityFinding.md +++ b/docs/SecurityFinding.md @@ -73,10 +73,6 @@ A single FSPM finding | Name | Value | |---- | -----| | USER_MANAGEMENT | "USER_MANAGEMENT" | -| ACCESS_CONTROL | "ACCESS_CONTROL" | -| ADMIN_MANAGEMENT | "ADMIN_MANAGEMENT" | -| SECURITY | "SECURITY" | -| CONFIGURATION | "CONFIGURATION" | | APPROVAL_GROUP_MANAGEMENT | "APPROVAL_GROUP_MANAGEMENT" | | POLICY_ENGINE_UTILIZATION | "POLICY_ENGINE_UTILIZATION" | | WORKSPACE_CONFIGURATION | "WORKSPACE_CONFIGURATION" | diff --git a/docs/SecurityFindingDetailed.md b/docs/SecurityFindingDetailed.md new file mode 100644 index 00000000..fa015f79 --- /dev/null +++ b/docs/SecurityFindingDetailed.md @@ -0,0 +1,90 @@ + + +# SecurityFindingDetailed + +A single FSPM finding, redacted to the public field set + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **UUID** | Unique identifier of the finding | | +|**type** | [**TypeEnum**](#TypeEnum) | The finding type identifier | | +|**status** | [**StatusEnum**](#StatusEnum) | Current status of the finding | | +|**severity** | [**SeverityEnum**](#SeverityEnum) | Severity level of the finding | | +|**category** | [**CategoryEnum**](#CategoryEnum) | Category of the finding | | +|**createdAt** | **OffsetDateTime** | When the finding was first detected | | +|**title** | **String** | Human-readable title of the finding | | +|**statusUpdatedAt** | **OffsetDateTime** | When the finding status was last updated, omitted if the status was never updated | [optional] | +|**statusUpdatedByUserId** | **UUID** | The user who last updated the finding status, omitted if the status was never updated | [optional] | +|**statusUpdatedReason** | **String** | The reason provided for the last status update, omitted if none was provided | [optional] | +|**info** | **Map<String, Object>** | Additional structured context about the finding. Shape varies by finding type. | | +|**complianceReqs** | [**List<ComplianceRequirement>**](ComplianceRequirement.md) | Compliance requirements this finding relates to | | +|**riskExplanation** | **String** | Explanation of the risk this finding represents | | +|**mitigationGuidance** | **String** | Guidance on how to mitigate this finding | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| API_USER_NOT_WHITELISTED | "API_USER_NOT_WHITELISTED" | +| CONSOLE_IP_ALLOWLIST_DEACTIVATED | "CONSOLE_IP_ALLOWLIST_DEACTIVATED" | +| ADMIN_TH_SET_TO_ALL_AND_MORE_THAN_2_ADMINS | "ADMIN_TH_SET_TO_ALL_AND_MORE_THAN_2_ADMINS" | +| API_USERS_COUNT_PASSES_TH_AND_OWNER_NOT_MANDATORY | "API_USERS_COUNT_PASSES_TH_AND_OWNER_NOT_MANDATORY" | +| API_COSIGNER_WITH_NO_CALLBACK | "API_COSIGNER_WITH_NO_CALLBACK" | +| API_USER_DIDNT_APPROVE_CCR_IN_X_DAYS | "API_USER_DIDNT_APPROVE_CCR_IN_X_DAYS" | +| NON_VIEWER_DIDNT_INITIATE_APPROVE_OR_SIGN_TX_OR_CCR_LAST_X_DAYS | "NON_VIEWER_DIDNT_INITIATE_APPROVE_OR_SIGN_TX_OR_CCR_LAST_X_DAYS" | +| TH_SET_TO_1_AND_MORE_THAN_3_APPROVERS | "TH_SET_TO_1_AND_MORE_THAN_3_APPROVERS" | +| ADMIN_TH_SET_TO_1_AND_MORE_THAN_3_ADMINS | "ADMIN_TH_SET_TO_1_AND_MORE_THAN_3_ADMINS" | +| NON_EVM_DAPP_CONNECTIONS_ENABLED_BUT_UNUSED | "NON_EVM_DAPP_CONNECTIONS_ENABLED_BUT_UNUSED" | +| OTA_ENABLED_BUT_UNUSED | "OTA_ENABLED_BUT_UNUSED" | +| POLICY_NOT_UPDATED_RECENTLY | "POLICY_NOT_UPDATED_RECENTLY" | +| RAW_SIGNING_ENABLED_BUT_UNUSED | "RAW_SIGNING_ENABLED_BUT_UNUSED" | +| API_USER_UNUSED_FOR_90_DAYS | "API_USER_UNUSED_FOR_90_DAYS" | +| UNUSED_UNLIMITED_TOKEN_ALLOWANCES | "UNUSED_UNLIMITED_TOKEN_ALLOWANCES" | +| UNUSED_WHITELISTED_ADDRESS | "UNUSED_WHITELISTED_ADDRESS" | +| TRANSACTION_REPETITION_ATTACK | "TRANSACTION_REPETITION_ATTACK" | +| USER_EMAIL_DOMAIN_NON_BUSINESS | "USER_EMAIL_DOMAIN_NON_BUSINESS" | +| OUTDATED_MOBILE_APP_VERSION | "OUTDATED_MOBILE_APP_VERSION" | +| SINGLE_HOP_DRAIN_ATTACK | "SINGLE_HOP_DRAIN_ATTACK" | +| LATERAL_MOVEMENT_DRAIN_ATTACK | "LATERAL_MOVEMENT_DRAIN_ATTACK" | +| WORKSPACE_USER_DORMANT_FOR_X_DAYS | "WORKSPACE_USER_DORMANT_FOR_X_DAYS" | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| OPEN | "OPEN" | +| ACCEPTED | "ACCEPTED" | +| RESOLVED | "RESOLVED" | + + + +## Enum: SeverityEnum + +| Name | Value | +|---- | -----| +| INFO | "INFO" | +| LOW | "LOW" | +| MEDIUM | "MEDIUM" | +| HIGH | "HIGH" | + + + +## Enum: CategoryEnum + +| Name | Value | +|---- | -----| +| USER_MANAGEMENT | "USER_MANAGEMENT" | +| APPROVAL_GROUP_MANAGEMENT | "APPROVAL_GROUP_MANAGEMENT" | +| POLICY_ENGINE_UTILIZATION | "POLICY_ENGINE_UTILIZATION" | +| WORKSPACE_CONFIGURATION | "WORKSPACE_CONFIGURATION" | +| DEFI_ACCESS | "DEFI_ACCESS" | +| FLEET_MANAGEMENT | "FLEET_MANAGEMENT" | + + + diff --git a/docs/SecurityPostureManagementApi.md b/docs/SecurityPostureManagementApi.md index f6582915..07f6681a 100644 --- a/docs/SecurityPostureManagementApi.md +++ b/docs/SecurityPostureManagementApi.md @@ -4,17 +4,96 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| +| [**getSecurityFindingById**](SecurityPostureManagementApi.md#getSecurityFindingById) | **GET** /security/fspm/findings/{id} | Get a FSPM security finding by ID | | [**getSecurityFindings**](SecurityPostureManagementApi.md#getSecurityFindings) | **GET** /security/fspm/findings | Get FSPM security findings | +| [**updateSecurityFindingById**](SecurityPostureManagementApi.md#updateSecurityFindingById) | **PATCH** /security/fspm/findings/{id} | Update a FSPM security finding by ID | +## getSecurityFindingById + +> CompletableFuture> getSecurityFindingById getSecurityFindingById(id) + +Get a FSPM security finding by ID + +Returns a single FSPM security finding for the workspace, redacted to the public field set. Endpoint Roles: Security Admin, Security Auditor. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.SecurityPostureManagementApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + UUID id = UUID.fromString("d7ca6101-a65e-4a9c-b6c1-b8bd697e0cd2"); // UUID | Unique identifier of the finding + try { + CompletableFuture> response = fireblocks.securityPostureManagement().getSecurityFindingById(id); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling SecurityPostureManagementApi#getSecurityFindingById"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| Unique identifier of the finding | | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | A single FSPM finding | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + ## getSecurityFindings > CompletableFuture> getSecurityFindings getSecurityFindings(pageCursor, pageSize, severity, category, status) Get FSPM security findings -Returns a paginated list of FSPM security findings for the workspace. Endpoint Permissions: Security Admin, Security Auditor. +Returns a paginated list of FSPM security findings for the workspace. Endpoint Roles: Security Admin, Security Auditor. ### Example @@ -69,7 +148,7 @@ public class Example { | **pageCursor** | **String**| Cursor indicating the page position. Omit to fetch the first page. | [optional] | | **pageSize** | **Integer**| Number of results per page | [optional] [default to 10] | | **severity** | **String**| Filter by severity level | [optional] [enum: INFO, LOW, MEDIUM, HIGH] | -| **category** | **String**| Filter by finding category | [optional] [enum: USER_MANAGEMENT, ACCESS_CONTROL, ADMIN_MANAGEMENT, SECURITY, CONFIGURATION, APPROVAL_GROUP_MANAGEMENT, POLICY_ENGINE_UTILIZATION, WORKSPACE_CONFIGURATION, DEFI_ACCESS, FLEET_MANAGEMENT] | +| **category** | **String**| Filter by finding category | [optional] [enum: USER_MANAGEMENT, APPROVAL_GROUP_MANAGEMENT, POLICY_ENGINE_UTILIZATION, WORKSPACE_CONFIGURATION, DEFI_ACCESS, FLEET_MANAGEMENT] | | **status** | **String**| Filter by finding status | [optional] [enum: OPEN, ACCEPTED, RESOLVED] | ### Return type @@ -97,3 +176,84 @@ No authorization required | **5XX** | Internal error. | * X-Request-ID -
| | **0** | Error Response | * X-Request-ID -
| + +## updateSecurityFindingById + +> CompletableFuture> updateSecurityFindingById updateSecurityFindingById(updateFindingExternalRequest, id, idempotencyKey) + +Update a FSPM security finding by ID + +Accepts or reopens a finding for the workspace. When accepting a finding (`status: \"ACCEPTED\"`), `statusUpdatedReason` is required. Endpoint Roles: Security Admin. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.SecurityPostureManagementApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + UpdateFindingExternalRequest updateFindingExternalRequest = new UpdateFindingExternalRequest(); // UpdateFindingExternalRequest | + UUID id = UUID.fromString("d7ca6101-a65e-4a9c-b6c1-b8bd697e0cd2"); // UUID | Unique identifier of the finding + String idempotencyKey = "idempotencyKey_example"; // String | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + try { + CompletableFuture> response = fireblocks.securityPostureManagement().updateSecurityFindingById(updateFindingExternalRequest, id, idempotencyKey); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling SecurityPostureManagementApi#updateSecurityFindingById"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **updateFindingExternalRequest** | [**UpdateFindingExternalRequest**](UpdateFindingExternalRequest.md)| | | +| **id** | **UUID**| Unique identifier of the finding | | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The updated FSPM finding | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + diff --git a/docs/UpdateFindingExternalRequest.md b/docs/UpdateFindingExternalRequest.md new file mode 100644 index 00000000..8c5025e3 --- /dev/null +++ b/docs/UpdateFindingExternalRequest.md @@ -0,0 +1,39 @@ + + +# UpdateFindingExternalRequest + +Request to update the status of a FSPM finding. Only OPEN (reopen) and ACCEPTED (accept) are settable; findings become RESOLVED via automated detection, not through this API. `statusUpdatedReason` is required when accepting a finding and ignored when reopening. + +## oneOf schemas +* [AcceptFindingRequest](AcceptFindingRequest.md) +* [ReopenFindingRequest](ReopenFindingRequest.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.UpdateFindingExternalRequest; +import com.fireblocks.sdk.model.AcceptFindingRequest; +import com.fireblocks.sdk.model.ReopenFindingRequest; + +public class Example { + public static void main(String[] args) { + UpdateFindingExternalRequest exampleUpdateFindingExternalRequest = new UpdateFindingExternalRequest(); + + // create a new AcceptFindingRequest + AcceptFindingRequest exampleAcceptFindingRequest = new AcceptFindingRequest(); + // set UpdateFindingExternalRequest to AcceptFindingRequest + exampleUpdateFindingExternalRequest.setActualInstance(exampleAcceptFindingRequest); + // to get back the AcceptFindingRequest set earlier + AcceptFindingRequest testAcceptFindingRequest = (AcceptFindingRequest) exampleUpdateFindingExternalRequest.getActualInstance(); + + // create a new ReopenFindingRequest + ReopenFindingRequest exampleReopenFindingRequest = new ReopenFindingRequest(); + // set UpdateFindingExternalRequest to ReopenFindingRequest + exampleUpdateFindingExternalRequest.setActualInstance(exampleReopenFindingRequest); + // to get back the ReopenFindingRequest set earlier + ReopenFindingRequest testReopenFindingRequest = (ReopenFindingRequest) exampleUpdateFindingExternalRequest.getActualInstance(); + } +} +``` + + diff --git a/pom.xml b/pom.xml index 7290a3c6..5c58d835 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 27.0.0 + 0.0.0 https://github.com/fireblocks/java-sdk The Fireblocks Official SDK is a comprehensive software development kit that enables seamless integration and interaction with the Fireblocks platform. Fireblocks is a cutting-edge blockchain infrastructure platform that provides secure and scalable solutions for managing digital assets and transactions. This SDK empowers developers to build robust applications that can interact with the Fireblocks platform's features, including creating and managing vault accounts, initiating secure transactions, managing assets, and more. It abstracts complex interactions with the Fireblocks API, making it easier for developers to leverage the platform's capabilities while adhering to best practices in security and efficiency. diff --git a/src/main/java/com/fireblocks/sdk/Configuration.java b/src/main/java/com/fireblocks/sdk/Configuration.java index f83ba271..aa53bae8 100644 --- a/src/main/java/com/fireblocks/sdk/Configuration.java +++ b/src/main/java/com/fireblocks/sdk/Configuration.java @@ -21,7 +21,7 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") public class Configuration { - public static final String VERSION = "27.0.0"; + public static final String VERSION = "0.0.0"; private static final AtomicReference defaultApiClient = new AtomicReference<>(); private static volatile Supplier apiClientFactory = ApiClient::new; diff --git a/src/main/java/com/fireblocks/sdk/api/SecurityPostureManagementApi.java b/src/main/java/com/fireblocks/sdk/api/SecurityPostureManagementApi.java index 8cb85c51..23f19489 100644 --- a/src/main/java/com/fireblocks/sdk/api/SecurityPostureManagementApi.java +++ b/src/main/java/com/fireblocks/sdk/api/SecurityPostureManagementApi.java @@ -19,7 +19,10 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.Pair; +import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.GetFindingsExternalResponse; +import com.fireblocks.sdk.model.SecurityFindingDetailed; +import com.fireblocks.sdk.model.UpdateFindingExternalRequest; import java.io.IOException; import java.io.InputStream; import java.net.URI; @@ -30,6 +33,7 @@ import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; +import java.util.UUID; import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionException; @@ -98,9 +102,84 @@ private String formatExceptionMessage(String operationId, int statusCode, String return operationId + " call failed with: " + statusCode + " - " + body; } + /** + * Get a FSPM security finding by ID Returns a single FSPM security finding for the workspace, + * redacted to the public field set. Endpoint Roles: Security Admin, Security Auditor. + * + * @param id Unique identifier of the finding (required) + * @return CompletableFuture<ApiResponse<SecurityFindingDetailed>>, which completes + * exceptionally with an {@link ApiException} if the API call fails + */ + public CompletableFuture> getSecurityFindingById(UUID id) { + try { + HttpRequest.Builder localVarRequestBuilder = getSecurityFindingByIdRequestBuilder(id); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException( + "getSecurityFindingById", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + SecurityFindingDetailed>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getSecurityFindingByIdRequestBuilder(UUID id) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("getSecurityFindingById", "id", id.toString()); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/security/fspm/findings/{id}".replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } /** * Get FSPM security findings Returns a paginated list of FSPM security findings for the - * workspace. Endpoint Permissions: Security Admin, Security Auditor. + * workspace. Endpoint Roles: Security Admin, Security Auditor. * * @param pageCursor Cursor indicating the page position. Omit to fetch the first page. * (optional) @@ -205,4 +284,109 @@ private HttpRequest.Builder getSecurityFindingsRequestBuilder( } return localVarRequestBuilder; } + /** + * Update a FSPM security finding by ID Accepts or reopens a finding for the workspace. When + * accepting a finding (`status: \"ACCEPTED\"`), + * `statusUpdatedReason` is required. Endpoint Roles: Security Admin. + * + * @param updateFindingExternalRequest (required) + * @param id Unique identifier of the finding (required) + * @param idempotencyKey A unique identifier for the request. If the request is sent multiple + * times with the same idempotency key, the server will return the same response as the + * first request. The idempotency key is valid for 24 hours. (optional) + * @return CompletableFuture<ApiResponse<SecurityFindingDetailed>>, which completes + * exceptionally with an {@link ApiException} if the API call fails + */ + public CompletableFuture> updateSecurityFindingById( + UpdateFindingExternalRequest updateFindingExternalRequest, + UUID id, + String idempotencyKey) { + try { + HttpRequest.Builder localVarRequestBuilder = + updateSecurityFindingByIdRequestBuilder( + updateFindingExternalRequest, id, idempotencyKey); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException( + "updateSecurityFindingById", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + SecurityFindingDetailed>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder updateSecurityFindingByIdRequestBuilder( + UpdateFindingExternalRequest updateFindingExternalRequest, + UUID id, + String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "updateSecurityFindingById", + "updateFindingExternalRequest", + updateFindingExternalRequest); + ValidationUtils.assertParamExistsAndNotEmpty( + "updateSecurityFindingById", "id", id.toString()); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/security/fspm/findings/{id}".replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = + memberVarObjectMapper.writeValueAsBytes(updateFindingExternalRequest); + localVarRequestBuilder.method( + "PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } } diff --git a/src/main/java/com/fireblocks/sdk/model/AcceptFindingRequest.java b/src/main/java/com/fireblocks/sdk/model/AcceptFindingRequest.java new file mode 100644 index 00000000..d0d574a1 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AcceptFindingRequest.java @@ -0,0 +1,227 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** Request to accept a FSPM finding. A reason is required. */ +@JsonPropertyOrder({ + AcceptFindingRequest.JSON_PROPERTY_STATUS, + AcceptFindingRequest.JSON_PROPERTY_STATUS_UPDATED_REASON +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class AcceptFindingRequest { + /** Marks the finding as accepted. */ + public enum StatusEnum { + ACCEPTED(String.valueOf("ACCEPTED")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @jakarta.annotation.Nonnull private StatusEnum status; + + public static final String JSON_PROPERTY_STATUS_UPDATED_REASON = "statusUpdatedReason"; + @jakarta.annotation.Nonnull private String statusUpdatedReason; + + public AcceptFindingRequest() {} + + @JsonCreator + public AcceptFindingRequest( + @JsonProperty(value = JSON_PROPERTY_STATUS, required = true) StatusEnum status, + @JsonProperty(value = JSON_PROPERTY_STATUS_UPDATED_REASON, required = true) + String statusUpdatedReason) { + this.status = status; + this.statusUpdatedReason = statusUpdatedReason; + } + + public AcceptFindingRequest status(@jakarta.annotation.Nonnull StatusEnum status) { + this.status = status; + return this; + } + + /** + * Marks the finding as accepted. + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusEnum getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@jakarta.annotation.Nonnull StatusEnum status) { + this.status = status; + } + + public AcceptFindingRequest statusUpdatedReason( + @jakarta.annotation.Nonnull String statusUpdatedReason) { + this.statusUpdatedReason = statusUpdatedReason; + return this; + } + + /** + * The reason for accepting the finding. + * + * @return statusUpdatedReason + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS_UPDATED_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatusUpdatedReason() { + return statusUpdatedReason; + } + + @JsonProperty(JSON_PROPERTY_STATUS_UPDATED_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatusUpdatedReason(@jakarta.annotation.Nonnull String statusUpdatedReason) { + this.statusUpdatedReason = statusUpdatedReason; + } + + /** Return true if this AcceptFindingRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AcceptFindingRequest acceptFindingRequest = (AcceptFindingRequest) o; + return Objects.equals(this.status, acceptFindingRequest.status) + && Objects.equals( + this.statusUpdatedReason, acceptFindingRequest.statusUpdatedReason); + } + + @Override + public int hashCode() { + return Objects.hash(status, statusUpdatedReason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AcceptFindingRequest {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" statusUpdatedReason: ") + .append(toIndentedString(statusUpdatedReason)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `statusUpdatedReason` to the URL query string + if (getStatusUpdatedReason() != null) { + joiner.add( + String.format( + "%sstatusUpdatedReason%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getStatusUpdatedReason())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ComplianceRequirement.java b/src/main/java/com/fireblocks/sdk/model/ComplianceRequirement.java new file mode 100644 index 00000000..6413522f --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ComplianceRequirement.java @@ -0,0 +1,268 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** A compliance requirement associated with a finding */ +@JsonPropertyOrder({ + ComplianceRequirement.JSON_PROPERTY_ID, + ComplianceRequirement.JSON_PROPERTY_STANDARD, + ComplianceRequirement.JSON_PROPERTY_CRITERIA, + ComplianceRequirement.JSON_PROPERTY_DESCRIPTION +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ComplianceRequirement { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull private UUID id; + + public static final String JSON_PROPERTY_STANDARD = "standard"; + @jakarta.annotation.Nonnull private String standard; + + public static final String JSON_PROPERTY_CRITERIA = "criteria"; + @jakarta.annotation.Nonnull private String criteria; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @jakarta.annotation.Nullable private String description; + + public ComplianceRequirement() {} + + @JsonCreator + public ComplianceRequirement( + @JsonProperty(value = JSON_PROPERTY_ID, required = true) UUID id, + @JsonProperty(value = JSON_PROPERTY_STANDARD, required = true) String standard, + @JsonProperty(value = JSON_PROPERTY_CRITERIA, required = true) String criteria) { + this.id = id; + this.standard = standard; + this.criteria = criteria; + } + + public ComplianceRequirement id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Identifier of the compliance requirement + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + public ComplianceRequirement standard(@jakarta.annotation.Nonnull String standard) { + this.standard = standard; + return this; + } + + /** + * The compliance standard this requirement belongs to + * + * @return standard + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STANDARD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStandard() { + return standard; + } + + @JsonProperty(JSON_PROPERTY_STANDARD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStandard(@jakarta.annotation.Nonnull String standard) { + this.standard = standard; + } + + public ComplianceRequirement criteria(@jakarta.annotation.Nonnull String criteria) { + this.criteria = criteria; + return this; + } + + /** + * The specific criteria within the compliance standard + * + * @return criteria + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CRITERIA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCriteria() { + return criteria; + } + + @JsonProperty(JSON_PROPERTY_CRITERIA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCriteria(@jakarta.annotation.Nonnull String criteria) { + this.criteria = criteria; + } + + public ComplianceRequirement description(@jakarta.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Human-readable description of the requirement, omitted if not available + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = description; + } + + /** Return true if this ComplianceRequirement object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ComplianceRequirement complianceRequirement = (ComplianceRequirement) o; + return Objects.equals(this.id, complianceRequirement.id) + && Objects.equals(this.standard, complianceRequirement.standard) + && Objects.equals(this.criteria, complianceRequirement.criteria) + && Objects.equals(this.description, complianceRequirement.description); + } + + @Override + public int hashCode() { + return Objects.hash(id, standard, criteria, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ComplianceRequirement {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" standard: ").append(toIndentedString(standard)).append("\n"); + sb.append(" criteria: ").append(toIndentedString(criteria)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add( + String.format( + "%sid%s=%s", + prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `standard` to the URL query string + if (getStandard() != null) { + joiner.add( + String.format( + "%sstandard%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getStandard())))); + } + + // add `criteria` to the URL query string + if (getCriteria() != null) { + joiner.add( + String.format( + "%scriteria%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getCriteria())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add( + String.format( + "%sdescription%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ReopenFindingRequest.java b/src/main/java/com/fireblocks/sdk/model/ReopenFindingRequest.java new file mode 100644 index 00000000..c2240fa4 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ReopenFindingRequest.java @@ -0,0 +1,224 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** Request to reopen a FSPM finding. */ +@JsonPropertyOrder({ + ReopenFindingRequest.JSON_PROPERTY_STATUS, + ReopenFindingRequest.JSON_PROPERTY_STATUS_UPDATED_REASON +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ReopenFindingRequest { + /** Marks the finding as open again. */ + public enum StatusEnum { + OPEN(String.valueOf("OPEN")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @jakarta.annotation.Nonnull private StatusEnum status; + + public static final String JSON_PROPERTY_STATUS_UPDATED_REASON = "statusUpdatedReason"; + @jakarta.annotation.Nullable private String statusUpdatedReason; + + public ReopenFindingRequest() {} + + @JsonCreator + public ReopenFindingRequest( + @JsonProperty(value = JSON_PROPERTY_STATUS, required = true) StatusEnum status) { + this.status = status; + } + + public ReopenFindingRequest status(@jakarta.annotation.Nonnull StatusEnum status) { + this.status = status; + return this; + } + + /** + * Marks the finding as open again. + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusEnum getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@jakarta.annotation.Nonnull StatusEnum status) { + this.status = status; + } + + public ReopenFindingRequest statusUpdatedReason( + @jakarta.annotation.Nullable String statusUpdatedReason) { + this.statusUpdatedReason = statusUpdatedReason; + return this; + } + + /** + * Ignored when reopening a finding. + * + * @return statusUpdatedReason + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS_UPDATED_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatusUpdatedReason() { + return statusUpdatedReason; + } + + @JsonProperty(JSON_PROPERTY_STATUS_UPDATED_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatusUpdatedReason(@jakarta.annotation.Nullable String statusUpdatedReason) { + this.statusUpdatedReason = statusUpdatedReason; + } + + /** Return true if this ReopenFindingRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReopenFindingRequest reopenFindingRequest = (ReopenFindingRequest) o; + return Objects.equals(this.status, reopenFindingRequest.status) + && Objects.equals( + this.statusUpdatedReason, reopenFindingRequest.statusUpdatedReason); + } + + @Override + public int hashCode() { + return Objects.hash(status, statusUpdatedReason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReopenFindingRequest {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" statusUpdatedReason: ") + .append(toIndentedString(statusUpdatedReason)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `statusUpdatedReason` to the URL query string + if (getStatusUpdatedReason() != null) { + joiner.add( + String.format( + "%sstatusUpdatedReason%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getStatusUpdatedReason())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SecurityFinding.java b/src/main/java/com/fireblocks/sdk/model/SecurityFinding.java index 5c719347..4f994cdc 100644 --- a/src/main/java/com/fireblocks/sdk/model/SecurityFinding.java +++ b/src/main/java/com/fireblocks/sdk/model/SecurityFinding.java @@ -206,14 +206,6 @@ public static SeverityEnum fromValue(String value) { public enum CategoryEnum { USER_MANAGEMENT(String.valueOf("USER_MANAGEMENT")), - ACCESS_CONTROL(String.valueOf("ACCESS_CONTROL")), - - ADMIN_MANAGEMENT(String.valueOf("ADMIN_MANAGEMENT")), - - SECURITY(String.valueOf("SECURITY")), - - CONFIGURATION(String.valueOf("CONFIGURATION")), - APPROVAL_GROUP_MANAGEMENT(String.valueOf("APPROVAL_GROUP_MANAGEMENT")), POLICY_ENGINE_UTILIZATION(String.valueOf("POLICY_ENGINE_UTILIZATION")), diff --git a/src/main/java/com/fireblocks/sdk/model/SecurityFindingDetailed.java b/src/main/java/com/fireblocks/sdk/model/SecurityFindingDetailed.java new file mode 100644 index 00000000..e8243017 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SecurityFindingDetailed.java @@ -0,0 +1,945 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** A single FSPM finding, redacted to the public field set */ +@JsonPropertyOrder({ + SecurityFindingDetailed.JSON_PROPERTY_ID, + SecurityFindingDetailed.JSON_PROPERTY_TYPE, + SecurityFindingDetailed.JSON_PROPERTY_STATUS, + SecurityFindingDetailed.JSON_PROPERTY_SEVERITY, + SecurityFindingDetailed.JSON_PROPERTY_CATEGORY, + SecurityFindingDetailed.JSON_PROPERTY_CREATED_AT, + SecurityFindingDetailed.JSON_PROPERTY_TITLE, + SecurityFindingDetailed.JSON_PROPERTY_STATUS_UPDATED_AT, + SecurityFindingDetailed.JSON_PROPERTY_STATUS_UPDATED_BY_USER_ID, + SecurityFindingDetailed.JSON_PROPERTY_STATUS_UPDATED_REASON, + SecurityFindingDetailed.JSON_PROPERTY_INFO, + SecurityFindingDetailed.JSON_PROPERTY_COMPLIANCE_REQS, + SecurityFindingDetailed.JSON_PROPERTY_RISK_EXPLANATION, + SecurityFindingDetailed.JSON_PROPERTY_MITIGATION_GUIDANCE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class SecurityFindingDetailed { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull private UUID id; + + /** The finding type identifier */ + public enum TypeEnum { + API_USER_NOT_WHITELISTED(String.valueOf("API_USER_NOT_WHITELISTED")), + + CONSOLE_IP_ALLOWLIST_DEACTIVATED(String.valueOf("CONSOLE_IP_ALLOWLIST_DEACTIVATED")), + + ADMIN_TH_SET_TO_ALL_AND_MORE_THAN_2_ADMINS( + String.valueOf("ADMIN_TH_SET_TO_ALL_AND_MORE_THAN_2_ADMINS")), + + API_USERS_COUNT_PASSES_TH_AND_OWNER_NOT_MANDATORY( + String.valueOf("API_USERS_COUNT_PASSES_TH_AND_OWNER_NOT_MANDATORY")), + + API_COSIGNER_WITH_NO_CALLBACK(String.valueOf("API_COSIGNER_WITH_NO_CALLBACK")), + + API_USER_DIDNT_APPROVE_CCR_IN_X_DAYS( + String.valueOf("API_USER_DIDNT_APPROVE_CCR_IN_X_DAYS")), + + NON_VIEWER_DIDNT_INITIATE_APPROVE_OR_SIGN_TX_OR_CCR_LAST_X_DAYS( + String.valueOf("NON_VIEWER_DIDNT_INITIATE_APPROVE_OR_SIGN_TX_OR_CCR_LAST_X_DAYS")), + + TH_SET_TO_1_AND_MORE_THAN_3_APPROVERS( + String.valueOf("TH_SET_TO_1_AND_MORE_THAN_3_APPROVERS")), + + ADMIN_TH_SET_TO_1_AND_MORE_THAN_3_ADMINS( + String.valueOf("ADMIN_TH_SET_TO_1_AND_MORE_THAN_3_ADMINS")), + + NON_EVM_DAPP_CONNECTIONS_ENABLED_BUT_UNUSED( + String.valueOf("NON_EVM_DAPP_CONNECTIONS_ENABLED_BUT_UNUSED")), + + OTA_ENABLED_BUT_UNUSED(String.valueOf("OTA_ENABLED_BUT_UNUSED")), + + POLICY_NOT_UPDATED_RECENTLY(String.valueOf("POLICY_NOT_UPDATED_RECENTLY")), + + RAW_SIGNING_ENABLED_BUT_UNUSED(String.valueOf("RAW_SIGNING_ENABLED_BUT_UNUSED")), + + API_USER_UNUSED_FOR_90_DAYS(String.valueOf("API_USER_UNUSED_FOR_90_DAYS")), + + UNUSED_UNLIMITED_TOKEN_ALLOWANCES(String.valueOf("UNUSED_UNLIMITED_TOKEN_ALLOWANCES")), + + UNUSED_WHITELISTED_ADDRESS(String.valueOf("UNUSED_WHITELISTED_ADDRESS")), + + TRANSACTION_REPETITION_ATTACK(String.valueOf("TRANSACTION_REPETITION_ATTACK")), + + USER_EMAIL_DOMAIN_NON_BUSINESS(String.valueOf("USER_EMAIL_DOMAIN_NON_BUSINESS")), + + OUTDATED_MOBILE_APP_VERSION(String.valueOf("OUTDATED_MOBILE_APP_VERSION")), + + SINGLE_HOP_DRAIN_ATTACK(String.valueOf("SINGLE_HOP_DRAIN_ATTACK")), + + LATERAL_MOVEMENT_DRAIN_ATTACK(String.valueOf("LATERAL_MOVEMENT_DRAIN_ATTACK")), + + WORKSPACE_USER_DORMANT_FOR_X_DAYS(String.valueOf("WORKSPACE_USER_DORMANT_FOR_X_DAYS")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private TypeEnum type; + + /** Current status of the finding */ + public enum StatusEnum { + OPEN(String.valueOf("OPEN")), + + ACCEPTED(String.valueOf("ACCEPTED")), + + RESOLVED(String.valueOf("RESOLVED")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @jakarta.annotation.Nonnull private StatusEnum status; + + /** Severity level of the finding */ + public enum SeverityEnum { + INFO(String.valueOf("INFO")), + + LOW(String.valueOf("LOW")), + + MEDIUM(String.valueOf("MEDIUM")), + + HIGH(String.valueOf("HIGH")); + + private String value; + + SeverityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SeverityEnum fromValue(String value) { + for (SeverityEnum b : SeverityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SEVERITY = "severity"; + @jakarta.annotation.Nonnull private SeverityEnum severity; + + /** Category of the finding */ + public enum CategoryEnum { + USER_MANAGEMENT(String.valueOf("USER_MANAGEMENT")), + + APPROVAL_GROUP_MANAGEMENT(String.valueOf("APPROVAL_GROUP_MANAGEMENT")), + + POLICY_ENGINE_UTILIZATION(String.valueOf("POLICY_ENGINE_UTILIZATION")), + + WORKSPACE_CONFIGURATION(String.valueOf("WORKSPACE_CONFIGURATION")), + + DEFI_ACCESS(String.valueOf("DEFI_ACCESS")), + + FLEET_MANAGEMENT(String.valueOf("FLEET_MANAGEMENT")); + + private String value; + + CategoryEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CategoryEnum fromValue(String value) { + for (CategoryEnum b : CategoryEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_CATEGORY = "category"; + @jakarta.annotation.Nonnull private CategoryEnum category; + + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + @jakarta.annotation.Nonnull private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nonnull private String title; + + public static final String JSON_PROPERTY_STATUS_UPDATED_AT = "statusUpdatedAt"; + @jakarta.annotation.Nullable private OffsetDateTime statusUpdatedAt; + + public static final String JSON_PROPERTY_STATUS_UPDATED_BY_USER_ID = "statusUpdatedByUserId"; + @jakarta.annotation.Nullable private UUID statusUpdatedByUserId; + + public static final String JSON_PROPERTY_STATUS_UPDATED_REASON = "statusUpdatedReason"; + @jakarta.annotation.Nullable private String statusUpdatedReason; + + public static final String JSON_PROPERTY_INFO = "info"; + @jakarta.annotation.Nonnull private Map info; + + public static final String JSON_PROPERTY_COMPLIANCE_REQS = "complianceReqs"; + @jakarta.annotation.Nonnull private List complianceReqs; + + public static final String JSON_PROPERTY_RISK_EXPLANATION = "riskExplanation"; + @jakarta.annotation.Nonnull private String riskExplanation; + + public static final String JSON_PROPERTY_MITIGATION_GUIDANCE = "mitigationGuidance"; + @jakarta.annotation.Nonnull private String mitigationGuidance; + + public SecurityFindingDetailed() {} + + @JsonCreator + public SecurityFindingDetailed( + @JsonProperty(value = JSON_PROPERTY_ID, required = true) UUID id, + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_STATUS, required = true) StatusEnum status, + @JsonProperty(value = JSON_PROPERTY_SEVERITY, required = true) SeverityEnum severity, + @JsonProperty(value = JSON_PROPERTY_CATEGORY, required = true) CategoryEnum category, + @JsonProperty(value = JSON_PROPERTY_CREATED_AT, required = true) + OffsetDateTime createdAt, + @JsonProperty(value = JSON_PROPERTY_TITLE, required = true) String title, + @JsonProperty(value = JSON_PROPERTY_INFO, required = true) Map info, + @JsonProperty(value = JSON_PROPERTY_COMPLIANCE_REQS, required = true) + List complianceReqs, + @JsonProperty(value = JSON_PROPERTY_RISK_EXPLANATION, required = true) + String riskExplanation, + @JsonProperty(value = JSON_PROPERTY_MITIGATION_GUIDANCE, required = true) + String mitigationGuidance) { + this.id = id; + this.type = type; + this.status = status; + this.severity = severity; + this.category = category; + this.createdAt = createdAt; + this.title = title; + this.info = info; + this.complianceReqs = complianceReqs; + this.riskExplanation = riskExplanation; + this.mitigationGuidance = mitigationGuidance; + } + + public SecurityFindingDetailed id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the finding + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + public SecurityFindingDetailed type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * The finding type identifier + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public SecurityFindingDetailed status(@jakarta.annotation.Nonnull StatusEnum status) { + this.status = status; + return this; + } + + /** + * Current status of the finding + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusEnum getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@jakarta.annotation.Nonnull StatusEnum status) { + this.status = status; + } + + public SecurityFindingDetailed severity(@jakarta.annotation.Nonnull SeverityEnum severity) { + this.severity = severity; + return this; + } + + /** + * Severity level of the finding + * + * @return severity + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SEVERITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SeverityEnum getSeverity() { + return severity; + } + + @JsonProperty(JSON_PROPERTY_SEVERITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSeverity(@jakarta.annotation.Nonnull SeverityEnum severity) { + this.severity = severity; + } + + public SecurityFindingDetailed category(@jakarta.annotation.Nonnull CategoryEnum category) { + this.category = category; + return this; + } + + /** + * Category of the finding + * + * @return category + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CategoryEnum getCategory() { + return category; + } + + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCategory(@jakarta.annotation.Nonnull CategoryEnum category) { + this.category = category; + } + + public SecurityFindingDetailed createdAt(@jakarta.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * When the finding was first detected + * + * @return createdAt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(@jakarta.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public SecurityFindingDetailed title(@jakarta.annotation.Nonnull String title) { + this.title = title; + return this; + } + + /** + * Human-readable title of the finding + * + * @return title + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTitle() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTitle(@jakarta.annotation.Nonnull String title) { + this.title = title; + } + + public SecurityFindingDetailed statusUpdatedAt( + @jakarta.annotation.Nullable OffsetDateTime statusUpdatedAt) { + this.statusUpdatedAt = statusUpdatedAt; + return this; + } + + /** + * When the finding status was last updated, omitted if the status was never updated + * + * @return statusUpdatedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getStatusUpdatedAt() { + return statusUpdatedAt; + } + + @JsonProperty(JSON_PROPERTY_STATUS_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatusUpdatedAt(@jakarta.annotation.Nullable OffsetDateTime statusUpdatedAt) { + this.statusUpdatedAt = statusUpdatedAt; + } + + public SecurityFindingDetailed statusUpdatedByUserId( + @jakarta.annotation.Nullable UUID statusUpdatedByUserId) { + this.statusUpdatedByUserId = statusUpdatedByUserId; + return this; + } + + /** + * The user who last updated the finding status, omitted if the status was never updated + * + * @return statusUpdatedByUserId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS_UPDATED_BY_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getStatusUpdatedByUserId() { + return statusUpdatedByUserId; + } + + @JsonProperty(JSON_PROPERTY_STATUS_UPDATED_BY_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatusUpdatedByUserId(@jakarta.annotation.Nullable UUID statusUpdatedByUserId) { + this.statusUpdatedByUserId = statusUpdatedByUserId; + } + + public SecurityFindingDetailed statusUpdatedReason( + @jakarta.annotation.Nullable String statusUpdatedReason) { + this.statusUpdatedReason = statusUpdatedReason; + return this; + } + + /** + * The reason provided for the last status update, omitted if none was provided + * + * @return statusUpdatedReason + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS_UPDATED_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatusUpdatedReason() { + return statusUpdatedReason; + } + + @JsonProperty(JSON_PROPERTY_STATUS_UPDATED_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatusUpdatedReason(@jakarta.annotation.Nullable String statusUpdatedReason) { + this.statusUpdatedReason = statusUpdatedReason; + } + + public SecurityFindingDetailed info(@jakarta.annotation.Nonnull Map info) { + this.info = info; + return this; + } + + public SecurityFindingDetailed putInfoItem(String key, Object infoItem) { + if (this.info == null) { + this.info = new HashMap<>(); + } + this.info.put(key, infoItem); + return this; + } + + /** + * Additional structured context about the finding. Shape varies by finding type. + * + * @return info + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INFO) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getInfo() { + return info; + } + + @JsonProperty(JSON_PROPERTY_INFO) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setInfo(@jakarta.annotation.Nonnull Map info) { + this.info = info; + } + + public SecurityFindingDetailed complianceReqs( + @jakarta.annotation.Nonnull List complianceReqs) { + this.complianceReqs = complianceReqs; + return this; + } + + public SecurityFindingDetailed addComplianceReqsItem(ComplianceRequirement complianceReqsItem) { + if (this.complianceReqs == null) { + this.complianceReqs = new ArrayList<>(); + } + this.complianceReqs.add(complianceReqsItem); + return this; + } + + /** + * Compliance requirements this finding relates to + * + * @return complianceReqs + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPLIANCE_REQS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getComplianceReqs() { + return complianceReqs; + } + + @JsonProperty(JSON_PROPERTY_COMPLIANCE_REQS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setComplianceReqs( + @jakarta.annotation.Nonnull List complianceReqs) { + this.complianceReqs = complianceReqs; + } + + public SecurityFindingDetailed riskExplanation( + @jakarta.annotation.Nonnull String riskExplanation) { + this.riskExplanation = riskExplanation; + return this; + } + + /** + * Explanation of the risk this finding represents + * + * @return riskExplanation + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RISK_EXPLANATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRiskExplanation() { + return riskExplanation; + } + + @JsonProperty(JSON_PROPERTY_RISK_EXPLANATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRiskExplanation(@jakarta.annotation.Nonnull String riskExplanation) { + this.riskExplanation = riskExplanation; + } + + public SecurityFindingDetailed mitigationGuidance( + @jakarta.annotation.Nonnull String mitigationGuidance) { + this.mitigationGuidance = mitigationGuidance; + return this; + } + + /** + * Guidance on how to mitigate this finding + * + * @return mitigationGuidance + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MITIGATION_GUIDANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMitigationGuidance() { + return mitigationGuidance; + } + + @JsonProperty(JSON_PROPERTY_MITIGATION_GUIDANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMitigationGuidance(@jakarta.annotation.Nonnull String mitigationGuidance) { + this.mitigationGuidance = mitigationGuidance; + } + + /** Return true if this SecurityFindingDetailed object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityFindingDetailed securityFindingDetailed = (SecurityFindingDetailed) o; + return Objects.equals(this.id, securityFindingDetailed.id) + && Objects.equals(this.type, securityFindingDetailed.type) + && Objects.equals(this.status, securityFindingDetailed.status) + && Objects.equals(this.severity, securityFindingDetailed.severity) + && Objects.equals(this.category, securityFindingDetailed.category) + && Objects.equals(this.createdAt, securityFindingDetailed.createdAt) + && Objects.equals(this.title, securityFindingDetailed.title) + && Objects.equals(this.statusUpdatedAt, securityFindingDetailed.statusUpdatedAt) + && Objects.equals( + this.statusUpdatedByUserId, securityFindingDetailed.statusUpdatedByUserId) + && Objects.equals( + this.statusUpdatedReason, securityFindingDetailed.statusUpdatedReason) + && Objects.equals(this.info, securityFindingDetailed.info) + && Objects.equals(this.complianceReqs, securityFindingDetailed.complianceReqs) + && Objects.equals(this.riskExplanation, securityFindingDetailed.riskExplanation) + && Objects.equals( + this.mitigationGuidance, securityFindingDetailed.mitigationGuidance); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + type, + status, + severity, + category, + createdAt, + title, + statusUpdatedAt, + statusUpdatedByUserId, + statusUpdatedReason, + info, + complianceReqs, + riskExplanation, + mitigationGuidance); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityFindingDetailed {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" severity: ").append(toIndentedString(severity)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" statusUpdatedAt: ").append(toIndentedString(statusUpdatedAt)).append("\n"); + sb.append(" statusUpdatedByUserId: ") + .append(toIndentedString(statusUpdatedByUserId)) + .append("\n"); + sb.append(" statusUpdatedReason: ") + .append(toIndentedString(statusUpdatedReason)) + .append("\n"); + sb.append(" info: ").append(toIndentedString(info)).append("\n"); + sb.append(" complianceReqs: ").append(toIndentedString(complianceReqs)).append("\n"); + sb.append(" riskExplanation: ").append(toIndentedString(riskExplanation)).append("\n"); + sb.append(" mitigationGuidance: ") + .append(toIndentedString(mitigationGuidance)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add( + String.format( + "%sid%s=%s", + prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `severity` to the URL query string + if (getSeverity() != null) { + joiner.add( + String.format( + "%sseverity%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSeverity())))); + } + + // add `category` to the URL query string + if (getCategory() != null) { + joiner.add( + String.format( + "%scategory%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getCategory())))); + } + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add( + String.format( + "%screatedAt%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `title` to the URL query string + if (getTitle() != null) { + joiner.add( + String.format( + "%stitle%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); + } + + // add `statusUpdatedAt` to the URL query string + if (getStatusUpdatedAt() != null) { + joiner.add( + String.format( + "%sstatusUpdatedAt%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getStatusUpdatedAt())))); + } + + // add `statusUpdatedByUserId` to the URL query string + if (getStatusUpdatedByUserId() != null) { + joiner.add( + String.format( + "%sstatusUpdatedByUserId%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getStatusUpdatedByUserId())))); + } + + // add `statusUpdatedReason` to the URL query string + if (getStatusUpdatedReason() != null) { + joiner.add( + String.format( + "%sstatusUpdatedReason%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getStatusUpdatedReason())))); + } + + // add `info` to the URL query string + if (getInfo() != null) { + for (String _key : getInfo().keySet()) { + joiner.add( + String.format( + "%sinfo%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, _key, containerSuffix), + getInfo().get(_key), + ApiClient.urlEncode(ApiClient.valueToString(getInfo().get(_key))))); + } + } + + // add `complianceReqs` to the URL query string + if (getComplianceReqs() != null) { + for (int i = 0; i < getComplianceReqs().size(); i++) { + if (getComplianceReqs().get(i) != null) { + joiner.add( + getComplianceReqs() + .get(i) + .toUrlQueryString( + String.format( + "%scomplianceReqs%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `riskExplanation` to the URL query string + if (getRiskExplanation() != null) { + joiner.add( + String.format( + "%sriskExplanation%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getRiskExplanation())))); + } + + // add `mitigationGuidance` to the URL query string + if (getMitigationGuidance() != null) { + joiner.add( + String.format( + "%smitigationGuidance%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getMitigationGuidance())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/UpdateFindingExternalRequest.java b/src/main/java/com/fireblocks/sdk/model/UpdateFindingExternalRequest.java new file mode 100644 index 00000000..499b45df --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/UpdateFindingExternalRequest.java @@ -0,0 +1,335 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import com.fireblocks.sdk.JSON; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.StringJoiner; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +@JsonDeserialize( + using = UpdateFindingExternalRequest.UpdateFindingExternalRequestDeserializer.class) +@JsonSerialize(using = UpdateFindingExternalRequest.UpdateFindingExternalRequestSerializer.class) +public class UpdateFindingExternalRequest extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(UpdateFindingExternalRequest.class.getName()); + + public static class UpdateFindingExternalRequestSerializer + extends StdSerializer { + public UpdateFindingExternalRequestSerializer(Class t) { + super(t); + } + + public UpdateFindingExternalRequestSerializer() { + this(null); + } + + @Override + public void serialize( + UpdateFindingExternalRequest value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class UpdateFindingExternalRequestDeserializer + extends StdDeserializer { + public UpdateFindingExternalRequestDeserializer() { + this(UpdateFindingExternalRequest.class); + } + + public UpdateFindingExternalRequestDeserializer(Class vc) { + super(vc); + } + + @Override + public UpdateFindingExternalRequest deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize AcceptFindingRequest + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AcceptFindingRequest.class.equals(Integer.class) + || AcceptFindingRequest.class.equals(Long.class) + || AcceptFindingRequest.class.equals(Float.class) + || AcceptFindingRequest.class.equals(Double.class) + || AcceptFindingRequest.class.equals(Boolean.class) + || AcceptFindingRequest.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((AcceptFindingRequest.class.equals(Integer.class) + || AcceptFindingRequest.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((AcceptFindingRequest.class.equals(Float.class) + || AcceptFindingRequest.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (AcceptFindingRequest.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (AcceptFindingRequest.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(AcceptFindingRequest.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'AcceptFindingRequest'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AcceptFindingRequest'", e); + } + + // deserialize ReopenFindingRequest + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ReopenFindingRequest.class.equals(Integer.class) + || ReopenFindingRequest.class.equals(Long.class) + || ReopenFindingRequest.class.equals(Float.class) + || ReopenFindingRequest.class.equals(Double.class) + || ReopenFindingRequest.class.equals(Boolean.class) + || ReopenFindingRequest.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ReopenFindingRequest.class.equals(Integer.class) + || ReopenFindingRequest.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ReopenFindingRequest.class.equals(Float.class) + || ReopenFindingRequest.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (ReopenFindingRequest.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ReopenFindingRequest.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(ReopenFindingRequest.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'ReopenFindingRequest'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ReopenFindingRequest'", e); + } + + if (match == 1) { + UpdateFindingExternalRequest ret = new UpdateFindingExternalRequest(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for UpdateFindingExternalRequest: %d classes" + + " match result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public UpdateFindingExternalRequest getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "UpdateFindingExternalRequest cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public UpdateFindingExternalRequest() { + super("oneOf", Boolean.FALSE); + } + + public UpdateFindingExternalRequest(AcceptFindingRequest o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public UpdateFindingExternalRequest(ReopenFindingRequest o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("AcceptFindingRequest", AcceptFindingRequest.class); + schemas.put("ReopenFindingRequest", ReopenFindingRequest.class); + JSON.registerDescendants( + UpdateFindingExternalRequest.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ACCEPTED", AcceptFindingRequest.class); + mappings.put("OPEN", ReopenFindingRequest.class); + mappings.put("AcceptFindingRequest", AcceptFindingRequest.class); + mappings.put("ReopenFindingRequest", ReopenFindingRequest.class); + mappings.put("UpdateFindingExternalRequest", UpdateFindingExternalRequest.class); + JSON.registerDiscriminator(UpdateFindingExternalRequest.class, "status", mappings); + } + + @Override + public Map> getSchemas() { + return UpdateFindingExternalRequest.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: AcceptFindingRequest, ReopenFindingRequest + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be + * a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(AcceptFindingRequest.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(ReopenFindingRequest.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be AcceptFindingRequest, ReopenFindingRequest"); + } + + /** + * Get the actual instance, which can be the following: AcceptFindingRequest, + * ReopenFindingRequest + * + * @return The actual instance (AcceptFindingRequest, ReopenFindingRequest) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `AcceptFindingRequest`. If the actual instance is not + * `AcceptFindingRequest`, the ClassCastException will be thrown. + * + * @return The actual instance of `AcceptFindingRequest` + * @throws ClassCastException if the instance is not `AcceptFindingRequest` + */ + public AcceptFindingRequest getAcceptFindingRequest() throws ClassCastException { + return (AcceptFindingRequest) super.getActualInstance(); + } + + /** + * Get the actual instance of `ReopenFindingRequest`. If the actual instance is not + * `ReopenFindingRequest`, the ClassCastException will be thrown. + * + * @return The actual instance of `ReopenFindingRequest` + * @throws ClassCastException if the instance is not `ReopenFindingRequest` + */ + public ReopenFindingRequest getReopenFindingRequest() throws ClassCastException { + return (ReopenFindingRequest) super.getActualInstance(); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof AcceptFindingRequest) { + if (getActualInstance() != null) { + joiner.add( + ((AcceptFindingRequest) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ReopenFindingRequest) { + if (getActualInstance() != null) { + joiner.add( + ((ReopenFindingRequest) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/test/java/com/fireblocks/sdk/api/SecurityPostureManagementApiTest.java b/src/test/java/com/fireblocks/sdk/api/SecurityPostureManagementApiTest.java index 7d3d6ca2..d75d0404 100644 --- a/src/test/java/com/fireblocks/sdk/api/SecurityPostureManagementApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/SecurityPostureManagementApiTest.java @@ -15,6 +15,9 @@ import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.GetFindingsExternalResponse; +import com.fireblocks.sdk.model.SecurityFindingDetailed; +import com.fireblocks.sdk.model.UpdateFindingExternalRequest; +import java.util.UUID; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; import org.junit.Test; @@ -25,11 +28,24 @@ public class SecurityPostureManagementApiTest { private final SecurityPostureManagementApi api = new SecurityPostureManagementApi(); + /** + * Get a FSPM security finding by ID + * + *

Returns a single FSPM security finding for the workspace, redacted to the public field + * set. Endpoint Roles: Security Admin, Security Auditor. + */ + @Test + public void getSecurityFindingByIdTest() { + UUID id = null; + CompletableFuture> response = + api.getSecurityFindingById(id); + } + /** * Get FSPM security findings * - *

Returns a paginated list of FSPM security findings for the workspace. Endpoint - * Permissions: Security Admin, Security Auditor. + *

Returns a paginated list of FSPM security findings for the workspace. Endpoint Roles: + * Security Admin, Security Auditor. */ @Test public void getSecurityFindingsTest() { @@ -41,4 +57,20 @@ public void getSecurityFindingsTest() { CompletableFuture> response = api.getSecurityFindings(pageCursor, pageSize, severity, category, status); } + + /** + * Update a FSPM security finding by ID + * + *

Accepts or reopens a finding for the workspace. When accepting a finding (`status: + * \"ACCEPTED\"`), `statusUpdatedReason` is required. Endpoint Roles: + * Security Admin. + */ + @Test + public void updateSecurityFindingByIdTest() { + UpdateFindingExternalRequest updateFindingExternalRequest = null; + UUID id = null; + String idempotencyKey = null; + CompletableFuture> response = + api.updateSecurityFindingById(updateFindingExternalRequest, id, idempotencyKey); + } } diff --git a/src/test/java/com/fireblocks/sdk/model/AcceptFindingRequestTest.java b/src/test/java/com/fireblocks/sdk/model/AcceptFindingRequestTest.java new file mode 100644 index 00000000..cc65b7f4 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AcceptFindingRequestTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for AcceptFindingRequest */ +class AcceptFindingRequestTest { + private final AcceptFindingRequest model = new AcceptFindingRequest(); + + /** Model tests for AcceptFindingRequest */ + @Test + void testAcceptFindingRequest() { + // TODO: test AcceptFindingRequest + } + + /** Test the property 'status' */ + @Test + void statusTest() { + // TODO: test status + } + + /** Test the property 'statusUpdatedReason' */ + @Test + void statusUpdatedReasonTest() { + // TODO: test statusUpdatedReason + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ComplianceRequirementTest.java b/src/test/java/com/fireblocks/sdk/model/ComplianceRequirementTest.java new file mode 100644 index 00000000..de7a4816 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ComplianceRequirementTest.java @@ -0,0 +1,51 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ComplianceRequirement */ +class ComplianceRequirementTest { + private final ComplianceRequirement model = new ComplianceRequirement(); + + /** Model tests for ComplianceRequirement */ + @Test + void testComplianceRequirement() { + // TODO: test ComplianceRequirement + } + + /** Test the property 'id' */ + @Test + void idTest() { + // TODO: test id + } + + /** Test the property 'standard' */ + @Test + void standardTest() { + // TODO: test standard + } + + /** Test the property 'criteria' */ + @Test + void criteriaTest() { + // TODO: test criteria + } + + /** Test the property 'description' */ + @Test + void descriptionTest() { + // TODO: test description + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ReopenFindingRequestTest.java b/src/test/java/com/fireblocks/sdk/model/ReopenFindingRequestTest.java new file mode 100644 index 00000000..c5b88cf1 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ReopenFindingRequestTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ReopenFindingRequest */ +class ReopenFindingRequestTest { + private final ReopenFindingRequest model = new ReopenFindingRequest(); + + /** Model tests for ReopenFindingRequest */ + @Test + void testReopenFindingRequest() { + // TODO: test ReopenFindingRequest + } + + /** Test the property 'status' */ + @Test + void statusTest() { + // TODO: test status + } + + /** Test the property 'statusUpdatedReason' */ + @Test + void statusUpdatedReasonTest() { + // TODO: test statusUpdatedReason + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SecurityFindingDetailedTest.java b/src/test/java/com/fireblocks/sdk/model/SecurityFindingDetailedTest.java new file mode 100644 index 00000000..36ea122c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SecurityFindingDetailedTest.java @@ -0,0 +1,111 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for SecurityFindingDetailed */ +class SecurityFindingDetailedTest { + private final SecurityFindingDetailed model = new SecurityFindingDetailed(); + + /** Model tests for SecurityFindingDetailed */ + @Test + void testSecurityFindingDetailed() { + // TODO: test SecurityFindingDetailed + } + + /** Test the property 'id' */ + @Test + void idTest() { + // TODO: test id + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'status' */ + @Test + void statusTest() { + // TODO: test status + } + + /** Test the property 'severity' */ + @Test + void severityTest() { + // TODO: test severity + } + + /** Test the property 'category' */ + @Test + void categoryTest() { + // TODO: test category + } + + /** Test the property 'createdAt' */ + @Test + void createdAtTest() { + // TODO: test createdAt + } + + /** Test the property 'title' */ + @Test + void titleTest() { + // TODO: test title + } + + /** Test the property 'statusUpdatedAt' */ + @Test + void statusUpdatedAtTest() { + // TODO: test statusUpdatedAt + } + + /** Test the property 'statusUpdatedByUserId' */ + @Test + void statusUpdatedByUserIdTest() { + // TODO: test statusUpdatedByUserId + } + + /** Test the property 'statusUpdatedReason' */ + @Test + void statusUpdatedReasonTest() { + // TODO: test statusUpdatedReason + } + + /** Test the property 'info' */ + @Test + void infoTest() { + // TODO: test info + } + + /** Test the property 'complianceReqs' */ + @Test + void complianceReqsTest() { + // TODO: test complianceReqs + } + + /** Test the property 'riskExplanation' */ + @Test + void riskExplanationTest() { + // TODO: test riskExplanation + } + + /** Test the property 'mitigationGuidance' */ + @Test + void mitigationGuidanceTest() { + // TODO: test mitigationGuidance + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/UpdateFindingExternalRequestTest.java b/src/test/java/com/fireblocks/sdk/model/UpdateFindingExternalRequestTest.java new file mode 100644 index 00000000..ff2b5bf8 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/UpdateFindingExternalRequestTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateFindingExternalRequest */ +class UpdateFindingExternalRequestTest { + private final UpdateFindingExternalRequest model = new UpdateFindingExternalRequest(); + + /** Model tests for UpdateFindingExternalRequest */ + @Test + void testUpdateFindingExternalRequest() { + // TODO: test UpdateFindingExternalRequest + } + + /** Test the property 'status' */ + @Test + void statusTest() { + // TODO: test status + } + + /** Test the property 'statusUpdatedReason' */ + @Test + void statusUpdatedReasonTest() { + // TODO: test statusUpdatedReason + } +}