From e3edad9315f1204b66559e1ae27a8a662c8d1131 Mon Sep 17 00:00:00 2001 From: fireblocks_dx_team Date: Tue, 8 Sep 2026 11:32:03 +0000 Subject: [PATCH] Generated SDK #2829319317 --- .openapi-generator/FILES | 153 ++ CHANGELOG.md | 239 -- README.md | 63 +- api/openapi.yaml | 2378 ++++++++++++++++- build.gradle | 2 +- docs/AccessTypeResponse.md | 39 + docs/AccountAccessResponse.md | 24 + docs/AllocationResponse.md | 37 + docs/AllocationResponseAccept.md | 22 + docs/AllocationResponseReject.md | 22 + docs/AllocationWithdrawPayload.md | 24 + docs/AllowListPayload.md | 24 + docs/ApprovalRequestItem.md | 27 + docs/ApprovalsBetaApi.md | 178 ++ docs/CallAccepted.md | 15 + docs/CantonCall.md | 91 + docs/CantonCallAllocationWithdraw.md | 22 + docs/CantonCallAllowListAdd.md | 22 + docs/CantonCallAllowListRemove.md | 22 + docs/CantonCallEndInvestorInvite.md | 22 + docs/CantonCallEndInvestorInviteCancel.md | 22 + docs/CantonCallEndInvestorOffboard.md | 22 + docs/CantonCallParticipantOnboarding.md | 22 + docs/CantonCallTransferWithdraw.md | 22 + docs/CreateWebhookOAuthRequest.md | 22 + docs/CreateWebhookRequest.md | 2 +- docs/DeleteWebhookOAuthResponse.md | 25 + docs/DirectAccessResponse.md | 24 + docs/DirectAccessResponseInfo.md | 13 + docs/EndInvestorPayload.md | 25 + docs/GetFindingsExternalResponse.md | 1 - docs/ListApprovalsResponse.md | 14 + docs/OfferResponse.md | 46 + docs/OfferResponseAccepted.md | 16 + docs/OfferResponseAllocation.md | 22 + docs/OfferResponseOnboarding.md | 22 + docs/OfferResponseTransfer.md | 22 + docs/OnboardingResponse.md | 55 + docs/OnboardingResponseDtccAccept.md | 22 + docs/OnboardingResponseDtccReject.md | 23 + docs/OnboardingResponseTradewebAccept.md | 22 + docs/OnboardingResponseTradewebReject.md | 22 + docs/OrderDetails.md | 2 +- docs/OrderSummary.md | 2 +- docs/ParticipantOnboardingPayload.md | 29 + docs/PositionRelatedTransaction.md | 1 + docs/QuorumApprovalState.md | 13 + docs/QuorumGroup.md | 17 + docs/QuorumRequestState.md | 21 + docs/QuorumRuleset.md | 25 + docs/QuorumStatus.md | 16 + docs/QuorumStatusQuorum.md | 39 + docs/QuorumUser.md | 17 + docs/Quote.md | 2 +- docs/QuoteOffer.md | 2 +- docs/Rate.md | 2 +- docs/RateOffer.md | 2 +- docs/RulesetQuorum.md | 35 + docs/SecurityFindingDetailed.md | 1 - docs/SecurityPostureManagementApi.md | 6 +- docs/SimpleQuorum.md | 27 + docs/TransactionRequest.md | 2 +- docs/TransactionResponse.md | 1 + docs/TransferResponse.md | 37 + docs/TransferResponseAccept.md | 22 + docs/TransferResponseReject.md | 22 + docs/TransferWithdrawPayload.md | 24 + docs/UpdateWebhookOAuthRequest.md | 22 + docs/UpdateWebhookRequest.md | 2 +- docs/UtxoOutput.md | 1 + docs/VaultsApi.md | 2 +- docs/WebhookEvent.md | 10 + docs/WebhookOAuthCredentials.md | 24 + docs/WebhooksV2Api.md | 393 +++ pom.xml | 2 +- .../com/fireblocks/sdk/Configuration.java | 2 +- .../java/com/fireblocks/sdk/Fireblocks.java | 8 + .../fireblocks/sdk/api/ApprovalsBetaApi.java | 363 +++ .../sdk/api/SecurityPostureManagementApi.java | 9 +- .../com/fireblocks/sdk/api/VaultsApi.java | 4 +- .../com/fireblocks/sdk/api/WebhooksV2Api.java | 469 ++++ .../sdk/model/AccessTypeResponse.java | 329 +++ .../sdk/model/AccountAccessResponse.java | 260 ++ .../sdk/model/AllocationResponse.java | 342 +++ .../sdk/model/AllocationResponseAccept.java | 180 ++ .../sdk/model/AllocationResponseReject.java | 180 ++ .../sdk/model/AllocationWithdrawPayload.java | 275 ++ .../sdk/model/AllowListPayload.java | 281 ++ .../sdk/model/ApprovalRequestItem.java | 308 +++ .../fireblocks/sdk/model/CallAccepted.java | 187 ++ .../com/fireblocks/sdk/model/CantonCall.java | 852 ++++++ .../model/CantonCallAllocationWithdraw.java | 219 ++ .../sdk/model/CantonCallAllowListAdd.java | 217 ++ .../sdk/model/CantonCallAllowListRemove.java | 217 ++ .../model/CantonCallEndInvestorInvite.java | 218 ++ .../CantonCallEndInvestorInviteCancel.java | 219 ++ .../model/CantonCallEndInvestorOffboard.java | 219 ++ .../CantonCallParticipantOnboarding.java | 219 ++ .../sdk/model/CantonCallTransferWithdraw.java | 218 ++ .../sdk/model/CreateWebhookOAuthRequest.java | 571 ++++ .../sdk/model/CreateWebhookRequest.java | 34 +- .../sdk/model/DeleteWebhookOAuthResponse.java | 696 +++++ .../sdk/model/DirectAccessResponse.java | 284 ++ .../sdk/model/DirectAccessResponseInfo.java | 159 ++ .../sdk/model/EndInvestorPayload.java | 265 ++ .../model/GetFindingsExternalResponse.java | 2 +- .../sdk/model/ListApprovalsResponse.java | 212 ++ .../fireblocks/sdk/model/OfferResponse.java | 413 +++ .../sdk/model/OfferResponseAccepted.java | 235 ++ .../sdk/model/OfferResponseAllocation.java | 218 ++ .../sdk/model/OfferResponseOnboarding.java | 218 ++ .../sdk/model/OfferResponseTransfer.java | 217 ++ .../sdk/model/OnboardingResponse.java | 526 ++++ .../model/OnboardingResponseDtccAccept.java | 185 ++ .../model/OnboardingResponseDtccReject.java | 228 ++ .../OnboardingResponseTradewebAccept.java | 186 ++ .../OnboardingResponseTradewebReject.java | 189 ++ .../fireblocks/sdk/model/OrderDetails.java | 10 +- .../fireblocks/sdk/model/OrderSummary.java | 10 +- .../model/ParticipantOnboardingPayload.java | 483 ++++ .../sdk/model/PositionRelatedTransaction.java | 47 +- .../sdk/model/QuorumApprovalState.java | 69 + .../com/fireblocks/sdk/model/QuorumGroup.java | 292 ++ .../sdk/model/QuorumRequestState.java | 75 + .../fireblocks/sdk/model/QuorumRuleset.java | 292 ++ .../fireblocks/sdk/model/QuorumStatus.java | 257 ++ .../sdk/model/QuorumStatusQuorum.java | 325 +++ .../com/fireblocks/sdk/model/QuorumUser.java | 273 ++ .../java/com/fireblocks/sdk/model/Quote.java | 10 +- .../com/fireblocks/sdk/model/QuoteOffer.java | 10 +- .../java/com/fireblocks/sdk/model/Rate.java | 10 +- .../com/fireblocks/sdk/model/RateOffer.java | 10 +- .../fireblocks/sdk/model/RulesetQuorum.java | 417 +++ .../sdk/model/SecurityFindingDetailed.java | 2 +- .../fireblocks/sdk/model/SimpleQuorum.java | 419 +++ .../sdk/model/TransactionRequest.java | 3 +- .../sdk/model/TransactionResponse.java | 46 + .../sdk/model/TransferResponse.java | 337 +++ .../sdk/model/TransferResponseAccept.java | 180 ++ .../sdk/model/TransferResponseReject.java | 180 ++ .../sdk/model/TransferWithdrawPayload.java | 271 ++ .../sdk/model/UpdateWebhookOAuthRequest.java | 569 ++++ .../sdk/model/UpdateWebhookRequest.java | 26 +- .../com/fireblocks/sdk/model/UtxoOutput.java | 46 +- .../fireblocks/sdk/model/WebhookEvent.java | 10 + .../sdk/model/WebhookOAuthCredentials.java | 631 +++++ .../com/fireblocks/sdk/FireblocksTest.java | 8 + .../sdk/api/ApprovalsBetaApiTest.java | 80 + .../api/SecurityPostureManagementApiTest.java | 9 +- .../com/fireblocks/sdk/api/VaultsApiTest.java | 4 +- .../fireblocks/sdk/api/WebhooksV2ApiTest.java | 95 + .../sdk/model/AccessTypeResponseTest.java | 51 + .../sdk/model/AccountAccessResponseTest.java | 45 + .../model/AllocationResponseAcceptTest.java | 33 + .../model/AllocationResponseRejectTest.java | 33 + .../sdk/model/AllocationResponseTest.java | 33 + .../model/AllocationWithdrawPayloadTest.java | 45 + .../sdk/model/AllowListPayloadTest.java | 45 + .../sdk/model/ApprovalRequestItemTest.java | 51 + .../sdk/model/CallAcceptedTest.java | 39 + .../CantonCallAllocationWithdrawTest.java | 39 + .../sdk/model/CantonCallAllowListAddTest.java | 39 + .../model/CantonCallAllowListRemoveTest.java | 39 + ...CantonCallEndInvestorInviteCancelTest.java | 39 + .../CantonCallEndInvestorInviteTest.java | 39 + .../CantonCallEndInvestorOffboardTest.java | 39 + .../CantonCallParticipantOnboardingTest.java | 39 + .../fireblocks/sdk/model/CantonCallTest.java | 39 + .../model/CantonCallTransferWithdrawTest.java | 39 + .../model/CreateWebhookOAuthRequestTest.java | 81 + .../model/DeleteWebhookOAuthResponseTest.java | 99 + .../model/DirectAccessResponseInfoTest.java | 33 + .../sdk/model/DirectAccessResponseTest.java | 45 + .../sdk/model/EndInvestorPayloadTest.java | 45 + .../sdk/model/ListApprovalsResponseTest.java | 39 + .../sdk/model/OfferResponseAcceptedTest.java | 45 + .../model/OfferResponseAllocationTest.java | 39 + .../model/OfferResponseOnboardingTest.java | 39 + .../sdk/model/OfferResponseTest.java | 39 + .../sdk/model/OfferResponseTransferTest.java | 39 + .../OnboardingResponseDtccAcceptTest.java | 33 + .../OnboardingResponseDtccRejectTest.java | 39 + .../sdk/model/OnboardingResponseTest.java | 39 + .../OnboardingResponseTradewebAcceptTest.java | 33 + .../OnboardingResponseTradewebRejectTest.java | 33 + .../ParticipantOnboardingPayloadTest.java | 75 + .../model/PositionRelatedTransactionTest.java | 6 + .../sdk/model/QuorumApprovalStateTest.java | 25 + .../fireblocks/sdk/model/QuorumGroupTest.java | 51 + .../sdk/model/QuorumRequestStateTest.java | 25 + .../sdk/model/QuorumRulesetTest.java | 45 + .../sdk/model/QuorumStatusQuorumTest.java | 75 + .../sdk/model/QuorumStatusTest.java | 45 + .../fireblocks/sdk/model/QuorumUserTest.java | 51 + .../sdk/model/RulesetQuorumTest.java | 57 + .../sdk/model/SimpleQuorumTest.java | 63 + .../sdk/model/TransactionResponseTest.java | 6 + .../sdk/model/TransferResponseAcceptTest.java | 33 + .../sdk/model/TransferResponseRejectTest.java | 33 + .../sdk/model/TransferResponseTest.java | 33 + .../model/TransferWithdrawPayloadTest.java | 45 + .../model/UpdateWebhookOAuthRequestTest.java | 81 + .../fireblocks/sdk/model/UtxoOutputTest.java | 6 + .../model/WebhookOAuthCredentialsTest.java | 93 + 204 files changed, 22751 insertions(+), 417 deletions(-) delete mode 100644 CHANGELOG.md create mode 100644 docs/AccessTypeResponse.md create mode 100644 docs/AccountAccessResponse.md create mode 100644 docs/AllocationResponse.md create mode 100644 docs/AllocationResponseAccept.md create mode 100644 docs/AllocationResponseReject.md create mode 100644 docs/AllocationWithdrawPayload.md create mode 100644 docs/AllowListPayload.md create mode 100644 docs/ApprovalRequestItem.md create mode 100644 docs/ApprovalsBetaApi.md create mode 100644 docs/CallAccepted.md create mode 100644 docs/CantonCall.md create mode 100644 docs/CantonCallAllocationWithdraw.md create mode 100644 docs/CantonCallAllowListAdd.md create mode 100644 docs/CantonCallAllowListRemove.md create mode 100644 docs/CantonCallEndInvestorInvite.md create mode 100644 docs/CantonCallEndInvestorInviteCancel.md create mode 100644 docs/CantonCallEndInvestorOffboard.md create mode 100644 docs/CantonCallParticipantOnboarding.md create mode 100644 docs/CantonCallTransferWithdraw.md create mode 100644 docs/CreateWebhookOAuthRequest.md create mode 100644 docs/DeleteWebhookOAuthResponse.md create mode 100644 docs/DirectAccessResponse.md create mode 100644 docs/DirectAccessResponseInfo.md create mode 100644 docs/EndInvestorPayload.md create mode 100644 docs/ListApprovalsResponse.md create mode 100644 docs/OfferResponse.md create mode 100644 docs/OfferResponseAccepted.md create mode 100644 docs/OfferResponseAllocation.md create mode 100644 docs/OfferResponseOnboarding.md create mode 100644 docs/OfferResponseTransfer.md create mode 100644 docs/OnboardingResponse.md create mode 100644 docs/OnboardingResponseDtccAccept.md create mode 100644 docs/OnboardingResponseDtccReject.md create mode 100644 docs/OnboardingResponseTradewebAccept.md create mode 100644 docs/OnboardingResponseTradewebReject.md create mode 100644 docs/ParticipantOnboardingPayload.md create mode 100644 docs/QuorumApprovalState.md create mode 100644 docs/QuorumGroup.md create mode 100644 docs/QuorumRequestState.md create mode 100644 docs/QuorumRuleset.md create mode 100644 docs/QuorumStatus.md create mode 100644 docs/QuorumStatusQuorum.md create mode 100644 docs/QuorumUser.md create mode 100644 docs/RulesetQuorum.md create mode 100644 docs/SimpleQuorum.md create mode 100644 docs/TransferResponse.md create mode 100644 docs/TransferResponseAccept.md create mode 100644 docs/TransferResponseReject.md create mode 100644 docs/TransferWithdrawPayload.md create mode 100644 docs/UpdateWebhookOAuthRequest.md create mode 100644 docs/WebhookOAuthCredentials.md create mode 100644 src/main/java/com/fireblocks/sdk/api/ApprovalsBetaApi.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AccessTypeResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AccountAccessResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AllocationResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AllocationResponseAccept.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AllocationResponseReject.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AllocationWithdrawPayload.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AllowListPayload.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ApprovalRequestItem.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CallAccepted.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CantonCall.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CantonCallAllocationWithdraw.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CantonCallAllowListAdd.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CantonCallAllowListRemove.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorInvite.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorInviteCancel.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorOffboard.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CantonCallParticipantOnboarding.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CantonCallTransferWithdraw.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CreateWebhookOAuthRequest.java create mode 100644 src/main/java/com/fireblocks/sdk/model/DeleteWebhookOAuthResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/DirectAccessResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/DirectAccessResponseInfo.java create mode 100644 src/main/java/com/fireblocks/sdk/model/EndInvestorPayload.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ListApprovalsResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/OfferResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/OfferResponseAccepted.java create mode 100644 src/main/java/com/fireblocks/sdk/model/OfferResponseAllocation.java create mode 100644 src/main/java/com/fireblocks/sdk/model/OfferResponseOnboarding.java create mode 100644 src/main/java/com/fireblocks/sdk/model/OfferResponseTransfer.java create mode 100644 src/main/java/com/fireblocks/sdk/model/OnboardingResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/OnboardingResponseDtccAccept.java create mode 100644 src/main/java/com/fireblocks/sdk/model/OnboardingResponseDtccReject.java create mode 100644 src/main/java/com/fireblocks/sdk/model/OnboardingResponseTradewebAccept.java create mode 100644 src/main/java/com/fireblocks/sdk/model/OnboardingResponseTradewebReject.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ParticipantOnboardingPayload.java create mode 100644 src/main/java/com/fireblocks/sdk/model/QuorumApprovalState.java create mode 100644 src/main/java/com/fireblocks/sdk/model/QuorumGroup.java create mode 100644 src/main/java/com/fireblocks/sdk/model/QuorumRequestState.java create mode 100644 src/main/java/com/fireblocks/sdk/model/QuorumRuleset.java create mode 100644 src/main/java/com/fireblocks/sdk/model/QuorumStatus.java create mode 100644 src/main/java/com/fireblocks/sdk/model/QuorumStatusQuorum.java create mode 100644 src/main/java/com/fireblocks/sdk/model/QuorumUser.java create mode 100644 src/main/java/com/fireblocks/sdk/model/RulesetQuorum.java create mode 100644 src/main/java/com/fireblocks/sdk/model/SimpleQuorum.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TransferResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TransferResponseAccept.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TransferResponseReject.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TransferWithdrawPayload.java create mode 100644 src/main/java/com/fireblocks/sdk/model/UpdateWebhookOAuthRequest.java create mode 100644 src/main/java/com/fireblocks/sdk/model/WebhookOAuthCredentials.java create mode 100644 src/test/java/com/fireblocks/sdk/api/ApprovalsBetaApiTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AccessTypeResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AccountAccessResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AllocationResponseAcceptTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AllocationResponseRejectTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AllocationResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AllocationWithdrawPayloadTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AllowListPayloadTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ApprovalRequestItemTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CallAcceptedTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CantonCallAllocationWithdrawTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CantonCallAllowListAddTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CantonCallAllowListRemoveTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CantonCallEndInvestorInviteCancelTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CantonCallEndInvestorInviteTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CantonCallEndInvestorOffboardTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CantonCallParticipantOnboardingTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CantonCallTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CantonCallTransferWithdrawTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CreateWebhookOAuthRequestTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DeleteWebhookOAuthResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DirectAccessResponseInfoTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DirectAccessResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/EndInvestorPayloadTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ListApprovalsResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/OfferResponseAcceptedTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/OfferResponseAllocationTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/OfferResponseOnboardingTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/OfferResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/OfferResponseTransferTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/OnboardingResponseDtccAcceptTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/OnboardingResponseDtccRejectTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/OnboardingResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/OnboardingResponseTradewebAcceptTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/OnboardingResponseTradewebRejectTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ParticipantOnboardingPayloadTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/QuorumApprovalStateTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/QuorumGroupTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/QuorumRequestStateTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/QuorumRulesetTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/QuorumStatusQuorumTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/QuorumStatusTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/QuorumUserTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/RulesetQuorumTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/SimpleQuorumTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TransferResponseAcceptTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TransferResponseRejectTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TransferResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TransferWithdrawPayloadTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/UpdateWebhookOAuthRequestTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/WebhookOAuthCredentialsTest.java diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 178f87c4..5eba000e 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -17,8 +17,10 @@ docs/AccessRegistryCurrentStateResponse.md docs/AccessRegistryCurrentStateResponse2.md docs/AccessRegistrySummaryResponse.md docs/AccessType.md +docs/AccessTypeResponse.md docs/Account.md docs/AccountAccess.md +docs/AccountAccessResponse.md docs/AccountBase.md docs/AccountBasedAccessProvider.md docs/AccountBasedAccessProviderInfo.md @@ -71,6 +73,11 @@ docs/AddressReverseLookupResponse.md docs/AddressesFilters.md docs/AlertExposureTypeEnum.md docs/AlertLevelEnum.md +docs/AllocationResponse.md +docs/AllocationResponseAccept.md +docs/AllocationResponseReject.md +docs/AllocationWithdrawPayload.md +docs/AllowListPayload.md docs/AllowlistEntry.md docs/AllowlistEntryResponse.md docs/AllowlistEntryStatus.md @@ -98,6 +105,8 @@ docs/ApiKey.md docs/ApiKeysPaginatedResponse.md docs/ApiUserApi.md docs/ApprovalRequest.md +docs/ApprovalRequestItem.md +docs/ApprovalsBetaApi.md docs/ApproversConfig.md docs/ApproversConfigApprovalGroupsInner.md docs/Apy.md @@ -177,9 +186,19 @@ docs/ByorkVerdictEnum.md docs/ByorkVerdictRequest.md docs/ByorkVerdictResponse.md docs/ByorkVerdictResponseStatusEnum.md +docs/CallAccepted.md docs/CallbackHandler.md docs/CallbackHandlerRequest.md docs/CancelTransactionResponse.md +docs/CantonCall.md +docs/CantonCallAllocationWithdraw.md +docs/CantonCallAllowListAdd.md +docs/CantonCallAllowListRemove.md +docs/CantonCallEndInvestorInvite.md +docs/CantonCallEndInvestorInviteCancel.md +docs/CantonCallEndInvestorOffboard.md +docs/CantonCallParticipantOnboarding.md +docs/CantonCallTransferWithdraw.md docs/ChainDescriptor.md docs/ChainInfoResponse.md docs/ChannelDvnConfigWithConfirmations.md @@ -329,6 +348,7 @@ docs/CreateVaultAccountConnectionRequest.md docs/CreateVaultAccountRequest.md docs/CreateVaultAssetResponse.md docs/CreateWalletRequest.md +docs/CreateWebhookOAuthRequest.md docs/CreateWebhookRequest.md docs/CreateWorkflowExecutionRequestParamsInner.md docs/CustomRoutingDest.md @@ -342,6 +362,7 @@ docs/DelegationBlockchainPositionInfo.md docs/DelegationSummary.md docs/DeleteNetworkConnectionResponse.md docs/DeleteNetworkIdResponse.md +docs/DeleteWebhookOAuthResponse.md docs/DeployLayerZeroAdaptersRequest.md docs/DeployableAddressResponse.md docs/DeployedContractNotFoundError.md @@ -358,6 +379,8 @@ docs/DestinationTransferPeerPathResponse.md docs/DirectAccess.md docs/DirectAccessProvider.md docs/DirectAccessProviderInfo.md +docs/DirectAccessResponse.md +docs/DirectAccessResponseInfo.md docs/DisbursementAmountInstruction.md docs/DisbursementConfigOperation.md docs/DisbursementInstruction.md @@ -410,6 +433,7 @@ docs/EmbeddedWalletSetupStatusResponse.md docs/EmbeddedWalletsApi.md docs/EnableDevice.md docs/EnableWallet.md +docs/EndInvestorPayload.md docs/ErrorResponse.md docs/ErrorResponseError.md docs/ErrorSchema.md @@ -589,6 +613,7 @@ docs/LegacySrcOrDestAttributesInner.md docs/LegalEntityRegistration.md docs/LeiStatus.md docs/LinkedTokensCount.md +docs/ListApprovalsResponse.md docs/ListAssetsResponse.md docs/ListBlockchainsResponse.md docs/ListBlockchainsResponse2.md @@ -648,7 +673,17 @@ docs/NotificationStatus.md docs/NotificationWithData.md docs/OffExchangesApi.md docs/Offer.md +docs/OfferResponse.md +docs/OfferResponseAccepted.md +docs/OfferResponseAllocation.md +docs/OfferResponseOnboarding.md +docs/OfferResponseTransfer.md docs/OffersResponse.md +docs/OnboardingResponse.md +docs/OnboardingResponseDtccAccept.md +docs/OnboardingResponseDtccReject.md +docs/OnboardingResponseTradewebAccept.md +docs/OnboardingResponseTradewebReject.md docs/OnchainDataApi.md docs/OnchainTransaction.md docs/OnchainTransactionsPagedResponse.md @@ -680,6 +715,7 @@ docs/PairApiKeyRequest.md docs/PairApiKeyResponse.md docs/Parameter.md docs/ParameterWithValue.md +docs/ParticipantOnboardingPayload.md docs/ParticipantRelationshipType.md docs/ParticipantsIdentification.md docs/ParticipantsIdentificationPolicy.md @@ -754,6 +790,13 @@ docs/ProvidersListResponse.md docs/PublicKeyInformation.md docs/PublishDraftRequest.md docs/PublishResult.md +docs/QuorumApprovalState.md +docs/QuorumGroup.md +docs/QuorumRequestState.md +docs/QuorumRuleset.md +docs/QuorumStatus.md +docs/QuorumStatusQuorum.md +docs/QuorumUser.md docs/Quote.md docs/QuoteExecutionRequestDetails.md docs/QuoteExecutionStep.md @@ -822,6 +865,7 @@ docs/RewardsInfo.md docs/RoleDetails.md docs/RoleDetails2.md docs/RoleGrantee.md +docs/RulesetQuorum.md docs/SEPAAddress.md docs/SEPADestination.md docs/SOLAccount.md @@ -896,6 +940,7 @@ docs/Side.md docs/SignedMessage.md docs/SignedMessageSignature.md docs/SigningKeyDto.md +docs/SimpleQuorum.md docs/SmartTransferApi.md docs/SmartTransferApproveTerm.md docs/SmartTransferBadRequestResponse.md @@ -1121,7 +1166,11 @@ docs/TransferPeerTypeEnum.md docs/TransferPeerTypeEnum2.md docs/TransferRail.md docs/TransferReceipt.md +docs/TransferResponse.md +docs/TransferResponseAccept.md +docs/TransferResponseReject.md docs/TransferValidationFailure.md +docs/TransferWithdrawPayload.md docs/TravelRuleActionEnum.md docs/TravelRuleAddress.md docs/TravelRuleApi.md @@ -1196,6 +1245,7 @@ docs/UpdateTagRequest.md docs/UpdateTokenOwnershipStatusDto.md docs/UpdateVaultAccountAssetAddressRequest.md docs/UpdateVaultAccountRequest.md +docs/UpdateWebhookOAuthRequest.md docs/UpdateWebhookRequest.md docs/UsWirePaymentInfo.md docs/UsdcGatewayWalletAsset.md @@ -1247,6 +1297,7 @@ docs/WebhookMetric.md docs/WebhookMtls.md docs/WebhookMtlsCsrResponse.md docs/WebhookOAuth.md +docs/WebhookOAuthCredentials.md docs/WebhookOAuthResponse.md docs/WebhookPaginatedResponse.md docs/WebhooksApi.md @@ -1292,6 +1343,7 @@ src/main/java/com/fireblocks/sdk/SystemWrapper.java src/main/java/com/fireblocks/sdk/UserAgentUtil.java src/main/java/com/fireblocks/sdk/ValidationUtils.java src/main/java/com/fireblocks/sdk/api/ApiUserApi.java +src/main/java/com/fireblocks/sdk/api/ApprovalsBetaApi.java src/main/java/com/fireblocks/sdk/api/AuditLogsApi.java src/main/java/com/fireblocks/sdk/api/BlockchainLinkBetaApi.java src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java @@ -1355,8 +1407,10 @@ src/main/java/com/fireblocks/sdk/model/AccessRegistryCurrentStateResponse.java src/main/java/com/fireblocks/sdk/model/AccessRegistryCurrentStateResponse2.java src/main/java/com/fireblocks/sdk/model/AccessRegistrySummaryResponse.java src/main/java/com/fireblocks/sdk/model/AccessType.java +src/main/java/com/fireblocks/sdk/model/AccessTypeResponse.java src/main/java/com/fireblocks/sdk/model/Account.java src/main/java/com/fireblocks/sdk/model/AccountAccess.java +src/main/java/com/fireblocks/sdk/model/AccountAccessResponse.java src/main/java/com/fireblocks/sdk/model/AccountBase.java src/main/java/com/fireblocks/sdk/model/AccountBasedAccessProvider.java src/main/java/com/fireblocks/sdk/model/AccountBasedAccessProviderInfo.java @@ -1409,6 +1463,11 @@ src/main/java/com/fireblocks/sdk/model/AddressReverseLookupResponse.java src/main/java/com/fireblocks/sdk/model/AddressesFilters.java src/main/java/com/fireblocks/sdk/model/AlertExposureTypeEnum.java src/main/java/com/fireblocks/sdk/model/AlertLevelEnum.java +src/main/java/com/fireblocks/sdk/model/AllocationResponse.java +src/main/java/com/fireblocks/sdk/model/AllocationResponseAccept.java +src/main/java/com/fireblocks/sdk/model/AllocationResponseReject.java +src/main/java/com/fireblocks/sdk/model/AllocationWithdrawPayload.java +src/main/java/com/fireblocks/sdk/model/AllowListPayload.java src/main/java/com/fireblocks/sdk/model/AllowlistEntry.java src/main/java/com/fireblocks/sdk/model/AllowlistEntryResponse.java src/main/java/com/fireblocks/sdk/model/AllowlistEntryStatus.java @@ -1435,6 +1494,7 @@ src/main/java/com/fireblocks/sdk/model/AmountRangeMinMax2.java src/main/java/com/fireblocks/sdk/model/ApiKey.java src/main/java/com/fireblocks/sdk/model/ApiKeysPaginatedResponse.java src/main/java/com/fireblocks/sdk/model/ApprovalRequest.java +src/main/java/com/fireblocks/sdk/model/ApprovalRequestItem.java src/main/java/com/fireblocks/sdk/model/ApproversConfig.java src/main/java/com/fireblocks/sdk/model/ApproversConfigApprovalGroupsInner.java src/main/java/com/fireblocks/sdk/model/Apy.java @@ -1511,9 +1571,19 @@ src/main/java/com/fireblocks/sdk/model/ByorkVerdictEnum.java src/main/java/com/fireblocks/sdk/model/ByorkVerdictRequest.java src/main/java/com/fireblocks/sdk/model/ByorkVerdictResponse.java src/main/java/com/fireblocks/sdk/model/ByorkVerdictResponseStatusEnum.java +src/main/java/com/fireblocks/sdk/model/CallAccepted.java src/main/java/com/fireblocks/sdk/model/CallbackHandler.java src/main/java/com/fireblocks/sdk/model/CallbackHandlerRequest.java src/main/java/com/fireblocks/sdk/model/CancelTransactionResponse.java +src/main/java/com/fireblocks/sdk/model/CantonCall.java +src/main/java/com/fireblocks/sdk/model/CantonCallAllocationWithdraw.java +src/main/java/com/fireblocks/sdk/model/CantonCallAllowListAdd.java +src/main/java/com/fireblocks/sdk/model/CantonCallAllowListRemove.java +src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorInvite.java +src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorInviteCancel.java +src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorOffboard.java +src/main/java/com/fireblocks/sdk/model/CantonCallParticipantOnboarding.java +src/main/java/com/fireblocks/sdk/model/CantonCallTransferWithdraw.java src/main/java/com/fireblocks/sdk/model/ChainDescriptor.java src/main/java/com/fireblocks/sdk/model/ChainInfoResponse.java src/main/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmations.java @@ -1654,6 +1724,7 @@ src/main/java/com/fireblocks/sdk/model/CreateVaultAccountConnectionRequest.java src/main/java/com/fireblocks/sdk/model/CreateVaultAccountRequest.java src/main/java/com/fireblocks/sdk/model/CreateVaultAssetResponse.java src/main/java/com/fireblocks/sdk/model/CreateWalletRequest.java +src/main/java/com/fireblocks/sdk/model/CreateWebhookOAuthRequest.java src/main/java/com/fireblocks/sdk/model/CreateWebhookRequest.java src/main/java/com/fireblocks/sdk/model/CreateWorkflowExecutionRequestParamsInner.java src/main/java/com/fireblocks/sdk/model/CustomRoutingDest.java @@ -1667,6 +1738,7 @@ src/main/java/com/fireblocks/sdk/model/DelegationBlockchainPositionInfo.java src/main/java/com/fireblocks/sdk/model/DelegationSummary.java src/main/java/com/fireblocks/sdk/model/DeleteNetworkConnectionResponse.java src/main/java/com/fireblocks/sdk/model/DeleteNetworkIdResponse.java +src/main/java/com/fireblocks/sdk/model/DeleteWebhookOAuthResponse.java src/main/java/com/fireblocks/sdk/model/DeployLayerZeroAdaptersRequest.java src/main/java/com/fireblocks/sdk/model/DeployableAddressResponse.java src/main/java/com/fireblocks/sdk/model/DeployedContractNotFoundError.java @@ -1682,6 +1754,8 @@ src/main/java/com/fireblocks/sdk/model/DestinationTransferPeerPathResponse.java src/main/java/com/fireblocks/sdk/model/DirectAccess.java src/main/java/com/fireblocks/sdk/model/DirectAccessProvider.java src/main/java/com/fireblocks/sdk/model/DirectAccessProviderInfo.java +src/main/java/com/fireblocks/sdk/model/DirectAccessResponse.java +src/main/java/com/fireblocks/sdk/model/DirectAccessResponseInfo.java src/main/java/com/fireblocks/sdk/model/DisbursementAmountInstruction.java src/main/java/com/fireblocks/sdk/model/DisbursementConfigOperation.java src/main/java/com/fireblocks/sdk/model/DisbursementInstruction.java @@ -1732,6 +1806,7 @@ src/main/java/com/fireblocks/sdk/model/EmbeddedWalletSetUpStatus.java src/main/java/com/fireblocks/sdk/model/EmbeddedWalletSetupStatusResponse.java src/main/java/com/fireblocks/sdk/model/EnableDevice.java src/main/java/com/fireblocks/sdk/model/EnableWallet.java +src/main/java/com/fireblocks/sdk/model/EndInvestorPayload.java src/main/java/com/fireblocks/sdk/model/ErrorResponse.java src/main/java/com/fireblocks/sdk/model/ErrorResponseError.java src/main/java/com/fireblocks/sdk/model/ErrorSchema.java @@ -1903,6 +1978,7 @@ src/main/java/com/fireblocks/sdk/model/LegacySrcOrDestAttributesInner.java src/main/java/com/fireblocks/sdk/model/LegalEntityRegistration.java src/main/java/com/fireblocks/sdk/model/LeiStatus.java src/main/java/com/fireblocks/sdk/model/LinkedTokensCount.java +src/main/java/com/fireblocks/sdk/model/ListApprovalsResponse.java src/main/java/com/fireblocks/sdk/model/ListAssetsResponse.java src/main/java/com/fireblocks/sdk/model/ListBlockchainsResponse.java src/main/java/com/fireblocks/sdk/model/ListBlockchainsResponse2.java @@ -1959,7 +2035,17 @@ src/main/java/com/fireblocks/sdk/model/NotificationPaginatedResponse.java src/main/java/com/fireblocks/sdk/model/NotificationStatus.java src/main/java/com/fireblocks/sdk/model/NotificationWithData.java src/main/java/com/fireblocks/sdk/model/Offer.java +src/main/java/com/fireblocks/sdk/model/OfferResponse.java +src/main/java/com/fireblocks/sdk/model/OfferResponseAccepted.java +src/main/java/com/fireblocks/sdk/model/OfferResponseAllocation.java +src/main/java/com/fireblocks/sdk/model/OfferResponseOnboarding.java +src/main/java/com/fireblocks/sdk/model/OfferResponseTransfer.java src/main/java/com/fireblocks/sdk/model/OffersResponse.java +src/main/java/com/fireblocks/sdk/model/OnboardingResponse.java +src/main/java/com/fireblocks/sdk/model/OnboardingResponseDtccAccept.java +src/main/java/com/fireblocks/sdk/model/OnboardingResponseDtccReject.java +src/main/java/com/fireblocks/sdk/model/OnboardingResponseTradewebAccept.java +src/main/java/com/fireblocks/sdk/model/OnboardingResponseTradewebReject.java src/main/java/com/fireblocks/sdk/model/OnchainTransaction.java src/main/java/com/fireblocks/sdk/model/OnchainTransactionsPagedResponse.java src/main/java/com/fireblocks/sdk/model/OnchainTransactionsPagedResponse2.java @@ -1989,6 +2075,7 @@ src/main/java/com/fireblocks/sdk/model/PairApiKeyRequest.java src/main/java/com/fireblocks/sdk/model/PairApiKeyResponse.java src/main/java/com/fireblocks/sdk/model/Parameter.java src/main/java/com/fireblocks/sdk/model/ParameterWithValue.java +src/main/java/com/fireblocks/sdk/model/ParticipantOnboardingPayload.java src/main/java/com/fireblocks/sdk/model/ParticipantRelationshipType.java src/main/java/com/fireblocks/sdk/model/ParticipantsIdentification.java src/main/java/com/fireblocks/sdk/model/ParticipantsIdentificationPolicy.java @@ -2059,6 +2146,13 @@ src/main/java/com/fireblocks/sdk/model/ProvidersListResponse.java src/main/java/com/fireblocks/sdk/model/PublicKeyInformation.java src/main/java/com/fireblocks/sdk/model/PublishDraftRequest.java src/main/java/com/fireblocks/sdk/model/PublishResult.java +src/main/java/com/fireblocks/sdk/model/QuorumApprovalState.java +src/main/java/com/fireblocks/sdk/model/QuorumGroup.java +src/main/java/com/fireblocks/sdk/model/QuorumRequestState.java +src/main/java/com/fireblocks/sdk/model/QuorumRuleset.java +src/main/java/com/fireblocks/sdk/model/QuorumStatus.java +src/main/java/com/fireblocks/sdk/model/QuorumStatusQuorum.java +src/main/java/com/fireblocks/sdk/model/QuorumUser.java src/main/java/com/fireblocks/sdk/model/Quote.java src/main/java/com/fireblocks/sdk/model/QuoteExecutionRequestDetails.java src/main/java/com/fireblocks/sdk/model/QuoteExecutionStep.java @@ -2125,6 +2219,7 @@ src/main/java/com/fireblocks/sdk/model/RewardsInfo.java src/main/java/com/fireblocks/sdk/model/RoleDetails.java src/main/java/com/fireblocks/sdk/model/RoleDetails2.java src/main/java/com/fireblocks/sdk/model/RoleGrantee.java +src/main/java/com/fireblocks/sdk/model/RulesetQuorum.java src/main/java/com/fireblocks/sdk/model/SEPAAddress.java src/main/java/com/fireblocks/sdk/model/SEPADestination.java src/main/java/com/fireblocks/sdk/model/SOLAccount.java @@ -2198,6 +2293,7 @@ src/main/java/com/fireblocks/sdk/model/Side.java src/main/java/com/fireblocks/sdk/model/SignedMessage.java src/main/java/com/fireblocks/sdk/model/SignedMessageSignature.java src/main/java/com/fireblocks/sdk/model/SigningKeyDto.java +src/main/java/com/fireblocks/sdk/model/SimpleQuorum.java src/main/java/com/fireblocks/sdk/model/SmartTransferApproveTerm.java src/main/java/com/fireblocks/sdk/model/SmartTransferBadRequestResponse.java src/main/java/com/fireblocks/sdk/model/SmartTransferCoinStatistic.java @@ -2416,7 +2512,11 @@ src/main/java/com/fireblocks/sdk/model/TransferPeerTypeEnum.java src/main/java/com/fireblocks/sdk/model/TransferPeerTypeEnum2.java src/main/java/com/fireblocks/sdk/model/TransferRail.java src/main/java/com/fireblocks/sdk/model/TransferReceipt.java +src/main/java/com/fireblocks/sdk/model/TransferResponse.java +src/main/java/com/fireblocks/sdk/model/TransferResponseAccept.java +src/main/java/com/fireblocks/sdk/model/TransferResponseReject.java src/main/java/com/fireblocks/sdk/model/TransferValidationFailure.java +src/main/java/com/fireblocks/sdk/model/TransferWithdrawPayload.java src/main/java/com/fireblocks/sdk/model/TravelRuleActionEnum.java src/main/java/com/fireblocks/sdk/model/TravelRuleAddress.java src/main/java/com/fireblocks/sdk/model/TravelRuleCreateTransactionRequest.java @@ -2490,6 +2590,7 @@ src/main/java/com/fireblocks/sdk/model/UpdateTagRequest.java src/main/java/com/fireblocks/sdk/model/UpdateTokenOwnershipStatusDto.java src/main/java/com/fireblocks/sdk/model/UpdateVaultAccountAssetAddressRequest.java src/main/java/com/fireblocks/sdk/model/UpdateVaultAccountRequest.java +src/main/java/com/fireblocks/sdk/model/UpdateWebhookOAuthRequest.java src/main/java/com/fireblocks/sdk/model/UpdateWebhookRequest.java src/main/java/com/fireblocks/sdk/model/UsWirePaymentInfo.java src/main/java/com/fireblocks/sdk/model/UsdcGatewayWalletAsset.java @@ -2536,6 +2637,7 @@ src/main/java/com/fireblocks/sdk/model/WebhookMetric.java src/main/java/com/fireblocks/sdk/model/WebhookMtls.java src/main/java/com/fireblocks/sdk/model/WebhookMtlsCsrResponse.java src/main/java/com/fireblocks/sdk/model/WebhookOAuth.java +src/main/java/com/fireblocks/sdk/model/WebhookOAuthCredentials.java src/main/java/com/fireblocks/sdk/model/WebhookOAuthResponse.java src/main/java/com/fireblocks/sdk/model/WebhookPaginatedResponse.java src/main/java/com/fireblocks/sdk/model/WithdrawRequest.java @@ -2555,6 +2657,7 @@ src/test/java/com/fireblocks/sdk/FireblocksTest.java src/test/java/com/fireblocks/sdk/UserAgentUtilTest.java src/test/java/com/fireblocks/sdk/ValidationUtilsTest.java src/test/java/com/fireblocks/sdk/api/ApiUserApiTest.java +src/test/java/com/fireblocks/sdk/api/ApprovalsBetaApiTest.java src/test/java/com/fireblocks/sdk/api/AuditLogsApiTest.java src/test/java/com/fireblocks/sdk/api/BlockchainLinkBetaApiTest.java src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java @@ -2616,7 +2719,9 @@ 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 src/test/java/com/fireblocks/sdk/model/AccessRegistrySummaryResponseTest.java +src/test/java/com/fireblocks/sdk/model/AccessTypeResponseTest.java src/test/java/com/fireblocks/sdk/model/AccessTypeTest.java +src/test/java/com/fireblocks/sdk/model/AccountAccessResponseTest.java src/test/java/com/fireblocks/sdk/model/AccountAccessTest.java src/test/java/com/fireblocks/sdk/model/AccountBaseTest.java src/test/java/com/fireblocks/sdk/model/AccountBasedAccessProviderInfoTest.java @@ -2671,6 +2776,11 @@ src/test/java/com/fireblocks/sdk/model/AddressReverseLookupResponseTest.java src/test/java/com/fireblocks/sdk/model/AddressesFiltersTest.java src/test/java/com/fireblocks/sdk/model/AlertExposureTypeEnumTest.java src/test/java/com/fireblocks/sdk/model/AlertLevelEnumTest.java +src/test/java/com/fireblocks/sdk/model/AllocationResponseAcceptTest.java +src/test/java/com/fireblocks/sdk/model/AllocationResponseRejectTest.java +src/test/java/com/fireblocks/sdk/model/AllocationResponseTest.java +src/test/java/com/fireblocks/sdk/model/AllocationWithdrawPayloadTest.java +src/test/java/com/fireblocks/sdk/model/AllowListPayloadTest.java src/test/java/com/fireblocks/sdk/model/AllowlistEntryResponseTest.java src/test/java/com/fireblocks/sdk/model/AllowlistEntryStatusTest.java src/test/java/com/fireblocks/sdk/model/AllowlistEntryTest.java @@ -2696,6 +2806,7 @@ src/test/java/com/fireblocks/sdk/model/AmountRangeMinMaxTest.java src/test/java/com/fireblocks/sdk/model/AmountRangeTest.java src/test/java/com/fireblocks/sdk/model/ApiKeyTest.java src/test/java/com/fireblocks/sdk/model/ApiKeysPaginatedResponseTest.java +src/test/java/com/fireblocks/sdk/model/ApprovalRequestItemTest.java src/test/java/com/fireblocks/sdk/model/ApprovalRequestTest.java src/test/java/com/fireblocks/sdk/model/ApproversConfigApprovalGroupsInnerTest.java src/test/java/com/fireblocks/sdk/model/ApproversConfigTest.java @@ -2773,9 +2884,19 @@ src/test/java/com/fireblocks/sdk/model/ByorkVerdictEnumTest.java src/test/java/com/fireblocks/sdk/model/ByorkVerdictRequestTest.java src/test/java/com/fireblocks/sdk/model/ByorkVerdictResponseStatusEnumTest.java src/test/java/com/fireblocks/sdk/model/ByorkVerdictResponseTest.java +src/test/java/com/fireblocks/sdk/model/CallAcceptedTest.java src/test/java/com/fireblocks/sdk/model/CallbackHandlerRequestTest.java src/test/java/com/fireblocks/sdk/model/CallbackHandlerTest.java src/test/java/com/fireblocks/sdk/model/CancelTransactionResponseTest.java +src/test/java/com/fireblocks/sdk/model/CantonCallAllocationWithdrawTest.java +src/test/java/com/fireblocks/sdk/model/CantonCallAllowListAddTest.java +src/test/java/com/fireblocks/sdk/model/CantonCallAllowListRemoveTest.java +src/test/java/com/fireblocks/sdk/model/CantonCallEndInvestorInviteCancelTest.java +src/test/java/com/fireblocks/sdk/model/CantonCallEndInvestorInviteTest.java +src/test/java/com/fireblocks/sdk/model/CantonCallEndInvestorOffboardTest.java +src/test/java/com/fireblocks/sdk/model/CantonCallParticipantOnboardingTest.java +src/test/java/com/fireblocks/sdk/model/CantonCallTest.java +src/test/java/com/fireblocks/sdk/model/CantonCallTransferWithdrawTest.java src/test/java/com/fireblocks/sdk/model/ChainDescriptorTest.java src/test/java/com/fireblocks/sdk/model/ChainInfoResponseTest.java src/test/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsTest.java @@ -2916,6 +3037,7 @@ src/test/java/com/fireblocks/sdk/model/CreateVaultAccountConnectionRequestTest.j src/test/java/com/fireblocks/sdk/model/CreateVaultAccountRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateVaultAssetResponseTest.java src/test/java/com/fireblocks/sdk/model/CreateWalletRequestTest.java +src/test/java/com/fireblocks/sdk/model/CreateWebhookOAuthRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateWebhookRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateWorkflowExecutionRequestParamsInnerTest.java src/test/java/com/fireblocks/sdk/model/CustomRoutingDestTest.java @@ -2929,6 +3051,7 @@ src/test/java/com/fireblocks/sdk/model/DelegationSummaryTest.java src/test/java/com/fireblocks/sdk/model/DelegationTest.java src/test/java/com/fireblocks/sdk/model/DeleteNetworkConnectionResponseTest.java src/test/java/com/fireblocks/sdk/model/DeleteNetworkIdResponseTest.java +src/test/java/com/fireblocks/sdk/model/DeleteWebhookOAuthResponseTest.java src/test/java/com/fireblocks/sdk/model/DeployLayerZeroAdaptersRequestTest.java src/test/java/com/fireblocks/sdk/model/DeployableAddressResponseTest.java src/test/java/com/fireblocks/sdk/model/DeployedContractNotFoundErrorTest.java @@ -2943,6 +3066,8 @@ src/test/java/com/fireblocks/sdk/model/DestinationTransferPeerPathResponseTest.j src/test/java/com/fireblocks/sdk/model/DestinationTransferPeerPathTest.java src/test/java/com/fireblocks/sdk/model/DirectAccessProviderInfoTest.java src/test/java/com/fireblocks/sdk/model/DirectAccessProviderTest.java +src/test/java/com/fireblocks/sdk/model/DirectAccessResponseInfoTest.java +src/test/java/com/fireblocks/sdk/model/DirectAccessResponseTest.java src/test/java/com/fireblocks/sdk/model/DirectAccessTest.java src/test/java/com/fireblocks/sdk/model/DisbursementAmountInstructionTest.java src/test/java/com/fireblocks/sdk/model/DisbursementConfigOperationTest.java @@ -2994,6 +3119,7 @@ src/test/java/com/fireblocks/sdk/model/EmbeddedWalletSetupStatusResponseTest.jav src/test/java/com/fireblocks/sdk/model/EmbeddedWalletTest.java src/test/java/com/fireblocks/sdk/model/EnableDeviceTest.java src/test/java/com/fireblocks/sdk/model/EnableWalletTest.java +src/test/java/com/fireblocks/sdk/model/EndInvestorPayloadTest.java src/test/java/com/fireblocks/sdk/model/ErrorResponseErrorTest.java src/test/java/com/fireblocks/sdk/model/ErrorResponseTest.java src/test/java/com/fireblocks/sdk/model/ErrorSchemaTest.java @@ -3165,6 +3291,7 @@ src/test/java/com/fireblocks/sdk/model/LegacySrcOrDestAttributesInnerTest.java src/test/java/com/fireblocks/sdk/model/LegalEntityRegistrationTest.java src/test/java/com/fireblocks/sdk/model/LeiStatusTest.java src/test/java/com/fireblocks/sdk/model/LinkedTokensCountTest.java +src/test/java/com/fireblocks/sdk/model/ListApprovalsResponseTest.java src/test/java/com/fireblocks/sdk/model/ListAssetsResponseTest.java src/test/java/com/fireblocks/sdk/model/ListBlockchainsResponse2Test.java src/test/java/com/fireblocks/sdk/model/ListBlockchainsResponseTest.java @@ -3220,8 +3347,18 @@ src/test/java/com/fireblocks/sdk/model/NotificationPaginatedResponseTest.java src/test/java/com/fireblocks/sdk/model/NotificationStatusTest.java src/test/java/com/fireblocks/sdk/model/NotificationTest.java src/test/java/com/fireblocks/sdk/model/NotificationWithDataTest.java +src/test/java/com/fireblocks/sdk/model/OfferResponseAcceptedTest.java +src/test/java/com/fireblocks/sdk/model/OfferResponseAllocationTest.java +src/test/java/com/fireblocks/sdk/model/OfferResponseOnboardingTest.java +src/test/java/com/fireblocks/sdk/model/OfferResponseTest.java +src/test/java/com/fireblocks/sdk/model/OfferResponseTransferTest.java src/test/java/com/fireblocks/sdk/model/OfferTest.java src/test/java/com/fireblocks/sdk/model/OffersResponseTest.java +src/test/java/com/fireblocks/sdk/model/OnboardingResponseDtccAcceptTest.java +src/test/java/com/fireblocks/sdk/model/OnboardingResponseDtccRejectTest.java +src/test/java/com/fireblocks/sdk/model/OnboardingResponseTest.java +src/test/java/com/fireblocks/sdk/model/OnboardingResponseTradewebAcceptTest.java +src/test/java/com/fireblocks/sdk/model/OnboardingResponseTradewebRejectTest.java src/test/java/com/fireblocks/sdk/model/OnchainTransactionTest.java src/test/java/com/fireblocks/sdk/model/OnchainTransactionsPagedResponse2Test.java src/test/java/com/fireblocks/sdk/model/OnchainTransactionsPagedResponseTest.java @@ -3251,6 +3388,7 @@ src/test/java/com/fireblocks/sdk/model/PairApiKeyRequestTest.java src/test/java/com/fireblocks/sdk/model/PairApiKeyResponseTest.java src/test/java/com/fireblocks/sdk/model/ParameterTest.java src/test/java/com/fireblocks/sdk/model/ParameterWithValueTest.java +src/test/java/com/fireblocks/sdk/model/ParticipantOnboardingPayloadTest.java src/test/java/com/fireblocks/sdk/model/ParticipantRelationshipTypeTest.java src/test/java/com/fireblocks/sdk/model/ParticipantsIdentificationPolicyTest.java src/test/java/com/fireblocks/sdk/model/ParticipantsIdentificationTest.java @@ -3321,6 +3459,13 @@ src/test/java/com/fireblocks/sdk/model/ProvidersListResponseTest.java src/test/java/com/fireblocks/sdk/model/PublicKeyInformationTest.java src/test/java/com/fireblocks/sdk/model/PublishDraftRequestTest.java src/test/java/com/fireblocks/sdk/model/PublishResultTest.java +src/test/java/com/fireblocks/sdk/model/QuorumApprovalStateTest.java +src/test/java/com/fireblocks/sdk/model/QuorumGroupTest.java +src/test/java/com/fireblocks/sdk/model/QuorumRequestStateTest.java +src/test/java/com/fireblocks/sdk/model/QuorumRulesetTest.java +src/test/java/com/fireblocks/sdk/model/QuorumStatusQuorumTest.java +src/test/java/com/fireblocks/sdk/model/QuorumStatusTest.java +src/test/java/com/fireblocks/sdk/model/QuorumUserTest.java src/test/java/com/fireblocks/sdk/model/QuoteExecutionRequestDetailsTest.java src/test/java/com/fireblocks/sdk/model/QuoteExecutionStepTest.java src/test/java/com/fireblocks/sdk/model/QuoteExecutionTypeDetailsTest.java @@ -3387,6 +3532,7 @@ src/test/java/com/fireblocks/sdk/model/RewardsInfoTest.java src/test/java/com/fireblocks/sdk/model/RoleDetails2Test.java src/test/java/com/fireblocks/sdk/model/RoleDetailsTest.java src/test/java/com/fireblocks/sdk/model/RoleGranteeTest.java +src/test/java/com/fireblocks/sdk/model/RulesetQuorumTest.java src/test/java/com/fireblocks/sdk/model/SEPAAddressTest.java src/test/java/com/fireblocks/sdk/model/SEPADestinationTest.java src/test/java/com/fireblocks/sdk/model/SOLAccountTest.java @@ -3460,6 +3606,7 @@ src/test/java/com/fireblocks/sdk/model/SideTest.java src/test/java/com/fireblocks/sdk/model/SignedMessageSignatureTest.java src/test/java/com/fireblocks/sdk/model/SignedMessageTest.java src/test/java/com/fireblocks/sdk/model/SigningKeyDtoTest.java +src/test/java/com/fireblocks/sdk/model/SimpleQuorumTest.java src/test/java/com/fireblocks/sdk/model/SmartTransferApproveTermTest.java src/test/java/com/fireblocks/sdk/model/SmartTransferBadRequestResponseTest.java src/test/java/com/fireblocks/sdk/model/SmartTransferCoinStatisticTest.java @@ -3678,7 +3825,11 @@ src/test/java/com/fireblocks/sdk/model/TransferPeerTypeEnum2Test.java src/test/java/com/fireblocks/sdk/model/TransferPeerTypeEnumTest.java src/test/java/com/fireblocks/sdk/model/TransferRailTest.java src/test/java/com/fireblocks/sdk/model/TransferReceiptTest.java +src/test/java/com/fireblocks/sdk/model/TransferResponseAcceptTest.java +src/test/java/com/fireblocks/sdk/model/TransferResponseRejectTest.java +src/test/java/com/fireblocks/sdk/model/TransferResponseTest.java src/test/java/com/fireblocks/sdk/model/TransferValidationFailureTest.java +src/test/java/com/fireblocks/sdk/model/TransferWithdrawPayloadTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleActionEnumTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleAddressTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleCreateTransactionRequestTest.java @@ -3752,6 +3903,7 @@ src/test/java/com/fireblocks/sdk/model/UpdateTagRequestTest.java src/test/java/com/fireblocks/sdk/model/UpdateTokenOwnershipStatusDtoTest.java src/test/java/com/fireblocks/sdk/model/UpdateVaultAccountAssetAddressRequestTest.java src/test/java/com/fireblocks/sdk/model/UpdateVaultAccountRequestTest.java +src/test/java/com/fireblocks/sdk/model/UpdateWebhookOAuthRequestTest.java src/test/java/com/fireblocks/sdk/model/UpdateWebhookRequestTest.java src/test/java/com/fireblocks/sdk/model/UsWirePaymentInfoTest.java src/test/java/com/fireblocks/sdk/model/UsdcGatewayWalletAssetTest.java @@ -3796,6 +3948,7 @@ src/test/java/com/fireblocks/sdk/model/WebhookEventTest.java src/test/java/com/fireblocks/sdk/model/WebhookMetricTest.java src/test/java/com/fireblocks/sdk/model/WebhookMtlsCsrResponseTest.java src/test/java/com/fireblocks/sdk/model/WebhookMtlsTest.java +src/test/java/com/fireblocks/sdk/model/WebhookOAuthCredentialsTest.java src/test/java/com/fireblocks/sdk/model/WebhookOAuthResponseTest.java src/test/java/com/fireblocks/sdk/model/WebhookOAuthTest.java src/test/java/com/fireblocks/sdk/model/WebhookPaginatedResponseTest.java diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index a321658c..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). - -## [v29.0.0](https://github.com/fireblocks/java-sdk/compare/v15.0.0...v29.0.0) - 2026-09-01 - -### Merged - -- Generated SDK #2809037023 [`#155`](https://github.com/fireblocks/java-sdk/pull/155) - -## [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 711776de..c73e8d5c 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add this dependency to your project's POM: com.fireblocks.sdk fireblocks-sdk - 29.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:29.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-29.0.0.jar` +- `target/fireblocks-sdk-0.0.0.jar` - `target/lib/*.jar` @@ -144,6 +144,8 @@ Class | Method | HTTP request | Description *ApiUserApi* | [**createApiUser**](docs/ApiUserApi.md#createApiUser) | **POST** /management/api_users | Create API Key *ApiUserApi* | [**getApiUsers**](docs/ApiUserApi.md#getApiUsers) | **GET** /management/api_users | Get API Keys *ApiUserApi* | [**issueApiUserPairingToken**](docs/ApiUserApi.md#issueApiUserPairingToken) | **POST** /management/api_users/{userId}/pairing_token | Issue API user pairing token +*ApprovalsBetaApi* | [**getApprovalById**](docs/ApprovalsBetaApi.md#getApprovalById) | **GET** /approvals/{requestId} | Get a single approval request +*ApprovalsBetaApi* | [**getApprovals**](docs/ApprovalsBetaApi.md#getApprovals) | **GET** /approvals | List approval requests *AuditLogsApi* | [**getAuditLogs**](docs/AuditLogsApi.md#getAuditLogs) | **GET** /management/audit_logs | Get audit logs *BlockchainLinkBetaApi* | [**activateBlockchainLinkChain**](docs/BlockchainLinkBetaApi.md#activateBlockchainLinkChain) | **POST** /blockchain_link/blockchains/{blockchainId}/activate | Activate a blockchain (triggers activation workflow) *BlockchainLinkBetaApi* | [**createBlockchainLinkChain**](docs/BlockchainLinkBetaApi.md#createBlockchainLinkChain) | **POST** /blockchain_link/blockchains | Create a new blockchain @@ -578,7 +580,9 @@ Class | Method | HTTP request | Description *WebhooksApi* | [**resendTransactionWebhooks**](docs/WebhooksApi.md#resendTransactionWebhooks) | **POST** /webhooks/resend/{txId} | Resend webhooks for a transaction by ID *WebhooksApi* | [**resendWebhooks**](docs/WebhooksApi.md#resendWebhooks) | **POST** /webhooks/resend | Resend failed webhooks *WebhooksV2Api* | [**createWebhook**](docs/WebhooksV2Api.md#createWebhook) | **POST** /webhooks | Create a new webhook +*WebhooksV2Api* | [**createWebhookOAuth**](docs/WebhooksV2Api.md#createWebhookOAuth) | **POST** /webhooks_settings/oauth | Create OAuth credentials *WebhooksV2Api* | [**deleteWebhook**](docs/WebhooksV2Api.md#deleteWebhook) | **DELETE** /webhooks/{webhookId} | Delete webhook +*WebhooksV2Api* | [**deleteWebhookOAuth**](docs/WebhooksV2Api.md#deleteWebhookOAuth) | **DELETE** /webhooks_settings/oauth/{webhookOauthId} | Delete OAuth credentials *WebhooksV2Api* | [**getMetrics**](docs/WebhooksV2Api.md#getMetrics) | **GET** /webhooks/{webhookId}/metrics/{metricName} | Get webhook metrics *WebhooksV2Api* | [**getMtlsCsr**](docs/WebhooksV2Api.md#getMtlsCsr) | **GET** /webhooks/mtls/csr | Get mTLS CSR *WebhooksV2Api* | [**getNotification**](docs/WebhooksV2Api.md#getNotification) | **GET** /webhooks/{webhookId}/notifications/{notificationId} | Get notification by id @@ -587,12 +591,15 @@ Class | Method | HTTP request | Description *WebhooksV2Api* | [**getResendByQueryJobStatus**](docs/WebhooksV2Api.md#getResendByQueryJobStatus) | **GET** /webhooks/{webhookId}/notifications/resend_by_query/jobs/{jobId} | Get resend by query job status *WebhooksV2Api* | [**getResendJobStatus**](docs/WebhooksV2Api.md#getResendJobStatus) | **GET** /webhooks/{webhookId}/notifications/resend_failed/jobs/{jobId} | Get resend job status *WebhooksV2Api* | [**getWebhook**](docs/WebhooksV2Api.md#getWebhook) | **GET** /webhooks/{webhookId} | Get webhook by id +*WebhooksV2Api* | [**getWebhookOAuth**](docs/WebhooksV2Api.md#getWebhookOAuth) | **GET** /webhooks_settings/oauth/{webhookOauthId} | Get OAuth credentials by id +*WebhooksV2Api* | [**getWebhookOAuths**](docs/WebhooksV2Api.md#getWebhookOAuths) | **GET** /webhooks_settings/oauth | Get all OAuth credentials *WebhooksV2Api* | [**getWebhooks**](docs/WebhooksV2Api.md#getWebhooks) | **GET** /webhooks | Get all webhooks *WebhooksV2Api* | [**resendFailedNotifications**](docs/WebhooksV2Api.md#resendFailedNotifications) | **POST** /webhooks/{webhookId}/notifications/resend_failed | Resend failed notifications *WebhooksV2Api* | [**resendNotificationById**](docs/WebhooksV2Api.md#resendNotificationById) | **POST** /webhooks/{webhookId}/notifications/{notificationId}/resend | Resend notification by id *WebhooksV2Api* | [**resendNotificationsByQuery**](docs/WebhooksV2Api.md#resendNotificationsByQuery) | **POST** /webhooks/{webhookId}/notifications/resend_by_query | Resend notifications by query *WebhooksV2Api* | [**resendNotificationsByResourceId**](docs/WebhooksV2Api.md#resendNotificationsByResourceId) | **POST** /webhooks/{webhookId}/notifications/resend_by_resource | Resend notifications by resource Id *WebhooksV2Api* | [**updateWebhook**](docs/WebhooksV2Api.md#updateWebhook) | **PATCH** /webhooks/{webhookId} | Update webhook +*WebhooksV2Api* | [**updateWebhookOAuth**](docs/WebhooksV2Api.md#updateWebhookOAuth) | **PATCH** /webhooks_settings/oauth/{webhookOauthId} | Update OAuth credentials *WhitelistIpAddressesApi* | [**getWhitelistIpAddresses**](docs/WhitelistIpAddressesApi.md#getWhitelistIpAddresses) | **GET** /management/api_users/{userId}/whitelist_ip_addresses | Get whitelisted ip addresses for an API Key *WorkspaceApi* | [**getWorkspace**](docs/WorkspaceApi.md#getWorkspace) | **GET** /workspace | Get workspace *WorkspaceStatusBetaApi* | [**getWorkspaceStatus**](docs/WorkspaceStatusBetaApi.md#getWorkspaceStatus) | **GET** /management/workspace_status | Returns current workspace status @@ -609,8 +616,10 @@ Class | Method | HTTP request | Description - [AccessRegistryCurrentStateResponse2](docs/AccessRegistryCurrentStateResponse2.md) - [AccessRegistrySummaryResponse](docs/AccessRegistrySummaryResponse.md) - [AccessType](docs/AccessType.md) + - [AccessTypeResponse](docs/AccessTypeResponse.md) - [Account](docs/Account.md) - [AccountAccess](docs/AccountAccess.md) + - [AccountAccessResponse](docs/AccountAccessResponse.md) - [AccountBase](docs/AccountBase.md) - [AccountBasedAccessProvider](docs/AccountBasedAccessProvider.md) - [AccountBasedAccessProviderInfo](docs/AccountBasedAccessProviderInfo.md) @@ -663,6 +672,11 @@ Class | Method | HTTP request | Description - [AddressesFilters](docs/AddressesFilters.md) - [AlertExposureTypeEnum](docs/AlertExposureTypeEnum.md) - [AlertLevelEnum](docs/AlertLevelEnum.md) + - [AllocationResponse](docs/AllocationResponse.md) + - [AllocationResponseAccept](docs/AllocationResponseAccept.md) + - [AllocationResponseReject](docs/AllocationResponseReject.md) + - [AllocationWithdrawPayload](docs/AllocationWithdrawPayload.md) + - [AllowListPayload](docs/AllowListPayload.md) - [AllowlistEntry](docs/AllowlistEntry.md) - [AllowlistEntryResponse](docs/AllowlistEntryResponse.md) - [AllowlistEntryStatus](docs/AllowlistEntryStatus.md) @@ -689,6 +703,7 @@ Class | Method | HTTP request | Description - [ApiKey](docs/ApiKey.md) - [ApiKeysPaginatedResponse](docs/ApiKeysPaginatedResponse.md) - [ApprovalRequest](docs/ApprovalRequest.md) + - [ApprovalRequestItem](docs/ApprovalRequestItem.md) - [ApproversConfig](docs/ApproversConfig.md) - [ApproversConfigApprovalGroupsInner](docs/ApproversConfigApprovalGroupsInner.md) - [Apy](docs/Apy.md) @@ -765,9 +780,19 @@ Class | Method | HTTP request | Description - [ByorkVerdictRequest](docs/ByorkVerdictRequest.md) - [ByorkVerdictResponse](docs/ByorkVerdictResponse.md) - [ByorkVerdictResponseStatusEnum](docs/ByorkVerdictResponseStatusEnum.md) + - [CallAccepted](docs/CallAccepted.md) - [CallbackHandler](docs/CallbackHandler.md) - [CallbackHandlerRequest](docs/CallbackHandlerRequest.md) - [CancelTransactionResponse](docs/CancelTransactionResponse.md) + - [CantonCall](docs/CantonCall.md) + - [CantonCallAllocationWithdraw](docs/CantonCallAllocationWithdraw.md) + - [CantonCallAllowListAdd](docs/CantonCallAllowListAdd.md) + - [CantonCallAllowListRemove](docs/CantonCallAllowListRemove.md) + - [CantonCallEndInvestorInvite](docs/CantonCallEndInvestorInvite.md) + - [CantonCallEndInvestorInviteCancel](docs/CantonCallEndInvestorInviteCancel.md) + - [CantonCallEndInvestorOffboard](docs/CantonCallEndInvestorOffboard.md) + - [CantonCallParticipantOnboarding](docs/CantonCallParticipantOnboarding.md) + - [CantonCallTransferWithdraw](docs/CantonCallTransferWithdraw.md) - [ChainDescriptor](docs/ChainDescriptor.md) - [ChainInfoResponse](docs/ChainInfoResponse.md) - [ChannelDvnConfigWithConfirmations](docs/ChannelDvnConfigWithConfirmations.md) @@ -908,6 +933,7 @@ Class | Method | HTTP request | Description - [CreateVaultAccountRequest](docs/CreateVaultAccountRequest.md) - [CreateVaultAssetResponse](docs/CreateVaultAssetResponse.md) - [CreateWalletRequest](docs/CreateWalletRequest.md) + - [CreateWebhookOAuthRequest](docs/CreateWebhookOAuthRequest.md) - [CreateWebhookRequest](docs/CreateWebhookRequest.md) - [CreateWorkflowExecutionRequestParamsInner](docs/CreateWorkflowExecutionRequestParamsInner.md) - [CustomRoutingDest](docs/CustomRoutingDest.md) @@ -921,6 +947,7 @@ Class | Method | HTTP request | Description - [DelegationSummary](docs/DelegationSummary.md) - [DeleteNetworkConnectionResponse](docs/DeleteNetworkConnectionResponse.md) - [DeleteNetworkIdResponse](docs/DeleteNetworkIdResponse.md) + - [DeleteWebhookOAuthResponse](docs/DeleteWebhookOAuthResponse.md) - [DeployLayerZeroAdaptersRequest](docs/DeployLayerZeroAdaptersRequest.md) - [DeployableAddressResponse](docs/DeployableAddressResponse.md) - [DeployedContractNotFoundError](docs/DeployedContractNotFoundError.md) @@ -936,6 +963,8 @@ Class | Method | HTTP request | Description - [DirectAccess](docs/DirectAccess.md) - [DirectAccessProvider](docs/DirectAccessProvider.md) - [DirectAccessProviderInfo](docs/DirectAccessProviderInfo.md) + - [DirectAccessResponse](docs/DirectAccessResponse.md) + - [DirectAccessResponseInfo](docs/DirectAccessResponseInfo.md) - [DisbursementAmountInstruction](docs/DisbursementAmountInstruction.md) - [DisbursementConfigOperation](docs/DisbursementConfigOperation.md) - [DisbursementInstruction](docs/DisbursementInstruction.md) @@ -986,6 +1015,7 @@ Class | Method | HTTP request | Description - [EmbeddedWalletSetupStatusResponse](docs/EmbeddedWalletSetupStatusResponse.md) - [EnableDevice](docs/EnableDevice.md) - [EnableWallet](docs/EnableWallet.md) + - [EndInvestorPayload](docs/EndInvestorPayload.md) - [ErrorResponse](docs/ErrorResponse.md) - [ErrorResponseError](docs/ErrorResponseError.md) - [ErrorSchema](docs/ErrorSchema.md) @@ -1157,6 +1187,7 @@ Class | Method | HTTP request | Description - [LegalEntityRegistration](docs/LegalEntityRegistration.md) - [LeiStatus](docs/LeiStatus.md) - [LinkedTokensCount](docs/LinkedTokensCount.md) + - [ListApprovalsResponse](docs/ListApprovalsResponse.md) - [ListAssetsResponse](docs/ListAssetsResponse.md) - [ListBlockchainsResponse](docs/ListBlockchainsResponse.md) - [ListBlockchainsResponse2](docs/ListBlockchainsResponse2.md) @@ -1213,7 +1244,17 @@ Class | Method | HTTP request | Description - [NotificationStatus](docs/NotificationStatus.md) - [NotificationWithData](docs/NotificationWithData.md) - [Offer](docs/Offer.md) + - [OfferResponse](docs/OfferResponse.md) + - [OfferResponseAccepted](docs/OfferResponseAccepted.md) + - [OfferResponseAllocation](docs/OfferResponseAllocation.md) + - [OfferResponseOnboarding](docs/OfferResponseOnboarding.md) + - [OfferResponseTransfer](docs/OfferResponseTransfer.md) - [OffersResponse](docs/OffersResponse.md) + - [OnboardingResponse](docs/OnboardingResponse.md) + - [OnboardingResponseDtccAccept](docs/OnboardingResponseDtccAccept.md) + - [OnboardingResponseDtccReject](docs/OnboardingResponseDtccReject.md) + - [OnboardingResponseTradewebAccept](docs/OnboardingResponseTradewebAccept.md) + - [OnboardingResponseTradewebReject](docs/OnboardingResponseTradewebReject.md) - [OnchainTransaction](docs/OnchainTransaction.md) - [OnchainTransactionsPagedResponse](docs/OnchainTransactionsPagedResponse.md) - [OnchainTransactionsPagedResponse2](docs/OnchainTransactionsPagedResponse2.md) @@ -1243,6 +1284,7 @@ Class | Method | HTTP request | Description - [PairApiKeyResponse](docs/PairApiKeyResponse.md) - [Parameter](docs/Parameter.md) - [ParameterWithValue](docs/ParameterWithValue.md) + - [ParticipantOnboardingPayload](docs/ParticipantOnboardingPayload.md) - [ParticipantRelationshipType](docs/ParticipantRelationshipType.md) - [ParticipantsIdentification](docs/ParticipantsIdentification.md) - [ParticipantsIdentificationPolicy](docs/ParticipantsIdentificationPolicy.md) @@ -1313,6 +1355,13 @@ Class | Method | HTTP request | Description - [PublicKeyInformation](docs/PublicKeyInformation.md) - [PublishDraftRequest](docs/PublishDraftRequest.md) - [PublishResult](docs/PublishResult.md) + - [QuorumApprovalState](docs/QuorumApprovalState.md) + - [QuorumGroup](docs/QuorumGroup.md) + - [QuorumRequestState](docs/QuorumRequestState.md) + - [QuorumRuleset](docs/QuorumRuleset.md) + - [QuorumStatus](docs/QuorumStatus.md) + - [QuorumStatusQuorum](docs/QuorumStatusQuorum.md) + - [QuorumUser](docs/QuorumUser.md) - [Quote](docs/Quote.md) - [QuoteExecutionRequestDetails](docs/QuoteExecutionRequestDetails.md) - [QuoteExecutionStep](docs/QuoteExecutionStep.md) @@ -1379,6 +1428,7 @@ Class | Method | HTTP request | Description - [RoleDetails](docs/RoleDetails.md) - [RoleDetails2](docs/RoleDetails2.md) - [RoleGrantee](docs/RoleGrantee.md) + - [RulesetQuorum](docs/RulesetQuorum.md) - [SEPAAddress](docs/SEPAAddress.md) - [SEPADestination](docs/SEPADestination.md) - [SOLAccount](docs/SOLAccount.md) @@ -1452,6 +1502,7 @@ Class | Method | HTTP request | Description - [SignedMessage](docs/SignedMessage.md) - [SignedMessageSignature](docs/SignedMessageSignature.md) - [SigningKeyDto](docs/SigningKeyDto.md) + - [SimpleQuorum](docs/SimpleQuorum.md) - [SmartTransferApproveTerm](docs/SmartTransferApproveTerm.md) - [SmartTransferBadRequestResponse](docs/SmartTransferBadRequestResponse.md) - [SmartTransferCoinStatistic](docs/SmartTransferCoinStatistic.md) @@ -1670,7 +1721,11 @@ Class | Method | HTTP request | Description - [TransferPeerTypeEnum2](docs/TransferPeerTypeEnum2.md) - [TransferRail](docs/TransferRail.md) - [TransferReceipt](docs/TransferReceipt.md) + - [TransferResponse](docs/TransferResponse.md) + - [TransferResponseAccept](docs/TransferResponseAccept.md) + - [TransferResponseReject](docs/TransferResponseReject.md) - [TransferValidationFailure](docs/TransferValidationFailure.md) + - [TransferWithdrawPayload](docs/TransferWithdrawPayload.md) - [TravelRuleActionEnum](docs/TravelRuleActionEnum.md) - [TravelRuleAddress](docs/TravelRuleAddress.md) - [TravelRuleCreateTransactionRequest](docs/TravelRuleCreateTransactionRequest.md) @@ -1744,6 +1799,7 @@ Class | Method | HTTP request | Description - [UpdateTokenOwnershipStatusDto](docs/UpdateTokenOwnershipStatusDto.md) - [UpdateVaultAccountAssetAddressRequest](docs/UpdateVaultAccountAssetAddressRequest.md) - [UpdateVaultAccountRequest](docs/UpdateVaultAccountRequest.md) + - [UpdateWebhookOAuthRequest](docs/UpdateWebhookOAuthRequest.md) - [UpdateWebhookRequest](docs/UpdateWebhookRequest.md) - [UsWirePaymentInfo](docs/UsWirePaymentInfo.md) - [UsdcGatewayWalletAsset](docs/UsdcGatewayWalletAsset.md) @@ -1790,6 +1846,7 @@ Class | Method | HTTP request | Description - [WebhookMtls](docs/WebhookMtls.md) - [WebhookMtlsCsrResponse](docs/WebhookMtlsCsrResponse.md) - [WebhookOAuth](docs/WebhookOAuth.md) + - [WebhookOAuthCredentials](docs/WebhookOAuthCredentials.md) - [WebhookOAuthResponse](docs/WebhookOAuthResponse.md) - [WebhookPaginatedResponse](docs/WebhookPaginatedResponse.md) - [WithdrawRequest](docs/WithdrawRequest.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 1212572a..b018f316 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -362,6 +362,227 @@ paths: \ idempotency_key);" x-accepts: - application/json + /approvals: + get: + description: |- + Retrieve the pending approval requests the authenticated API user is eligible to act on, including requests the user has already approved that are still pending overall. + + The response is scoped to the authenticated user by default. Pass `userId` to read another user's queue, or `includeAllUsers=true` to read every pending request in the workspace. Both require an Admin, Non-Signing Admin, Security Admin or Security Auditor role and are rejected with 403 otherwise. + + Set `quorumStatusMode=SUMMARY` to include each request's approval thresholds and counts. The per-approver breakdown is available only when fetching a single request — see `GET /approvals/{requestId}`. + + Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin, Security Auditor. + operationId: getApprovals + parameters: + - description: "When true, also include requests the authenticated user has\ + \ already approved that are still pending overall. Defaults to false (only\ + \ requests the user has not yet acted on)." + explode: true + in: query + name: includeUserApproved + required: false + schema: + type: boolean + style: form + - description: "Return the pending requests for this user instead of the authenticated\ + \ user. Requires an Admin, Non-Signing Admin, Security Admin or Security\ + \ Auditor role; other roles are rejected with 403. Cannot be combined with\ + \ `includeAllUsers=true` — sending both is rejected with 400." + example: 8f3c1a2e-4b7d-4c91-a0e5-2d6f8b1c3a94 + explode: true + in: query + name: userId + required: false + schema: + type: string + style: form + - description: "When true, return every pending request in the workspace instead\ + \ of a single user's queue. Defaults to false. Requires an Admin, Non-Signing\ + \ Admin, Security Admin or Security Auditor role; other roles are rejected\ + \ with 403. In this mode `userStatus` is always `USER_STATUS_NOT_APPLICABLE`,\ + \ because the response is not scoped to one user, and `includeUserApproved`\ + \ has no effect. Cannot be combined with `userId`." + explode: true + in: query + name: includeAllUsers + required: false + schema: + default: false + type: boolean + style: form + - description: "How much quorum detail to include in each request's `quorumStatus`.\ + \ `NONE` (the default) returns it as `null`. `SUMMARY` returns the approval\ + \ thresholds, current counts and status. `FULL` is rejected with 400 on\ + \ this endpoint because the per-approver breakdown requires a single request\ + \ — use `GET /approvals/{requestId}` for it. Any other value is rejected\ + \ with 400; the parameter is case-sensitive." + explode: true + in: query + name: quorumStatusMode + required: false + schema: + default: NONE + enum: + - NONE + - SUMMARY + type: string + style: form + - description: Number of results per page. Maximum 30. Defaults to 20. + explode: true + in: query + name: pageSize + required: false + schema: + default: 20 + maximum: 30 + minimum: 1 + type: integer + style: form + - description: Cursor returned from the previous response (the `next` field) + to fetch the next page. + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ListApprovalsResponse" + description: Approval requests the authenticated user is eligible to act + on. + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: List approval requests + tags: + - Approvals (Beta) + x-rate-limit-category: query + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.approvalsBeta.getApprovals(approvalsBetaApiGetApprovalsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response =\ + \ fireblocks.approvalsBeta().getApprovals(includeUserApproved, userId,\ + \ includeAllUsers, quorumStatusMode, pageSize, pageCursor);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.approvals_beta.get_approvals(include_user_approved,\ + \ user_id, include_all_users, quorum_status_mode, page_size, page_cursor);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.approvalsBeta.getApprovals(approvalsBetaApiGetApprovalsRequest);" + - lang: Java + source: "CompletableFuture> response =\ + \ fireblocks.approvalsBeta().getApprovals(includeUserApproved, userId, includeAllUsers,\ + \ quorumStatusMode, pageSize, pageCursor);" + - lang: Python + source: "response = fireblocks.approvals_beta.get_approvals(include_user_approved,\ + \ user_id, include_all_users, quorum_status_mode, page_size, page_cursor);" + x-accepts: + - application/json + /approvals/{requestId}: + get: + description: |- + Retrieve full detail for a single approval request by ID, including the payload to sign and, when requested, the request's `quorumStatus`. + + Because this endpoint addresses one request, it accepts `quorumStatusMode=FULL`, which adds the participating approvers and their individual approval state. + + `userStatus` reflects the authenticated user by default. Pass `userId` to report it for another user instead. + + Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin, Security Auditor. + operationId: getApprovalById + parameters: + - description: The approval request ID. + explode: false + in: path + name: requestId + required: true + schema: + type: string + style: simple + - description: "Report `userStatus` for this user instead of the authenticated\ + \ user. This selects whose approval state is returned; it does not change\ + \ which requests can be fetched. Requires an Admin, Non-Signing Admin, Security\ + \ Admin or Security Auditor role; other roles are rejected with 403." + example: 8f3c1a2e-4b7d-4c91-a0e5-2d6f8b1c3a94 + explode: true + in: query + name: userId + required: false + schema: + type: string + style: form + - description: "How much quorum detail to include in `quorumStatus`. `NONE`\ + \ (the default) returns it as `null`. `SUMMARY` returns the approval thresholds,\ + \ current counts and status. `FULL` adds `users` and the per-group `members`\ + \ indexes identifying who may approve and who already has. Any other value\ + \ is rejected with 400; the parameter is case-sensitive." + explode: true + in: query + name: quorumStatusMode + required: false + schema: + default: NONE + enum: + - NONE + - SUMMARY + - FULL + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ApprovalRequestItem" + description: The requested approval request. + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Get a single approval request + tags: + - Approvals (Beta) + x-rate-limit-category: query + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.approvalsBeta.getApprovalById(approvalsBetaApiGetApprovalByIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.approvalsBeta().getApprovalById(requestId,\ + \ userId, quorumStatusMode);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.approvals_beta.get_approval_by_id(request_id,\ + \ user_id, quorum_status_mode);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.approvalsBeta.getApprovalById(approvalsBetaApiGetApprovalByIdRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.approvalsBeta().getApprovalById(requestId,\ + \ userId, quorumStatusMode);" + - lang: Python + source: "response = fireblocks.approvals_beta.get_approval_by_id(request_id,\ + \ user_id, quorum_status_mode);" + x-accepts: + - application/json /management/audit_logs: get: description: |- @@ -1956,6 +2177,183 @@ paths: source: response = fireblocks.blockchains_&_assets.get_supported_assets(); x-accepts: - application/json + /operations/canton/calls: + post: + description: |- + Submits one Canton call. `type` names the call and selects the shape of `payload`. + An unknown or missing `type`, or a `payload` missing a required field, is a `400`. A field that does not belong to the selected `type` is ignored rather than rejected. + Four types are specified but not available in v1 and return `501`: `DTCC_END_INVESTOR_INVITE_CANCEL`, `DTCC_END_INVESTOR_OFFBOARD`, `DTCC_ALLOW_LIST_ADD`, `DTCC_ALLOW_LIST_REMOVE`. `TRANSFER_WITHDRAW` has no owning service at all. + operationId: createCantonCall + parameters: + - 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/CantonCall" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/CallAccepted" + description: The outgoing transaction that carries the call. + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: "Unknown or missing type, a missing required payload field,\ + \ or an invalid party id, asset, or expiry" + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: "No Canton wallet for this vault account and asset, or an unknown\ + \ transaction id for this tenant" + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: "The target is not in a state this call can act on, or more\ + \ than one candidate contract matched the wallet" + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "501": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: This call type is not available in v1 + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Make a Canton call + tags: + - Canton (Beta) + x-rate-limit-category: write + x-internal: true + x-content-type: application/json + x-accepts: + - application/json + /operations/canton/offers/{offerId}/responses: + post: + description: |- + ONE endpoint for every offer domain. Two layers of discrimination, nested: `domain` selects `response`, and inside `response` the `responseType` selects the variant. Both layers are closed, so an onboarding response type sent under `domain: ALLOCATIONS` is a `400`. + {"domain":"ONBOARDING","response":{"responseType":"DTCC_…_REJECT","reason":"KYC"}} + `domain: TRANSFERS` is declared so the endpoint covers every offer domain. Transfer responses are not available yet — the domain is part of the contract, not of v1's behaviour. + operationId: respondToCantonOffer + parameters: + - description: The Fireblocks transaction id of the incoming offer being answered. + explode: false + in: path + name: offerId + required: true + schema: + example: 5a1d8b0f-2c31-4c7e-9d0a-118e7b6c4a21 + 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/OfferResponse" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/OfferResponseAccepted" + description: The outgoing transaction that carries the response. Its on-chain + outcome arrives by webhook as a status update on this transaction. + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: "The responseType does not belong to the declared domain, or\ + \ a required argument is missing" + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: Unknown offer id for this tenant + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: "The responseType is not currently in availableResponses —\ + \ already answered, expired, or a response is in flight" + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "501": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: No handler is implemented for this domain yet + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Answer an offer + tags: + - Canton (Beta) + x-rate-limit-category: write + x-internal: true + x-content-type: application/json + x-accepts: + - application/json /address_registry/legal_entities/{address}: get: description: "Returns legal entity information for the given blockchain address\ @@ -19515,6 +19913,8 @@ paths: description: | Returns a paginated list of FSPM security findings for the workspace. Endpoint Roles: Security Admin, Security Auditor. + + **Note:** This endpoint is available only for the FSPM Pro package. It is not available for FSPM Basic. operationId: getSecurityFindings parameters: - description: Cursor indicating the page position. Omit to fetch the first @@ -19676,6 +20076,8 @@ paths: description: | Returns a single FSPM security finding for the workspace, redacted to the public field set. Endpoint Roles: Security Admin, Security Auditor. + + **Note:** This endpoint is available only for the FSPM Pro package. It is not available for FSPM Basic. operationId: getSecurityFindingById parameters: - description: Unique identifier of the finding @@ -19733,6 +20135,8 @@ paths: Accepts or reopens a finding for the workspace. When accepting a finding (`status: "ACCEPTED"`), `statusUpdatedReason` is required. Endpoint Roles: Security Admin. + + **Note:** This endpoint is available only for the FSPM Pro package. It is not available for FSPM Basic. operationId: updateSecurityFindingById parameters: - description: Unique identifier of the finding @@ -33101,9 +33505,8 @@ paths: /vault/accounts/{vaultAccountId}/{assetId}/activate: post: description: "Initiates activation for a wallet in a vault account. \nActivation\ - \ is required for tokens that need an on-chain transaction for creation (XLM\ - \ tokens, SOL tokens etc).\nEndpoint Permission: Admin, Non-Signing Admin,\ - \ Signer, Approver, Editor." + \ is required for tokens that need an on-chain transaction for creation.\n\ + Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor." operationId: activateAssetForVaultAccount parameters: - description: "The ID of the vault account to return, or 'default' for the\ @@ -36375,6 +36778,332 @@ paths: x-content-type: application/json x-accepts: - application/json + /webhooks_settings/oauth: + get: + description: | + Lists every OAuth credential set for the workspace. Client secrets are never returned. + operationId: getWebhookOAuths + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/WebhookOAuthList" + description: The workspace's OAuth credentials + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Get all OAuth credentials + tags: + - Webhooks V2 + x-rate-limit-category: read + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.webhooksV2.getWebhookOAuths();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture>> response + = fireblocks.webhooksV2().getWebhookOAuths(); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.webhooks_v2.get_webhook_o_auths(); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.webhooksV2.getWebhookOAuths();" + - lang: Java + source: CompletableFuture>> response + = fireblocks.webhooksV2().getWebhookOAuths(); + - lang: Python + source: response = fireblocks.webhooks_v2.get_webhook_o_auths(); + x-accepts: + - application/json + post: + description: | + Creates a reusable OAuth client credential set. Attach it to a webhook by passing the returned id as that webhook's `webhookOauthId`. Several webhooks may share one credential set, so rotating its client secret covers all of them at once. The client secret is write-only and is never returned. + + **Endpoint Permissions:** Owner, Admin, Non-Signing Admin. + operationId: createWebhookOAuth + parameters: + - 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/CreateWebhookOAuthRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/WebhookOAuthCredentials" + description: created the OAuth credentials successfully + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Create OAuth credentials + tags: + - Webhooks V2 + x-rate-limit-category: write + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.webhooksV2.createWebhookOAuth(webhooksV2ApiCreateWebhookOAuthRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.webhooksV2().createWebhookOAuth(createWebhookOAuthRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.webhooks_v2.create_webhook_o_auth(create_webhook_o_auth_request,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.webhooksV2.createWebhookOAuth(webhooksV2ApiCreateWebhookOAuthRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.webhooksV2().createWebhookOAuth(createWebhookOAuthRequest,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.webhooks_v2.create_webhook_o_auth(create_webhook_o_auth_request,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: + - application/json + /webhooks_settings/oauth/{webhookOauthId}: + delete: + description: | + Deletes an OAuth credential set. By default the delete is refused while the credentials are still in use: if any webhook references them, nothing is deleted and the request fails with `409 Conflict`, naming the reason and listing the ids of the referencing webhooks. This protects a shared credential set from being removed out from under the webhooks that depend on it, since several webhooks may reference the same one. + + Pass `forceDelete=true` to delete anyway. That detaches every referencing webhook — it clears each webhook's `webhookOauthId`, it does **not** delete the webhook — then deletes the credential set and returns the deleted resource together with `detachedWebhookIds`. The detached webhooks keep delivering notifications, but without an `Authorization` header, so their endpoints will see unauthenticated deliveries from that point on. + + When nothing references the credentials the delete succeeds either way, and `detachedWebhookIds` comes back empty. + + **Endpoint Permissions:** Owner, Admin, Non-Signing Admin. + operationId: deleteWebhookOAuth + parameters: + - description: The unique identifier of the OAuth credentials + explode: false + in: path + name: webhookOauthId + required: true + schema: + example: 44fcead0-7053-4831-a53a-df7fb90d440f + format: uuid + type: string + style: simple + - description: "Delete the credentials even while webhooks still reference them,\ + \ detaching those webhooks instead of refusing. Leave it unset, or `false`,\ + \ to get a `409 Conflict` whenever anything still references the credentials." + example: true + explode: true + in: query + name: forceDelete + required: false + schema: + default: false + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteWebhookOAuthResponse" + description: "The deleted OAuth credentials, plus the ids of any webhooks\ + \ that were detached from them" + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: "Webhooks still reference these credentials and `forceDelete`\ + \ was not set. Nothing was deleted. The error message names the reason\ + \ and the ids of the referencing webhooks — detach or delete those webhooks,\ + \ or retry with `forceDelete=true`." + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Delete OAuth credentials + tags: + - Webhooks V2 + x-rate-limit-category: write + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.webhooksV2.deleteWebhookOAuth(webhooksV2ApiDeleteWebhookOAuthRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.webhooksV2().deleteWebhookOAuth(webhookOauthId, forceDelete);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.webhooks_v2.delete_webhook_o_auth(webhook_oauth_id,\ + \ force_delete);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.webhooksV2.deleteWebhookOAuth(webhooksV2ApiDeleteWebhookOAuthRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.webhooksV2().deleteWebhookOAuth(webhookOauthId, forceDelete);" + - lang: Python + source: "response = fireblocks.webhooks_v2.delete_webhook_o_auth(webhook_oauth_id,\ + \ force_delete);" + x-accepts: + - application/json + get: + description: | + Retrieve an OAuth credential set by its id. The client secret is never returned. + operationId: getWebhookOAuth + parameters: + - description: The unique identifier of the OAuth credentials + explode: false + in: path + name: webhookOauthId + required: true + schema: + example: 44fcead0-7053-4831-a53a-df7fb90d440f + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/WebhookOAuthCredentials" + description: An OAuth credentials object + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Get OAuth credentials by id + tags: + - Webhooks V2 + x-rate-limit-category: read + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.webhooksV2.getWebhookOAuth(webhooksV2ApiGetWebhookOAuthRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = + fireblocks.webhooksV2().getWebhookOAuth(webhookOauthId); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.webhooks_v2.get_webhook_o_auth(webhook_oauth_id); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.webhooksV2.getWebhookOAuth(webhooksV2ApiGetWebhookOAuthRequest);" + - lang: Java + source: CompletableFuture> response = + fireblocks.webhooksV2().getWebhookOAuth(webhookOauthId); + - lang: Python + source: response = fireblocks.webhooks_v2.get_webhook_o_auth(webhook_oauth_id); + x-accepts: + - application/json + patch: + description: | + Updates only the fields present in the request; anything omitted is left as it is. Sending `clientSecret` on its own rotates the secret for every webhook using these credentials. + + `customJwtClaims`, `customBodyParams` and `customHeaders` are all merged key by key rather than replaced, the same way a webhook's own `customHeaders` behaves: a key sent with a value is added or overwritten, a key sent with a `null` value is deleted, and a key you omit is left alone. Since a `null` inside a map is the delete mechanism, none of the three accepts `null` for the whole field — `customJwtClaims: null`, `customBodyParams: null` or `customHeaders: null` is rejected with a `400` rather than ignored. Clear a map by listing each of its keys with a `null` value. Because `null` is spent on deletion, a claim cannot be set to JSON `null` either, on this endpoint or on create. `mtlsClientSignedCert` is a scalar rather than a map, so `null` there does remove it. + + **Endpoint Permissions:** Owner, Admin, Non-Signing Admin. + operationId: updateWebhookOAuth + parameters: + - description: The unique identifier of the OAuth credentials + explode: false + in: path + name: webhookOauthId + required: true + schema: + example: 44fcead0-7053-4831-a53a-df7fb90d440f + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateWebhookOAuthRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/WebhookOAuthCredentials" + description: Updated OAuth credentials object + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Update OAuth credentials + tags: + - Webhooks V2 + x-rate-limit-category: write + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.webhooksV2.updateWebhookOAuth(webhooksV2ApiUpdateWebhookOAuthRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.webhooksV2().updateWebhookOAuth(updateWebhookOAuthRequest,\ + \ webhookOauthId);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.webhooks_v2.update_webhook_o_auth(update_webhook_o_auth_request,\ + \ webhook_oauth_id);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.webhooksV2.updateWebhookOAuth(webhooksV2ApiUpdateWebhookOAuthRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.webhooksV2().updateWebhookOAuth(updateWebhookOAuthRequest,\ + \ webhookOauthId);" + - lang: Python + source: "response = fireblocks.webhooks_v2.update_webhook_o_auth(update_webhook_o_auth_request,\ + \ webhook_oauth_id);" + x-content-type: application/json + x-accepts: + - application/json /webhooks/{webhookId}: delete: description: | @@ -48018,6 +48747,7 @@ components: - "{}" contractName: contractName errorDescription: errorDescription + requestedFeeCurrency: PATH_USD destinationTag: destinationTag destination: walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 @@ -48854,6 +49584,11 @@ components: description: "The asset which was withdrawn to pay the transaction fee,\ \ for example ETH for EVM-based blockchains, BTC for Tether Omni." type: string + requestedFeeCurrency: + description: "The fee-paying asset requested at transaction creation via\ + \ the `feeCurrency` field, if any." + example: PATH_USD + type: string networkRecords: description: "In case a single transaction resulted with multiple transfers,\ \ for example a result of a contract call, then this parameter specifies\ @@ -53316,6 +54051,8 @@ components: For Polkadot, Kusama and Westend transactions only. When set to true, Fireblocks will empty the asset wallet. **Note:** If set to true when the source account is exactly 1 DOT, the transaction will fail. Any amount more or less than 1 DOT succeeds. This is a Polkadot blockchain limitation. + + **Note:** `forceSweep` and `treatAsGrossAmount` can also be used to empty a TON/GRAM wallet. example: false type: boolean feeLevel: @@ -55234,6 +55971,358 @@ components: nullable: true type: string type: object + QuorumRequestState: + description: The approval request's overall state. Anything other than `PENDING` + means the request is no longer awaiting approvals. + enum: + - PENDING + - APPROVED + - REJECTED + - CANCELLED + - TIMED_OUT + - FAILED + example: PENDING + type: string + QuorumApprovalState: + description: "Whether an approval requirement has been met. Treat this as authoritative\ + \ rather than comparing the counts yourself: a group can show `currentApprovalCount`\ + \ equal to `threshold` and still be `PENDING` when the request additionally\ + \ requires the workspace owner's approval." + enum: + - APPROVED + - PENDING + example: PENDING + type: string + QuorumUser: + description: "A user who participates in this request's approval quorum, and\ + \ their approval state." + properties: + index: + description: Zero-based position of this user within the `users` array. + The `members` arrays elsewhere in the document reference users by this + index rather than repeating the user ID. + example: 0 + type: integer + userId: + description: The participating user's ID. + example: 6073c3d2-9f4b-4c1a-8f7d-2b1e5a9c4d80 + type: string + status: + $ref: "#/components/schemas/QuorumApprovalState" + isMandatoryOwner: + description: "Present and `true` only for the workspace owner, when this\ + \ request additionally requires the owner's approval. Absent for every\ + \ other participant." + example: true + type: boolean + required: + - index + - status + - userId + type: object + SimpleQuorum: + description: "The flattened shape used when the request has a single sub-request\ + \ with a single tier, which is the common case. The threshold and approval\ + \ count sit directly on the quorum object instead of inside `rulesets`." + properties: + type: + description: Discriminator identifying the flattened single-tier shape. + enum: + - SIMPLE + example: SIMPLE + type: string + threshold: + description: Number of approvals this request requires. + example: 2 + type: integer + currentApprovalCount: + description: Approvals collected so far toward `threshold`. + example: 1 + type: integer + status: + $ref: "#/components/schemas/QuorumApprovalState" + isMandatoryOwnerApproved: + description: "Present only when this request additionally requires the workspace\ + \ owner's approval. `false` means the owner has not approved yet, which\ + \ is why `status` can remain `PENDING` even once `currentApprovalCount`\ + \ reaches `threshold`. Absent when no owner approval is required." + example: false + type: boolean + members: + description: Indexes into the top-level `users` array identifying the users + who may approve. Returned only for `quorumStatusMode=FULL`; omitted otherwise. + example: + - 0 + - 1 + items: + type: integer + type: array + required: + - currentApprovalCount + - status + - threshold + - type + type: object + QuorumGroup: + description: "A single tier of a ruleset: a threshold and the approvals collected\ + \ toward it." + properties: + threshold: + description: Number of approvals this tier requires. + example: 2 + type: integer + currentApprovalCount: + description: Approvals collected so far toward `threshold`. + example: 1 + type: integer + status: + $ref: "#/components/schemas/QuorumApprovalState" + members: + description: Indexes into the top-level `users` array identifying the users + who belong to this tier. Returned only for `quorumStatusMode=FULL`; omitted + otherwise. + example: + - 0 + - 1 + items: + type: integer + type: array + required: + - currentApprovalCount + - status + - threshold + type: object + QuorumRuleset: + description: "One sub-request of the approval criteria, made up of one or more\ + \ tiers." + properties: + groupMatch: + description: Whether every tier in `groups` must be satisfied (`ALL`) or + any single one of them (`ANY`). + enum: + - ALL + - ANY + example: ALL + type: string + status: + $ref: "#/components/schemas/QuorumApprovalState" + groups: + description: "The tiers of this sub-request, evaluated according to `groupMatch`." + example: + - threshold: 1 + currentApprovalCount: 1 + status: APPROVED + - threshold: 2 + currentApprovalCount: 1 + status: PENDING + items: + $ref: "#/components/schemas/QuorumGroup" + type: array + required: + - groupMatch + - groups + - status + type: object + RulesetQuorum: + description: "The general shape, used when the request has more than one sub-request\ + \ or a sub-request with more than one tier. Each entry in `rulesets` is a\ + \ sub-request; each of its `groups` is a tier." + properties: + type: + description: Discriminator identifying the multi-tier shape. + enum: + - RULESET + example: RULESET + type: string + rulesetMatch: + description: Whether every sub-request in `rulesets` must be satisfied (`ALL`) + or any single one of them (`ANY`). + enum: + - ALL + - ANY + example: ALL + type: string + status: + $ref: "#/components/schemas/QuorumApprovalState" + isMandatoryOwnerApproved: + description: Present only when this request additionally requires the workspace + owner's approval. `false` means the owner has not approved yet. Absent + when no owner approval is required. + example: false + type: boolean + rulesets: + description: "The sub-requests of the approval criteria, evaluated according\ + \ to `rulesetMatch`." + example: + - groupMatch: ALL + status: PENDING + groups: + - threshold: 1 + currentApprovalCount: 1 + status: APPROVED + - threshold: 2 + currentApprovalCount: 1 + status: PENDING + items: + $ref: "#/components/schemas/QuorumRuleset" + type: array + required: + - rulesetMatch + - rulesets + - status + - type + type: object + QuorumStatus: + description: |- + The approval quorum's structure and progress for this request. + + `null` when `quorumStatusMode` is omitted or `NONE`. Also `null` on an otherwise successful response when the quorum cannot be reported faithfully — a multi-tier request in a workspace that does not maintain per-tier approval counts — so absence here does not imply the request has no quorum. + + The object may carry additional backend-defined fields beyond those documented. + example: + quorum: + type: SIMPLE + threshold: 2 + currentApprovalCount: 1 + status: PENDING + isMandatoryOwnerApproved: false + members: + - 0 + - 1 + requestStatus: PENDING + users: + - index: 0 + userId: 6073c3d2-9f4b-4c1a-8f7d-2b1e5a9c4d80 + status: APPROVED + - index: 1 + userId: a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d + status: PENDING + isMandatoryOwner: true + nullable: true + properties: + requestStatus: + $ref: "#/components/schemas/QuorumRequestState" + users: + description: Every user participating in this request's quorum. Returned + only for `quorumStatusMode=FULL`; omitted otherwise. + example: + - index: 0 + userId: 6073c3d2-9f4b-4c1a-8f7d-2b1e5a9c4d80 + status: APPROVED + - index: 1 + userId: a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d + status: PENDING + isMandatoryOwner: true + items: + $ref: "#/components/schemas/QuorumUser" + type: array + quorum: + $ref: "#/components/schemas/QuorumStatus_quorum" + required: + - quorum + - requestStatus + type: object + ApprovalRequestItem: + example: + userStatus: USER_NOT_APPROVED + quorumStatus: + quorum: + type: SIMPLE + threshold: 2 + currentApprovalCount: 1 + status: PENDING + isMandatoryOwnerApproved: false + members: + - 0 + - 1 + requestStatus: PENDING + users: + - index: 0 + userId: 6073c3d2-9f4b-4c1a-8f7d-2b1e5a9c4d80 + status: APPROVED + - index: 1 + userId: a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d + status: PENDING + isMandatoryOwner: true + requestPayload: "{\"requestId\":\"ccr-1f2e3d4c\",\"requestType\":\"ADD_USER\"\ + ,\"requestTimestamp\":1750000000000,\"expiresAt\":1750600000,\"requestData\"\ + :{\"type\":\"ADD_USER\",\"creator\":\"user-1f2e3d4c\",\"id\":\"ccr-1f2e3d4c\"\ + }}" + requestSignature: "" + properties: + requestPayload: + description: "The pending approval request as a JSON string, exactly as\ + \ produced by the backend — this is the precise string to sign in order\ + \ to approve the request (sign it as-is; do not re-serialize). The JSON\ + \ has the shape { requestId, requestType, requestTimestamp (epoch ms),\ + \ expiresAt (epoch seconds), requestData }, where requestData is the request-type-specific\ + \ payload." + example: "{\"requestId\":\"ccr-1f2e3d4c\",\"requestType\":\"ADD_USER\",\"\ + requestTimestamp\":1750000000000,\"expiresAt\":1750600000,\"requestData\"\ + :{\"type\":\"ADD_USER\",\"creator\":\"user-1f2e3d4c\",\"id\":\"ccr-1f2e3d4c\"\ + }}" + type: string + requestSignature: + description: Signature over the requestPayload. Empty until request signing + is implemented. + example: "" + type: string + userStatus: + description: The authenticated user's approval status for this request. + enum: + - USER_STATUS_NOT_APPLICABLE + - USER_NOT_ELIGIBLE_TO_APPROVE + - USER_NOT_APPROVED + - USER_APPROVED + example: USER_NOT_APPROVED + type: string + quorumStatus: + $ref: "#/components/schemas/QuorumStatus" + required: + - requestPayload + - userStatus + type: object + ListApprovalsResponse: + example: + next: cursor for the next page + data: + - requestPayload: + requestId: ccr-1f2e3d4c + requestType: ADD_USER + requestTimestamp: 1750000000000 + expiresAt: 1750600000 + requestData: + type: ADD_USER + creator: user-1f2e3d4c + id: ccr-1f2e3d4c + userStatus: USER_NOT_APPROVED + properties: + data: + description: The approval requests the authenticated user is eligible to + act on. + example: + - requestPayload: + requestId: ccr-1f2e3d4c + requestType: ADD_USER + requestTimestamp: 1750000000000 + expiresAt: 1750600000 + requestData: + type: ADD_USER + creator: user-1f2e3d4c + id: ccr-1f2e3d4c + userStatus: USER_NOT_APPROVED + items: + $ref: "#/components/schemas/ApprovalRequestItem" + type: array + next: + description: Cursor for the next page of results. Pass it back as the `pageCursor` + query param to fetch the next page. Empty or absent when this is the last + page. + example: cursor for the next page + type: string + required: + - data + type: object AddCollateralRequestBody: example: isSrcCollateral: true @@ -58029,6 +59118,7 @@ components: - transaction.status.updated - transaction.approval_status.updated - transaction.network_records.processing_completed + - transaction.alert.stuck - external_wallet.asset.added - external_wallet.asset.removed - internal_wallet.asset.added @@ -58039,6 +59129,10 @@ components: - vault_account.asset.added - vault_account.asset.balance_updated - vault_account.nft.balance_updated + - vault_account.bulk_create_job_started + - vault_account.bulk_create_job_ended + - vault_account.asset.bulk_add_job_started + - vault_account.asset.bulk_add_job_ended - embedded_wallet.status.updated - embedded_wallet.created - embedded_wallet.asset.balance_updated @@ -58344,23 +59438,25 @@ components: type: object WebhookCustomHeaders: additionalProperties: - description: Header value. Must not contain CR or LF characters. - maxLength: 1024 - minLength: 1 - pattern: "^[^\\r\\n]*$" - type: string - description: "Custom HTTP headers attached to every notification delivered by\ - \ this webhook (max 10). Header names must be valid RFC 7230 tokens (printable\ - \ ASCII, no separators), are treated case-insensitively (duplicate names differing\ - \ only in case are rejected), and may not exceed 128 characters. The following\ - \ names are reserved and cannot be used: Host, Content-Type, Content-Length,\ - \ Transfer-Encoding, Connection, User-Agent, Accept, Accept-Encoding, Fireblocks-Signature,\ - \ Fireblocks-Webhook-Signature. Header values are write-only — never returned\ - \ in responses." + description: "A string, sent as one header line, or an array of strings, sent\ + \ as one header line per element. A string may be empty: RFC 9110 §5.5 permits\ + \ an empty field value, and it reaches your endpoint as an empty value rather\ + \ than being dropped. Values are at most 1024 characters and must not contain\ + \ control characters. An array must not be empty and is not accepted for\ + \ `Cookie`." + example: abc123 + description: |- + Custom HTTP headers attached to every notification delivered by this webhook. + A value is a string, sent as one header line, or an array of strings, sent as one header line per element under the same name. `Cookie` accepts only a string. An empty array is rejected — leave the name out instead. + At most 10 header lines in total, counted per array element rather than per name. Names must be valid HTTP header tokens, are case-insensitive, and are at most 128 characters. Values are at most 1024 characters and may be empty. + Reserved names: `Host`, `Content-Type`, `Content-Length`, `Transfer-Encoding`, `Connection`, `User-Agent`, `Accept`, `Accept-Encoding`, `Fireblocks-Signature`, `Fireblocks-Webhook-Signature`, `Authorization`. `Authorization` is reserved whether or not this webhook has OAuth credentials attached, because Fireblocks sets it once it does. + Values are write-only; responses return only the header names. example: X-Gateway-Key: abc123 X-Region-Tag: eu - maxProperties: 10 + X-Forwarded-For: + - 203.0.113.7 + - 198.51.100.4 type: object CreateWebhookRequest: example: @@ -58386,6 +59482,9 @@ components: customHeaders: X-Gateway-Key: abc123 X-Region-Tag: eu + X-Forwarded-For: + - 203.0.113.7 + - 198.51.100.4 properties: url: description: "The url of the webhook where notifications will be sent. URL\ @@ -58418,23 +59517,25 @@ components: $ref: "#/components/schemas/WebhookOAuth" customHeaders: additionalProperties: - description: Header value. Must not contain CR or LF characters. - maxLength: 1024 - minLength: 1 - pattern: "^[^\\r\\n]*$" - type: string - description: "Custom HTTP headers attached to every notification delivered\ - \ by this webhook (max 10). Header names must be valid RFC 7230 tokens\ - \ (printable ASCII, no separators), are treated case-insensitively (duplicate\ - \ names differing only in case are rejected), and may not exceed 128 characters.\ - \ The following names are reserved and cannot be used: Host, Content-Type,\ - \ Content-Length, Transfer-Encoding, Connection, User-Agent, Accept, Accept-Encoding,\ - \ Fireblocks-Signature, Fireblocks-Webhook-Signature. Header values are\ - \ write-only — never returned in responses." + description: "A string, sent as one header line, or an array of strings,\ + \ sent as one header line per element. A string may be empty: RFC 9110\ + \ §5.5 permits an empty field value, and it reaches your endpoint as\ + \ an empty value rather than being dropped. Values are at most 1024\ + \ characters and must not contain control characters. An array must\ + \ not be empty and is not accepted for `Cookie`." + example: abc123 + description: |- + Custom HTTP headers attached to every notification delivered by this webhook. + A value is a string, sent as one header line, or an array of strings, sent as one header line per element under the same name. `Cookie` accepts only a string. An empty array is rejected — leave the name out instead. + At most 10 header lines in total, counted per array element rather than per name. Names must be valid HTTP header tokens, are case-insensitive, and are at most 128 characters. Values are at most 1024 characters and may be empty. + Reserved names: `Host`, `Content-Type`, `Content-Length`, `Transfer-Encoding`, `Connection`, `User-Agent`, `Accept`, `Accept-Encoding`, `Fireblocks-Signature`, `Fireblocks-Webhook-Signature`, `Authorization`. `Authorization` is reserved whether or not this webhook has OAuth credentials attached, because Fireblocks sets it once it does. + Values are write-only; responses return only the header names. example: X-Gateway-Key: abc123 X-Region-Tag: eu - maxProperties: 10 + X-Forwarded-For: + - 203.0.113.7 + - 198.51.100.4 type: object required: - events @@ -58458,23 +59559,473 @@ components: required: - csr type: object - WebhookCustomHeadersUpdate: + WebhookOAuthCredentials: + description: "A stored OAuth 2.0 client credential set, referenced by webhooks\ + \ through their `webhookOauthId`. When a webhook references one, the dispatcher\ + \ fetches a bearer token from `url` before each delivery and attaches it as\ + \ `Authorization: Bearer {token}`. Secret material is never returned: `clientSecret`\ + \ is absent from this schema entirely, and the `customJwtClaims`, `customBodyParams`\ + \ and `customHeaders` fields are reduced to their names, without the configured\ + \ values." + example: + createdAt: 1625097600000 + clientId: my-client-id + customBodyParams: + - scope + customJwtClaims: + - aud + - resource + name: Production treasury gateway + id: 123e4567-e89b-12d3-a456-426614174000 + authMethod: client_secret_basic + url: https://auth.example.com/oauth/token + customHeaders: + - X-Api-Key + mtlsClientSignedCert: |- + -----BEGIN CERTIFICATE----- + ... + -----END CERTIFICATE----- + updatedAt: 1625097600000 + properties: + id: + description: The id of the OAuth credentials. Pass this as a webhook's `webhookOauthId` + to attach them. + example: 123e4567-e89b-12d3-a456-426614174000 + format: uuid + type: string + name: + description: The label given to this credential set. + example: Production treasury gateway + type: string + clientId: + description: OAuth client ID used to authenticate with the token endpoint. + example: my-client-id + type: string + url: + description: Token endpoint URL. + example: https://auth.example.com/oauth/token + type: string + authMethod: + default: client_secret_basic + description: "How the client credentials are presented to the token endpoint:\ + \ `client_secret_basic`, `client_secret_post` or `client_secret_jwt`.\ + \ Credentials created without this field report `client_secret_basic`,\ + \ which is what they use." + example: client_secret_basic + type: string + customJwtClaims: + description: Names of the additional claims placed in the JWT assertion. + Claim values are write-only and are never returned. Absent when no custom + claims are configured. + example: + - aud + - resource + items: + type: string + type: array + customBodyParams: + description: Names of the additional parameters added to the token request + body. Parameter values are write-only and are never returned. Absent when + no custom parameters are configured. + example: + - scope + items: + type: string + type: array + customHeaders: + description: "Names of the additional HTTP headers added to **the token\ + \ request sent to the authorization server** — not to the webhook delivery,\ + \ which has its own separate `customHeaders`. Header values are write-only\ + \ and are never returned. Absent when no custom headers are configured." + example: + - X-Api-Key + items: + type: string + type: array + mtlsClientSignedCert: + description: PEM-encoded client certificate used for mTLS when fetching + OAuth tokens. + example: |- + -----BEGIN CERTIFICATE----- + ... + -----END CERTIFICATE----- + type: string + createdAt: + description: "The date and time the OAuth credentials were created, in milliseconds." + example: 1625097600000 + format: int64 + type: integer + updatedAt: + description: "The date and time the OAuth credentials were last updated,\ + \ in milliseconds." + example: 1625097600000 + format: int64 + type: integer + required: + - authMethod + - clientId + - createdAt + - id + - name + - updatedAt + - url + type: object + WebhookOAuthList: + description: Every OAuth credential set belonging to the workspace. Client secrets + are never returned. + items: + $ref: "#/components/schemas/WebhookOAuthCredentials" + type: array + WebhookOAuthCustomJwtClaims: + additionalProperties: + description: Claim value. May be any JSON type except `null`. + description: |- + Extra claims for the JWT assertion. Used only when `authMethod` is `client_secret_jwt`. The usual one to set is `aud`, which defaults to the token endpoint URL; some authorization servers expect their own identifier instead. + A value may be any JSON type except `null` — `null` is reserved for deleting a claim on update. `iss`, `sub`, `jti`, `iat` and `exp` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. + Values are write-only; responses return only the claim names. On update this merges claim by claim rather than replacing — see `WebhookOAuthCustomJwtClaimsUpdate`. + example: + aud: https://auth.example.com + email_verified: true + nullable: true + type: object + WebhookOAuthCustomBodyParams: + additionalProperties: + type: string + description: |- + Extra parameters for the token request body — `scope` most commonly, sometimes `audience` or `resource`. Applies to every authentication method. + Values must be strings, because the token request body is form-encoded rather than JSON. An empty string is allowed. `grant_type`, `client_id`, `client_secret`, `client_assertion` and `client_assertion_type` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. + Values are write-only; responses return only the parameter names. On update this merges key by key rather than replacing — see `WebhookOAuthCustomBodyParamsUpdate`. + example: + scope: payments.read payments.write + nullable: true + type: object + WebhookOAuthCustomHeaders: + additionalProperties: + type: string + description: |- + Extra HTTP headers for **the token request to your authorization server** — not for the webhook delivery, which has its own separate `customHeaders`. A gateway API key is the usual case. Applies to every authentication method. + Values must be strings; an empty string is allowed. Names are matched case-insensitively, so two names differing only in case are a duplicate. Names are stored and returned lowercased, so `X-Api-Key` comes back as `x-api-key`. `Content-Type`, `Authorization`, `Content-Length` and `Host` are set by Fireblocks and cannot be overridden. The whole object must be under 16 KB. + Values are write-only; responses return only the header names. On update this merges name by name rather than replacing — see `WebhookOAuthCustomHeadersUpdate`. + example: + x-api-key: gateway-key + nullable: true + type: object + CreateWebhookOAuthRequest: + description: "A new reusable OAuth 2.0 client credential set. Attach it to a\ + \ webhook by passing the returned id as that webhook's `webhookOauthId`. Several\ + \ webhooks may share one credential set, so rotating its client secret covers\ + \ all of them at once." + example: + clientId: my-client-id + customBodyParams: + scope: payments.read payments.write + customJwtClaims: + aud: https://auth.example.com + email_verified: true + name: Production treasury gateway + clientSecret: my-client-secret + authMethod: client_secret_basic + url: https://auth.example.com/oauth/token + customHeaders: + x-api-key: gateway-key + mtlsClientSignedCert: |- + -----BEGIN CERTIFICATE----- + ... + -----END CERTIFICATE----- + properties: + name: + description: "A label for this credential set, shown when listing them." + example: Production treasury gateway + maxLength: 128 + minLength: 1 + type: string + clientId: + description: OAuth client ID used to authenticate with the token endpoint. + example: my-client-id + maxLength: 255 + minLength: 1 + type: string + clientSecret: + description: OAuth client secret. Write-only — never returned. Limited to + 480 bytes UTF-8 encoded. With `client_secret_jwt` it signs the assertion + rather than being sent. + example: my-client-secret + maxLength: 480 + minLength: 1 + type: string + url: + description: "Token endpoint URL. HTTPS on port 443 only, and the host must\ + \ resolve publicly — localhost and private, link-local or loopback addresses\ + \ are rejected." + example: https://auth.example.com/oauth/token + maxLength: 2048 + pattern: ^https:// + type: string + authMethod: + default: client_secret_basic + description: "How the client credentials reach the token endpoint. `client_secret_basic`\ + \ uses an HTTP Basic header, `client_secret_post` uses form fields in\ + \ the body, and `client_secret_jwt` sends a JWT assertion signed with\ + \ the secret, so the secret itself is never transmitted. Defaults to `client_secret_basic`." + example: client_secret_basic + type: string + customJwtClaims: + additionalProperties: + description: Claim value. May be any JSON type except `null`. + description: |- + Extra claims for the JWT assertion. Used only when `authMethod` is `client_secret_jwt`. The usual one to set is `aud`, which defaults to the token endpoint URL; some authorization servers expect their own identifier instead. + A value may be any JSON type except `null` — `null` is reserved for deleting a claim on update. `iss`, `sub`, `jti`, `iat` and `exp` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. + Values are write-only; responses return only the claim names. On update this merges claim by claim rather than replacing — see `WebhookOAuthCustomJwtClaimsUpdate`. + example: + aud: https://auth.example.com + email_verified: true + nullable: true + type: object + customBodyParams: + additionalProperties: + type: string + description: |- + Extra parameters for the token request body — `scope` most commonly, sometimes `audience` or `resource`. Applies to every authentication method. + Values must be strings, because the token request body is form-encoded rather than JSON. An empty string is allowed. `grant_type`, `client_id`, `client_secret`, `client_assertion` and `client_assertion_type` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. + Values are write-only; responses return only the parameter names. On update this merges key by key rather than replacing — see `WebhookOAuthCustomBodyParamsUpdate`. + example: + scope: payments.read payments.write + nullable: true + type: object + customHeaders: + additionalProperties: + type: string + description: |- + Extra HTTP headers for **the token request to your authorization server** — not for the webhook delivery, which has its own separate `customHeaders`. A gateway API key is the usual case. Applies to every authentication method. + Values must be strings; an empty string is allowed. Names are matched case-insensitively, so two names differing only in case are a duplicate. Names are stored and returned lowercased, so `X-Api-Key` comes back as `x-api-key`. `Content-Type`, `Authorization`, `Content-Length` and `Host` are set by Fireblocks and cannot be overridden. The whole object must be under 16 KB. + Values are write-only; responses return only the header names. On update this merges name by name rather than replacing — see `WebhookOAuthCustomHeadersUpdate`. + example: + x-api-key: gateway-key + nullable: true + type: object + mtlsClientSignedCert: + description: PEM-encoded client certificate for mTLS when fetching tokens. + Must be a valid X.509 certificate inside its validity window. + example: |- + -----BEGIN CERTIFICATE----- + ... + -----END CERTIFICATE----- + type: string + required: + - clientId + - clientSecret + - name + - url + type: object + DeleteWebhookOAuthResponse: + allOf: + - $ref: "#/components/schemas/WebhookOAuthCredentials" + - properties: + detachedWebhookIds: + description: "Webhooks whose `webhookOauthId` was cleared. The webhooks\ + \ themselves are not deleted and keep delivering, just without an `Authorization`\ + \ header. Empty unless `forceDelete=true` detached something." + example: + - 44fcead0-7053-4831-a53a-df7fb90d440f + items: + format: uuid + type: string + type: array + required: + - detachedWebhookIds + type: object + description: "The deleted OAuth credential set, plus the ids of any webhooks\ + \ the delete detached from it. Webhooks are only detached by `forceDelete=true`;\ + \ without it a delete is refused with `409` while anything still references\ + \ the credentials." + example: + createdAt: 1625097600000 + clientId: my-client-id + customBodyParams: + - scope + detachedWebhookIds: + - 44fcead0-7053-4831-a53a-df7fb90d440f + customJwtClaims: + - aud + - resource + name: Production treasury gateway + id: 123e4567-e89b-12d3-a456-426614174000 + authMethod: client_secret_basic + url: https://auth.example.com/oauth/token + customHeaders: + - X-Api-Key + mtlsClientSignedCert: |- + -----BEGIN CERTIFICATE----- + ... + -----END CERTIFICATE----- + updatedAt: 1625097600000 + WebhookOAuthCustomJwtClaimsUpdate: + additionalProperties: + description: "Claim value. May be any JSON type, or `null` to delete the claim." + description: |- + A delta applied to the JWT assertion claims. A claim with a value is added or replaced, a claim with `null` is deleted, and a claim you leave out is untouched. So `{ "aud": "https://auth.example.com", "resource": null }` sets `aud`, drops `resource`, and changes nothing else. + Send `customJwtClaims: null` to clear every claim in one call. That does not collide with a `null` value on a name: one names the claim to delete, the other names the whole field. + Same rules as on create: any JSON type except `null`, `iss`/`sub`/`jti`/`iat`/`exp` reserved, names case-sensitive, resulting set under 16 KB, values write-only. + example: + aud: https://auth.example.com + resource: null + nullable: true + type: object + WebhookOAuthCustomBodyParamsUpdate: additionalProperties: - maxLength: 1024 - minLength: 1 nullable: true type: string - description: "Custom headers delta: entries with a string value are added or\ - \ updated, entries with a `null` value delete that header (no-op if absent),\ - \ and header names omitted from the payload are left untouched. The resulting\ - \ set is limited to 10 headers. Header names are case-insensitive, up to 128\ - \ characters, and limited to valid HTTP header name characters. Some system\ - \ header names are reserved and cannot be used. Values are write-only — never\ - \ returned in responses." + description: |- + A delta applied to the token request body parameters. A parameter with a value is added or replaced, a parameter with `null` is deleted, and one you leave out is untouched. So `{ "scope": "payments.read", "audience": null }` sets `scope`, drops `audience`, and changes nothing else. + Send `customBodyParams: null` to clear every parameter in one call. That does not collide with a `null` value on a name: one names the parameter to delete, the other names the whole field. + Same rules as on create: string values only, `grant_type`/`client_id`/`client_secret`/ `client_assertion`/`client_assertion_type` reserved, names case-sensitive, resulting set under 16 KB, values write-only. + example: + scope: payments.read payments.write + audience: null + nullable: true + type: object + WebhookOAuthCustomHeadersUpdate: + additionalProperties: + nullable: true + type: string + description: |- + A delta applied to the token request headers — not the webhook delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. So `{ "X-Api-Key": "new-key", "X-Tenant": null }` rotates `X-Api-Key`, drops `X-Tenant`, and changes nothing else. + Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. Names are case-insensitive, so a `null` under one casing deletes a header stored under another, and names are stored and returned lowercased. + Same rules as on create: string values only, `Content-Type`/`Authorization`/ `Content-Length`/`Host` reserved, resulting set under 16 KB, values write-only. + example: + x-api-key: gateway-key + x-tenant: null + nullable: true + type: object + UpdateWebhookOAuthRequest: + description: |- + A partial update. Every field is optional and an omitted field is left as it is, so `{ "clientSecret": "new-secret" }` rotates the secret and changes nothing else. A rotation applies to every webhook referencing these credentials. + + The three custom maps merge: a key with a value is upserted, a key with `null` is deleted, a key you leave out is untouched. Because `null` inside a map means delete, none of the three is nullable as a whole — `customJwtClaims: null` and friends are rejected with a `400`. Clear a map by naming each key with a `null` value. `mtlsClientSignedCert` is a scalar, so `null` there does remove it. + example: + clientId: my-client-id + customBodyParams: + scope: payments.read payments.write + audience: null + customJwtClaims: + aud: https://auth.example.com + resource: null + name: Production treasury gateway + clientSecret: my-new-client-secret + authMethod: client_secret_jwt + url: https://auth.example.com/oauth/token + customHeaders: + x-api-key: gateway-key + x-tenant: null + mtlsClientSignedCert: |- + -----BEGIN CERTIFICATE----- + ... + -----END CERTIFICATE----- + properties: + name: + description: A label for this credential set. Omit to leave it unchanged. + example: Production treasury gateway + maxLength: 128 + minLength: 1 + type: string + clientId: + description: OAuth client ID. Omit to leave it unchanged. + example: my-client-id + maxLength: 255 + minLength: 1 + type: string + clientSecret: + description: "A new OAuth client secret. Limited to 480 bytes when UTF-8\ + \ encoded, so a secret using non-ASCII characters fits fewer than 480\ + \ of them. Write-only — never returned in any response. Send this on its\ + \ own to rotate the secret without changing anything else. Omit to leave\ + \ it unchanged." + example: my-new-client-secret + maxLength: 480 + minLength: 1 + type: string + url: + description: "Token endpoint URL. HTTPS on port 443 only, and the host must\ + \ resolve publicly. Omit to leave it unchanged." + example: https://auth.example.com/oauth/token + maxLength: 2048 + pattern: ^https:// + type: string + authMethod: + description: "`client_secret_basic`, `client_secret_post` or `client_secret_jwt`.\ + \ Omit to leave it unchanged — it does not revert to the default." + example: client_secret_jwt + type: string + customJwtClaims: + additionalProperties: + description: "Claim value. May be any JSON type, or `null` to delete the\ + \ claim." + description: |- + A delta applied to the JWT assertion claims. A claim with a value is added or replaced, a claim with `null` is deleted, and a claim you leave out is untouched. So `{ "aud": "https://auth.example.com", "resource": null }` sets `aud`, drops `resource`, and changes nothing else. + Send `customJwtClaims: null` to clear every claim in one call. That does not collide with a `null` value on a name: one names the claim to delete, the other names the whole field. + Same rules as on create: any JSON type except `null`, `iss`/`sub`/`jti`/`iat`/`exp` reserved, names case-sensitive, resulting set under 16 KB, values write-only. + example: + aud: https://auth.example.com + resource: null + nullable: true + type: object + customBodyParams: + additionalProperties: + nullable: true + type: string + description: |- + A delta applied to the token request body parameters. A parameter with a value is added or replaced, a parameter with `null` is deleted, and one you leave out is untouched. So `{ "scope": "payments.read", "audience": null }` sets `scope`, drops `audience`, and changes nothing else. + Send `customBodyParams: null` to clear every parameter in one call. That does not collide with a `null` value on a name: one names the parameter to delete, the other names the whole field. + Same rules as on create: string values only, `grant_type`/`client_id`/`client_secret`/ `client_assertion`/`client_assertion_type` reserved, names case-sensitive, resulting set under 16 KB, values write-only. + example: + scope: payments.read payments.write + audience: null + nullable: true + type: object + customHeaders: + additionalProperties: + nullable: true + type: string + description: |- + A delta applied to the token request headers — not the webhook delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. So `{ "X-Api-Key": "new-key", "X-Tenant": null }` rotates `X-Api-Key`, drops `X-Tenant`, and changes nothing else. + Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. Names are case-insensitive, so a `null` under one casing deletes a header stored under another, and names are stored and returned lowercased. + Same rules as on create: string values only, `Content-Type`/`Authorization`/ `Content-Length`/`Host` reserved, resulting set under 16 KB, values write-only. + example: + x-api-key: gateway-key + x-tenant: null + nullable: true + type: object + mtlsClientSignedCert: + description: "PEM-encoded client certificate for mTLS. Must be a valid X.509\ + \ certificate inside its validity window. Omit to leave it unchanged,\ + \ or send `null` to remove it." + example: |- + -----BEGIN CERTIFICATE----- + ... + -----END CERTIFICATE----- + nullable: true + type: string + type: object + WebhookCustomHeadersUpdate: + additionalProperties: + description: "A string, sent as one header line, or an array of strings, sent\ + \ as one header line per element, or `null` to delete the header. A string\ + \ may be empty. Values are at most 1024 characters and must not contain\ + \ control characters. An array must not be empty and is not accepted for\ + \ `Cookie`." + example: abc123 + description: |- + A delta applied to the delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. A value replaces what is stored under that name rather than adding to it, so an array is the complete new set of lines for that header. + Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. + Names are case-insensitive, so a `null` under one casing deletes a header stored under another. + Same rules as on create: string or non-empty array, `Cookie` string-only, 10 lines total in the resulting set, the same reserved names, and values write-only. Entries set to `null` do not count towards the limit. example: X-Gateway-Key: abc123 + X-Forwarded-For: + - 203.0.113.7 + - 198.51.100.4 X-Region-Tag: null - maxProperties: 10 + nullable: true type: object UpdateWebhookRequest: example: @@ -58499,6 +60050,9 @@ components: enabled: false customHeaders: X-Gateway-Key: abc123 + X-Forwarded-For: + - 203.0.113.7 + - 198.51.100.4 X-Region-Tag: null properties: url: @@ -58531,21 +60085,24 @@ components: $ref: "#/components/schemas/WebhookOAuth" customHeaders: additionalProperties: - maxLength: 1024 - minLength: 1 - nullable: true - type: string - description: "Custom headers delta: entries with a string value are added\ - \ or updated, entries with a `null` value delete that header (no-op if\ - \ absent), and header names omitted from the payload are left untouched.\ - \ The resulting set is limited to 10 headers. Header names are case-insensitive,\ - \ up to 128 characters, and limited to valid HTTP header name characters.\ - \ Some system header names are reserved and cannot be used. Values are\ - \ write-only — never returned in responses." + description: "A string, sent as one header line, or an array of strings,\ + \ sent as one header line per element, or `null` to delete the header.\ + \ A string may be empty. Values are at most 1024 characters and must\ + \ not contain control characters. An array must not be empty and is\ + \ not accepted for `Cookie`." + example: abc123 + description: |- + A delta applied to the delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. A value replaces what is stored under that name rather than adding to it, so an array is the complete new set of lines for that header. + Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. + Names are case-insensitive, so a `null` under one casing deletes a header stored under another. + Same rules as on create: string or non-empty array, `Cookie` string-only, 10 lines total in the resulting set, the same reserved names, and values write-only. Entries set to `null` do not count towards the limit. example: X-Gateway-Key: abc123 + X-Forwarded-For: + - 203.0.113.7 + - 198.51.100.4 X-Region-Tag: null - maxProperties: 10 + nullable: true type: object type: object WebhookMetric: @@ -64772,6 +66329,12 @@ components: not set. example: stake request of 32ETH created on 02.04.23 type: string + completionTime: + description: ISO timestamp when Cosmos unbonding is scheduled to end. Absent + on other chains. + example: 2026-08-09T03:05:06.122864244Z + format: date-time + type: string required: - status - timestamp @@ -66647,6 +68210,14 @@ components: - accountId - type type: object + AccountAccessResponse: + allOf: + - $ref: "#/components/schemas/AccountAccess" + description: Response-only counterpart of AccountAccess. + example: + type: PROVIDER_ACCOUNT + providerId: uniswap-v3-provider + accountId: account-123 DirectAccess: example: type: PROVIDER @@ -66664,15 +68235,46 @@ components: - providerId - type type: object - AccessType: + DirectAccessResponseInfo: + properties: + subProviders: + description: "The underlying providers or tools that this direct-access\ + \ route is composed of, in execution order. Response-only: this field\ + \ is populated by the server and is never accepted from client requests." + example: + - lifi-relay + - uniswap-v3 + items: + type: string + type: array + type: object + DirectAccessResponse: + allOf: + - $ref: "#/components/schemas/DirectAccess" + - $ref: "#/components/schemas/DirectAccessResponseInfo" + description: Response-only counterpart of DirectAccess. Adds the server-populated + `subProviders` field. Never use this schema in a request body — requests must + keep using DirectAccess (via AccessType). + example: + type: PROVIDER + providerId: uniswap-v3-provider + subProviders: + - lifi-relay + - uniswap-v3 + AccessTypeResponse: + description: "Response-only counterpart of AccessType. Used by the `via` field\ + \ of response schemas (Quote, Rate, OrderDetails, OrderSummary — and therefore\ + \ QuoteOffer, RateOffer and Offer) so that the PROVIDER variant can expose\ + \ `subProviders` without that field ever becoming reachable from a request\ + \ body. Request schemas (CreateOrderRequest.via) keep using AccessType." discriminator: mapping: - PROVIDER_ACCOUNT: "#/components/schemas/AccountAccess" - PROVIDER: "#/components/schemas/DirectAccess" + PROVIDER_ACCOUNT: "#/components/schemas/AccountAccessResponse" + PROVIDER: "#/components/schemas/DirectAccessResponse" propertyName: type oneOf: - - $ref: "#/components/schemas/AccountAccess" - - $ref: "#/components/schemas/DirectAccess" + - $ref: "#/components/schemas/AccountAccessResponse" + - $ref: "#/components/schemas/DirectAccessResponse" Rate: example: baseAssetId: baseAssetId @@ -66682,11 +68284,11 @@ components: quoteAssetId: quoteAssetId via: type: PROVIDER_ACCOUNT - providerId: bridge-provider-001 - accountId: acc_9f4e2d8b1c6a5e73 + providerId: uniswap-v3-provider + accountId: account-123 properties: via: - $ref: "#/components/schemas/AccessType" + $ref: "#/components/schemas/AccessTypeResponse" baseAssetId: description: The source asset identifier type: string @@ -66742,8 +68344,8 @@ components: quoteAssetId: quoteAssetId via: type: PROVIDER_ACCOUNT - providerId: bridge-provider-001 - accountId: acc_9f4e2d8b1c6a5e73 + providerId: uniswap-v3-provider + accountId: account-123 - baseAssetId: baseAssetId baseAssetRail: BLOCKCHAIN rate: "1.2345" @@ -66751,8 +68353,8 @@ components: quoteAssetId: quoteAssetId via: type: PROVIDER_ACCOUNT - providerId: bridge-provider-001 - accountId: acc_9f4e2d8b1c6a5e73 + providerId: uniswap-v3-provider + accountId: account-123 errors: - accountId: acc_9f4e2d8b1c6a5e73 providerId: BRIDGE @@ -67425,7 +69027,7 @@ components: description: A committed executable quote for a trading pair. properties: via: - $ref: "#/components/schemas/AccessType" + $ref: "#/components/schemas/AccessTypeResponse" id: description: The unique identifier of the quote. example: quote_8f2e4d1a9c5b7e3f @@ -67631,8 +69233,8 @@ components: quoteAssetId: quoteAssetId via: type: PROVIDER_ACCOUNT - providerId: bridge-provider-001 - accountId: acc_9f4e2d8b1c6a5e73 + providerId: uniswap-v3-provider + accountId: account-123 QuoteOfferType: properties: offerType: @@ -67668,8 +69270,8 @@ components: quoteAssetId: quoteAssetId via: type: PROVIDER_ACCOUNT - providerId: bridge-provider-001 - accountId: acc_9f4e2d8b1c6a5e73 + providerId: uniswap-v3-provider + accountId: account-123 - baseAssetId: baseAssetId offerType: RATE baseAssetRail: BLOCKCHAIN @@ -67678,8 +69280,8 @@ components: quoteAssetId: quoteAssetId via: type: PROVIDER_ACCOUNT - providerId: bridge-provider-001 - accountId: acc_9f4e2d8b1c6a5e73 + providerId: uniswap-v3-provider + accountId: account-123 errors: - accountId: acc_9f4e2d8b1c6a5e73 providerId: BRIDGE @@ -67743,7 +69345,7 @@ components: id: type: string via: - $ref: "#/components/schemas/AccessType" + $ref: "#/components/schemas/AccessTypeResponse" side: $ref: "#/components/schemas/Side" baseAmount: @@ -67808,6 +69410,15 @@ components: - data - total type: object + AccessType: + discriminator: + mapping: + PROVIDER_ACCOUNT: "#/components/schemas/AccountAccess" + PROVIDER: "#/components/schemas/DirectAccess" + propertyName: type + oneOf: + - $ref: "#/components/schemas/AccountAccess" + - $ref: "#/components/schemas/DirectAccess" MarketTypeEnum: description: Order type for market orders enum: @@ -69519,7 +71130,7 @@ components: id: type: string via: - $ref: "#/components/schemas/AccessType" + $ref: "#/components/schemas/AccessTypeResponse" status: $ref: "#/components/schemas/OrderStatus" createdAt: @@ -82429,15 +84040,40 @@ components: type: string type: object GetFindingsExternalResponse: - description: A paginated list of FSPM findings example: next: eyJzZXZlcml0eVJhbmsiOjMsImNyZWF0ZWRBdCI6IjIwMjYtMDctMTRUMTA6MDU6NTYuMDAwWiIsImlkIjoiYjJmZTkwYjItMWZlMy00ZTczLTg1YTItNjZlMTlmN2RhYzY2In0= total: 42 - data: [] + data: + - id: d7ca3131-a35e-3a9c-36c1-38bd697e0cd2 + status: OPEN + severity: HIGH + category: USER_MANAGEMENT + createdAt: 2026-07-28T11:37:05.000Z + title: The API user 'Admin API' is missing an IP allowlist + - id: 2f6a9c13-7b2d-4158-9a2f-6c3d8b4e0f37 + status: RESOLVED + severity: HIGH + category: USER_MANAGEMENT + createdAt: 2026-08-30T13:36:35.000Z + title: The API user 'admin api callback' is paired with a co-signer and + has no callback properties: data: description: List of FSPM findings for the current page. - example: [] + example: + - id: d7ca3131-a35e-3a9c-36c1-38bd697e0cd2 + status: OPEN + severity: HIGH + category: USER_MANAGEMENT + createdAt: 2026-07-28T11:37:05.000Z + title: The API user 'Admin API' is missing an IP allowlist + - id: 2f6a9c13-7b2d-4158-9a2f-6c3d8b4e0f37 + status: RESOLVED + severity: HIGH + category: USER_MANAGEMENT + createdAt: 2026-08-30T13:36:35.000Z + title: The API user 'admin api callback' is paired with a co-signer and + has no callback items: $ref: "#/components/schemas/SecurityFinding" type: array @@ -82499,7 +84135,6 @@ components: - standard type: object SecurityFindingDetailed: - description: "A single FSPM finding, redacted to the public field set" example: severity: MEDIUM mitigationGuidance: "Go to Developer Center > API Users, click the actions\ @@ -82508,14 +84143,22 @@ components: riskExplanation: "This API user has no IP allowlist, so it can be accessed\ \ from anywhere, increasing the risk of unauthorized activity." statusUpdatedAt: 2026-08-16T08:52:57Z - complianceReqs: [] + complianceReqs: + - id: 8a1e6f19-1c4b-2d7e-2f1a-2b6c8d2e4f50 + standard: SOC 2 + criteria: CC6.2 + description: Access provisioning and credential lifecycle + - id: 5e2b8e47-ea9c-ef36-8e2d-ea4b9c3e6f18 + standard: SOC 2 + criteria: CC6.3 + description: "Least privilege and attack surface, roles and SoD" title: The API user 'Admin API' is missing an IP allowlist createdAt: 2026-07-21T07:49:28Z statusUpdatedReason: "False positive, the API user only ever connects from\ \ a fixed, trusted network" id: 2f8a132e-623d-3a97-841f-2c5d9b7a3e60 category: USER_MANAGEMENT - status: OPEN + status: ACCEPTED info: id: 2a6f3c4e-9d33-437e-8f2a-2c9b4d3e1f35 createdAt: 2026-05-12T12:06:26.242Z @@ -82540,7 +84183,7 @@ components: - OPEN - ACCEPTED - RESOLVED - example: OPEN + example: ACCEPTED type: string severity: description: Severity level of the finding @@ -82610,7 +84253,15 @@ components: type: object complianceReqs: description: Compliance requirements this finding relates to - example: [] + example: + - id: 8a1e6f19-1c4b-2d7e-2f1a-2b6c8d2e4f50 + standard: SOC 2 + criteria: CC6.2 + description: Access provisioning and credential lifecycle + - id: 5e2b8e47-ea9c-ef36-8e2d-ea4b9c3e6f18 + standard: SOC 2 + criteria: CC6.3 + description: "Least privilege and attack surface, roles and SoD" items: $ref: "#/components/schemas/ComplianceRequirement" type: array @@ -88383,6 +90034,7 @@ components: address: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa isCoinbase: false createdByHash: 000000000000000000024bead8df69990852c202db0e0097c1a12ea637d7e96d + hasNativeAssets: true confirmations: 6 labels: - cold-storage @@ -88471,6 +90123,10 @@ components: items: type: string type: array + hasNativeAssets: + description: Whether this UTXO carries Cardano native assets (tokens) + example: true + type: boolean required: - address - amount @@ -88487,6 +90143,7 @@ components: address: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa isCoinbase: false createdByHash: 000000000000000000024bead8df69990852c202db0e0097c1a12ea637d7e96d + hasNativeAssets: true confirmations: 6 labels: - cold-storage @@ -88507,6 +90164,7 @@ components: address: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa isCoinbase: false createdByHash: 000000000000000000024bead8df69990852c202db0e0097c1a12ea637d7e96d + hasNativeAssets: true confirmations: 6 labels: - cold-storage @@ -88623,6 +90281,7 @@ components: address: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa isCoinbase: false createdByHash: 000000000000000000024bead8df69990852c202db0e0097c1a12ea637d7e96d + hasNativeAssets: true confirmations: 6 labels: - cold-storage @@ -88643,6 +90302,7 @@ components: address: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa isCoinbase: false createdByHash: 000000000000000000024bead8df69990852c202db0e0097c1a12ea637d7e96d + hasNativeAssets: true confirmations: 6 labels: - cold-storage @@ -90006,6 +91666,537 @@ components: required: - message type: object + OnboardingResponseDtccAccept: + additionalProperties: false + description: Accept a DTCC end-investor onboarding offer. Carries no arguments. + properties: + responseType: + description: How you are answering the offer. Must be one of the values + currently listed in the transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`. + enum: + - DTCC_END_INVESTOR_ONBOARDING_ACCEPT + example: DTCC_END_INVESTOR_ONBOARDING_ACCEPT + type: string + required: + - responseType + type: object + OnboardingResponseDtccReject: + additionalProperties: false + description: Reject a DTCC end-investor onboarding offer. + properties: + responseType: + description: How you are answering the offer. Must be one of the values + currently listed in the transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`. + enum: + - DTCC_END_INVESTOR_ONBOARDING_REJECT + example: DTCC_END_INVESTOR_ONBOARDING_REJECT + type: string + reason: + description: "Why the offer is being rejected. Recorded on-chain, where\ + \ the counterparty can read it." + example: KYC not completed + maxLength: 512 + minLength: 1 + type: string + required: + - reason + - responseType + type: object + OnboardingResponseTradewebAccept: + additionalProperties: false + description: Accept a Tradeweb co-signing delegation offer. Carries no arguments. + properties: + responseType: + description: How you are answering the offer. Must be one of the values + currently listed in the transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`. + enum: + - TRADEWEB_COSIGNING_DELEGATION_ACCEPT + example: TRADEWEB_COSIGNING_DELEGATION_ACCEPT + type: string + required: + - responseType + type: object + OnboardingResponseTradewebReject: + additionalProperties: false + description: "Reject a Tradeweb co-signing delegation offer. Carries no arguments\ + \ — the DAR has nowhere on-ledger to record a reason, so none is accepted." + properties: + responseType: + description: How you are answering the offer. Must be one of the values + currently listed in the transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`. + enum: + - TRADEWEB_COSIGNING_DELEGATION_REJECT + example: TRADEWEB_COSIGNING_DELEGATION_REJECT + type: string + required: + - responseType + type: object + OnboardingResponse: + discriminator: + mapping: + DTCC_END_INVESTOR_ONBOARDING_ACCEPT: "#/components/schemas/OnboardingResponseDtccAccept" + DTCC_END_INVESTOR_ONBOARDING_REJECT: "#/components/schemas/OnboardingResponseDtccReject" + TRADEWEB_COSIGNING_DELEGATION_ACCEPT: "#/components/schemas/OnboardingResponseTradewebAccept" + TRADEWEB_COSIGNING_DELEGATION_REJECT: "#/components/schemas/OnboardingResponseTradewebReject" + propertyName: responseType + oneOf: + - $ref: "#/components/schemas/OnboardingResponseDtccAccept" + - $ref: "#/components/schemas/OnboardingResponseDtccReject" + - $ref: "#/components/schemas/OnboardingResponseTradewebAccept" + - $ref: "#/components/schemas/OnboardingResponseTradewebReject" + OfferResponseOnboarding: + additionalProperties: false + properties: + domain: + description: Which offer domain this response belongs to. Selects the shape + of `response`. + enum: + - ONBOARDING + example: ONBOARDING + type: string + response: + $ref: "#/components/schemas/OnboardingResponse" + required: + - domain + - response + type: object + AllocationResponseAccept: + additionalProperties: false + description: Accept a CIP-56 allocation request. Carries no arguments. + properties: + responseType: + description: How you are answering the allocation request. + enum: + - ALLOCATION_ACCEPT + example: ALLOCATION_ACCEPT + type: string + required: + - responseType + type: object + AllocationResponseReject: + additionalProperties: false + description: Reject a CIP-56 allocation request. Carries no arguments. + properties: + responseType: + description: How you are answering the allocation request. + enum: + - ALLOCATION_REJECT + example: ALLOCATION_REJECT + type: string + required: + - responseType + type: object + AllocationResponse: + discriminator: + mapping: + ALLOCATION_ACCEPT: "#/components/schemas/AllocationResponseAccept" + ALLOCATION_REJECT: "#/components/schemas/AllocationResponseReject" + propertyName: responseType + oneOf: + - $ref: "#/components/schemas/AllocationResponseAccept" + - $ref: "#/components/schemas/AllocationResponseReject" + OfferResponseAllocation: + additionalProperties: false + properties: + domain: + description: Which offer domain this response belongs to. Selects the shape + of `response`. + enum: + - ALLOCATIONS + example: ALLOCATIONS + type: string + response: + $ref: "#/components/schemas/AllocationResponse" + required: + - domain + - response + type: object + TransferResponseAccept: + additionalProperties: false + description: Accept an inbound 2-step transfer offer. Carries no arguments. + properties: + responseType: + description: How you are answering the transfer offer. + enum: + - TRANSFER_ACCEPT + example: TRANSFER_ACCEPT + type: string + required: + - responseType + type: object + TransferResponseReject: + additionalProperties: false + description: Reject an inbound 2-step transfer offer. Carries no arguments. + properties: + responseType: + description: How you are answering the transfer offer. + enum: + - TRANSFER_REJECT + example: TRANSFER_REJECT + type: string + required: + - responseType + type: object + TransferResponse: + discriminator: + mapping: + TRANSFER_ACCEPT: "#/components/schemas/TransferResponseAccept" + TRANSFER_REJECT: "#/components/schemas/TransferResponseReject" + propertyName: responseType + oneOf: + - $ref: "#/components/schemas/TransferResponseAccept" + - $ref: "#/components/schemas/TransferResponseReject" + OfferResponseTransfer: + additionalProperties: false + properties: + domain: + description: Which offer domain this response belongs to. Selects the shape + of `response`. + enum: + - TRANSFERS + example: TRANSFERS + type: string + response: + $ref: "#/components/schemas/TransferResponse" + required: + - domain + - response + type: object + OfferResponse: + discriminator: + mapping: + ONBOARDING: "#/components/schemas/OfferResponseOnboarding" + ALLOCATIONS: "#/components/schemas/OfferResponseAllocation" + TRANSFERS: "#/components/schemas/OfferResponseTransfer" + propertyName: domain + oneOf: + - $ref: "#/components/schemas/OfferResponseOnboarding" + - $ref: "#/components/schemas/OfferResponseAllocation" + - $ref: "#/components/schemas/OfferResponseTransfer" + OfferResponseAccepted: + description: The outgoing transaction that carries the response. Its on-chain + outcome arrives by webhook as a status update on this transaction. + properties: + transactionId: + description: The outgoing response transaction. + example: 5a1d8b0f-2c31-4c7e-9d0a-118e7b6c4a21 + type: string + status: + description: The transaction's status at the time of this response — `SUBMITTED`. + example: SUBMITTED + type: string + responseType: + description: "The response type you sent, echoed back so you can correlate\ + \ without re-reading." + example: DTCC_END_INVESTOR_ONBOARDING_REJECT + type: string + required: + - responseType + - status + - transactionId + type: object + ParticipantOnboardingPayload: + properties: + vaultAccountId: + description: The vault account that acts as the participant. Its Canton + party is derived for you. + example: "12" + type: string + asset: + description: Chain asset — CANTON or CANTON_TEST. + enum: + - CANTON + - CANTON_TEST + example: CANTON + type: string + expiresAt: + description: When the onboarding request expires if it has not been answered. + RFC 3339. + example: 2026-12-31T23:59:59Z + format: date-time + type: string + operator: + description: DTCC infra operator party id. + example: dtcc-operator::1220abc… + type: string + provider: + description: DTCC provider party id. + example: dtcc-provider::1220abc… + type: string + compliance: + description: DTCC compliance party id. + example: dtcc-compliance::1220abc… + type: string + registrar: + description: DTCC registrar party id — co-signs the accept. + example: dtcc-registrar::1220abc… + type: string + clientOnboarder: + description: DTCC client onboarder party id — co-signs the accept. + example: dtcc-onboarder::1220abc… + type: string + required: + - asset + - clientOnboarder + - compliance + - operator + - provider + - registrar + - vaultAccountId + type: object + CantonCallParticipantOnboarding: + additionalProperties: false + properties: + type: + description: Which call to make. Selects the shape of `payload`. + enum: + - DTCC_PARTICIPANT_ONBOARDING + example: DTCC_PARTICIPANT_ONBOARDING + type: string + payload: + $ref: "#/components/schemas/ParticipantOnboardingPayload" + required: + - payload + - type + type: object + EndInvestorPayload: + description: "Shared by invite / invite-cancel / offboard — identical wire shape,\ + \ different verb." + properties: + vaultAccountId: + description: The vault account whose Canton wallet acts here. + example: "12" + type: string + asset: + description: Chain asset — `CANTON` or `CANTON_TEST`. + enum: + - CANTON + - CANTON_TEST + example: CANTON + type: string + endInvestor: + description: The end investor's Canton party id. + example: investor-party::1220abc… + type: string + required: + - asset + - endInvestor + - vaultAccountId + type: object + CantonCallEndInvestorInvite: + additionalProperties: false + properties: + type: + description: Which call to make. Selects the shape of `payload`. + enum: + - DTCC_END_INVESTOR_INVITE + example: DTCC_END_INVESTOR_INVITE + type: string + payload: + $ref: "#/components/schemas/EndInvestorPayload" + required: + - payload + - type + type: object + CantonCallEndInvestorInviteCancel: + additionalProperties: false + properties: + type: + description: Which call to make. Selects the shape of `payload`. + enum: + - DTCC_END_INVESTOR_INVITE_CANCEL + example: DTCC_END_INVESTOR_INVITE_CANCEL + type: string + payload: + $ref: "#/components/schemas/EndInvestorPayload" + required: + - payload + - type + type: object + CantonCallEndInvestorOffboard: + additionalProperties: false + properties: + type: + description: Which call to make. Selects the shape of `payload`. + enum: + - DTCC_END_INVESTOR_OFFBOARD + example: DTCC_END_INVESTOR_OFFBOARD + type: string + payload: + $ref: "#/components/schemas/EndInvestorPayload" + required: + - payload + - type + type: object + AllowListPayload: + properties: + vaultAccountId: + description: The vault account whose Canton wallet acts here. + example: "12" + type: string + asset: + description: Chain asset — `CANTON` or `CANTON_TEST`. + enum: + - CANTON + - CANTON_TEST + example: CANTON + type: string + wallets: + description: Canton party ids to add or remove. + example: + - investor-party::1220abc… + items: + type: string + minItems: 1 + type: array + required: + - asset + - vaultAccountId + - wallets + type: object + CantonCallAllowListAdd: + additionalProperties: false + properties: + type: + description: Which call to make. Selects the shape of `payload`. + enum: + - DTCC_ALLOW_LIST_ADD + example: DTCC_ALLOW_LIST_ADD + type: string + payload: + $ref: "#/components/schemas/AllowListPayload" + required: + - payload + - type + type: object + CantonCallAllowListRemove: + additionalProperties: false + properties: + type: + description: Which call to make. Selects the shape of `payload`. + enum: + - DTCC_ALLOW_LIST_REMOVE + example: DTCC_ALLOW_LIST_REMOVE + type: string + payload: + $ref: "#/components/schemas/AllowListPayload" + required: + - payload + - type + type: object + AllocationWithdrawPayload: + properties: + vaultAccountId: + description: The vault account whose Canton wallet acts here. + example: "12" + type: string + asset: + description: Chain asset — `CANTON` or `CANTON_TEST`. + enum: + - CANTON + - CANTON_TEST + example: CANTON + type: string + allocationTransactionId: + description: The Fireblocks transaction id of the outgoing response that + created the allocation. The allocation is resolved from it — Canton contract + ids are never accepted here. + example: 5a1d8b0f-2c31-4c7e-9d0a-118e7b6c4a21 + type: string + required: + - allocationTransactionId + - asset + - vaultAccountId + type: object + CantonCallAllocationWithdraw: + additionalProperties: false + properties: + type: + description: Which call to make. Selects the shape of `payload`. + enum: + - ALLOCATION_WITHDRAW + example: ALLOCATION_WITHDRAW + type: string + payload: + $ref: "#/components/schemas/AllocationWithdrawPayload" + required: + - payload + - type + type: object + TransferWithdrawPayload: + properties: + vaultAccountId: + description: The vault account whose Canton wallet acts here. + example: "12" + type: string + asset: + description: Chain asset — `CANTON` or `CANTON_TEST`. + enum: + - CANTON + - CANTON_TEST + example: CANTON + type: string + offerTransactionId: + description: The Fireblocks transaction id of the OUTGOING transfer offer + being withdrawn. + example: 2d47ae90-31bb-4f6c-8a17-7e0c5b9f2d63 + type: string + required: + - asset + - offerTransactionId + - vaultAccountId + type: object + CantonCallTransferWithdraw: + additionalProperties: false + properties: + type: + description: Which call to make. Selects the shape of `payload`. + enum: + - TRANSFER_WITHDRAW + example: TRANSFER_WITHDRAW + type: string + payload: + $ref: "#/components/schemas/TransferWithdrawPayload" + required: + - payload + - type + type: object + CantonCall: + discriminator: + mapping: + DTCC_PARTICIPANT_ONBOARDING: "#/components/schemas/CantonCallParticipantOnboarding" + DTCC_END_INVESTOR_INVITE: "#/components/schemas/CantonCallEndInvestorInvite" + DTCC_END_INVESTOR_INVITE_CANCEL: "#/components/schemas/CantonCallEndInvestorInviteCancel" + DTCC_END_INVESTOR_OFFBOARD: "#/components/schemas/CantonCallEndInvestorOffboard" + DTCC_ALLOW_LIST_ADD: "#/components/schemas/CantonCallAllowListAdd" + DTCC_ALLOW_LIST_REMOVE: "#/components/schemas/CantonCallAllowListRemove" + ALLOCATION_WITHDRAW: "#/components/schemas/CantonCallAllocationWithdraw" + TRANSFER_WITHDRAW: "#/components/schemas/CantonCallTransferWithdraw" + propertyName: type + oneOf: + - $ref: "#/components/schemas/CantonCallParticipantOnboarding" + - $ref: "#/components/schemas/CantonCallEndInvestorInvite" + - $ref: "#/components/schemas/CantonCallEndInvestorInviteCancel" + - $ref: "#/components/schemas/CantonCallEndInvestorOffboard" + - $ref: "#/components/schemas/CantonCallAllowListAdd" + - $ref: "#/components/schemas/CantonCallAllowListRemove" + - $ref: "#/components/schemas/CantonCallAllocationWithdraw" + - $ref: "#/components/schemas/CantonCallTransferWithdraw" + CallAccepted: + description: The outgoing transaction that carries the call. + properties: + transactionId: + description: The outgoing transaction that carries the call. + example: 5a1d8b0f-2c31-4c7e-9d0a-118e7b6c4a21 + type: string + status: + description: The transaction's status at the time of this response — `SUBMITTED`. + example: SUBMITTED + type: string + required: + - status + - transactionId + type: object get_filter_parameter: properties: id: @@ -90357,6 +92548,27 @@ components: required: - timeSeconds type: object + QuorumStatus_quorum: + description: "The approval criteria and how far they have been met. `type` discriminates\ + \ the two shapes: `SIMPLE` flattens the common single-tier case, `RULESET`\ + \ is the general multi-tier form." + discriminator: + mapping: + SIMPLE: "#/components/schemas/SimpleQuorum" + RULESET: "#/components/schemas/RulesetQuorum" + propertyName: type + example: + type: SIMPLE + threshold: 2 + currentApprovalCount: 1 + status: PENDING + isMandatoryOwnerApproved: false + members: + - 0 + - 1 + oneOf: + - $ref: "#/components/schemas/SimpleQuorum" + - $ref: "#/components/schemas/RulesetQuorum" GasslessStandardConfigurations_gaslessStandardConfigurations_value: example: forwarderAddresses: diff --git a/build.gradle b/build.gradle index 62d3e1d6..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 = '29.0.0' +version = '0.0.0' buildscript { repositories { diff --git a/docs/AccessTypeResponse.md b/docs/AccessTypeResponse.md new file mode 100644 index 00000000..34ce74f3 --- /dev/null +++ b/docs/AccessTypeResponse.md @@ -0,0 +1,39 @@ + + +# AccessTypeResponse + +Response-only counterpart of AccessType. Used by the `via` field of response schemas (Quote, Rate, OrderDetails, OrderSummary — and therefore QuoteOffer, RateOffer and Offer) so that the PROVIDER variant can expose `subProviders` without that field ever becoming reachable from a request body. Request schemas (CreateOrderRequest.via) keep using AccessType. + +## oneOf schemas +* [AccountAccessResponse](AccountAccessResponse.md) +* [DirectAccessResponse](DirectAccessResponse.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.AccessTypeResponse; +import com.fireblocks.sdk.model.AccountAccessResponse; +import com.fireblocks.sdk.model.DirectAccessResponse; + +public class Example { + public static void main(String[] args) { + AccessTypeResponse exampleAccessTypeResponse = new AccessTypeResponse(); + + // create a new AccountAccessResponse + AccountAccessResponse exampleAccountAccessResponse = new AccountAccessResponse(); + // set AccessTypeResponse to AccountAccessResponse + exampleAccessTypeResponse.setActualInstance(exampleAccountAccessResponse); + // to get back the AccountAccessResponse set earlier + AccountAccessResponse testAccountAccessResponse = (AccountAccessResponse) exampleAccessTypeResponse.getActualInstance(); + + // create a new DirectAccessResponse + DirectAccessResponse exampleDirectAccessResponse = new DirectAccessResponse(); + // set AccessTypeResponse to DirectAccessResponse + exampleAccessTypeResponse.setActualInstance(exampleDirectAccessResponse); + // to get back the DirectAccessResponse set earlier + DirectAccessResponse testDirectAccessResponse = (DirectAccessResponse) exampleAccessTypeResponse.getActualInstance(); + } +} +``` + + diff --git a/docs/AccountAccessResponse.md b/docs/AccountAccessResponse.md new file mode 100644 index 00000000..f08fadce --- /dev/null +++ b/docs/AccountAccessResponse.md @@ -0,0 +1,24 @@ + + +# AccountAccessResponse + +Response-only counterpart of AccountAccess. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Indicates this uses account-based access | | +|**providerId** | **String** | The ID of the provider | [optional] | +|**accountId** | **String** | The ID of the account | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| PROVIDER_ACCOUNT | "PROVIDER_ACCOUNT" | + + + diff --git a/docs/AllocationResponse.md b/docs/AllocationResponse.md new file mode 100644 index 00000000..b792df33 --- /dev/null +++ b/docs/AllocationResponse.md @@ -0,0 +1,37 @@ + + +# AllocationResponse + +## oneOf schemas +* [AllocationResponseAccept](AllocationResponseAccept.md) +* [AllocationResponseReject](AllocationResponseReject.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.AllocationResponse; +import com.fireblocks.sdk.model.AllocationResponseAccept; +import com.fireblocks.sdk.model.AllocationResponseReject; + +public class Example { + public static void main(String[] args) { + AllocationResponse exampleAllocationResponse = new AllocationResponse(); + + // create a new AllocationResponseAccept + AllocationResponseAccept exampleAllocationResponseAccept = new AllocationResponseAccept(); + // set AllocationResponse to AllocationResponseAccept + exampleAllocationResponse.setActualInstance(exampleAllocationResponseAccept); + // to get back the AllocationResponseAccept set earlier + AllocationResponseAccept testAllocationResponseAccept = (AllocationResponseAccept) exampleAllocationResponse.getActualInstance(); + + // create a new AllocationResponseReject + AllocationResponseReject exampleAllocationResponseReject = new AllocationResponseReject(); + // set AllocationResponse to AllocationResponseReject + exampleAllocationResponse.setActualInstance(exampleAllocationResponseReject); + // to get back the AllocationResponseReject set earlier + AllocationResponseReject testAllocationResponseReject = (AllocationResponseReject) exampleAllocationResponse.getActualInstance(); + } +} +``` + + diff --git a/docs/AllocationResponseAccept.md b/docs/AllocationResponseAccept.md new file mode 100644 index 00000000..fd3a3327 --- /dev/null +++ b/docs/AllocationResponseAccept.md @@ -0,0 +1,22 @@ + + +# AllocationResponseAccept + +Accept a CIP-56 allocation request. Carries no arguments. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responseType** | [**ResponseTypeEnum**](#ResponseTypeEnum) | How you are answering the allocation request. | | + + + +## Enum: ResponseTypeEnum + +| Name | Value | +|---- | -----| +| ALLOCATION_ACCEPT | "ALLOCATION_ACCEPT" | + + + diff --git a/docs/AllocationResponseReject.md b/docs/AllocationResponseReject.md new file mode 100644 index 00000000..29d35c18 --- /dev/null +++ b/docs/AllocationResponseReject.md @@ -0,0 +1,22 @@ + + +# AllocationResponseReject + +Reject a CIP-56 allocation request. Carries no arguments. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responseType** | [**ResponseTypeEnum**](#ResponseTypeEnum) | How you are answering the allocation request. | | + + + +## Enum: ResponseTypeEnum + +| Name | Value | +|---- | -----| +| ALLOCATION_REJECT | "ALLOCATION_REJECT" | + + + diff --git a/docs/AllocationWithdrawPayload.md b/docs/AllocationWithdrawPayload.md new file mode 100644 index 00000000..cf6f3610 --- /dev/null +++ b/docs/AllocationWithdrawPayload.md @@ -0,0 +1,24 @@ + + +# AllocationWithdrawPayload + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vaultAccountId** | **String** | The vault account whose Canton wallet acts here. | | +|**asset** | [**AssetEnum**](#AssetEnum) | Chain asset — `CANTON` or `CANTON_TEST`. | | +|**allocationTransactionId** | **String** | The Fireblocks transaction id of the outgoing response that created the allocation. The allocation is resolved from it — Canton contract ids are never accepted here. | | + + + +## Enum: AssetEnum + +| Name | Value | +|---- | -----| +| CANTON | "CANTON" | +| CANTON_TEST | "CANTON_TEST" | + + + diff --git a/docs/AllowListPayload.md b/docs/AllowListPayload.md new file mode 100644 index 00000000..8a06cc05 --- /dev/null +++ b/docs/AllowListPayload.md @@ -0,0 +1,24 @@ + + +# AllowListPayload + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vaultAccountId** | **String** | The vault account whose Canton wallet acts here. | | +|**asset** | [**AssetEnum**](#AssetEnum) | Chain asset — `CANTON` or `CANTON_TEST`. | | +|**wallets** | **List<String>** | Canton party ids to add or remove. | | + + + +## Enum: AssetEnum + +| Name | Value | +|---- | -----| +| CANTON | "CANTON" | +| CANTON_TEST | "CANTON_TEST" | + + + diff --git a/docs/ApprovalRequestItem.md b/docs/ApprovalRequestItem.md new file mode 100644 index 00000000..b85095f8 --- /dev/null +++ b/docs/ApprovalRequestItem.md @@ -0,0 +1,27 @@ + + +# ApprovalRequestItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requestPayload** | **String** | The pending approval request as a JSON string, exactly as produced by the backend — this is the precise string to sign in order to approve the request (sign it as-is; do not re-serialize). The JSON has the shape { requestId, requestType, requestTimestamp (epoch ms), expiresAt (epoch seconds), requestData }, where requestData is the request-type-specific payload. | | +|**requestSignature** | **String** | Signature over the requestPayload. Empty until request signing is implemented. | [optional] | +|**userStatus** | [**UserStatusEnum**](#UserStatusEnum) | The authenticated user's approval status for this request. | | +|**quorumStatus** | [**QuorumStatus**](QuorumStatus.md) | | [optional] | + + + +## Enum: UserStatusEnum + +| Name | Value | +|---- | -----| +| USER_STATUS_NOT_APPLICABLE | "USER_STATUS_NOT_APPLICABLE" | +| USER_NOT_ELIGIBLE_TO_APPROVE | "USER_NOT_ELIGIBLE_TO_APPROVE" | +| USER_NOT_APPROVED | "USER_NOT_APPROVED" | +| USER_APPROVED | "USER_APPROVED" | + + + diff --git a/docs/ApprovalsBetaApi.md b/docs/ApprovalsBetaApi.md new file mode 100644 index 00000000..1e795c89 --- /dev/null +++ b/docs/ApprovalsBetaApi.md @@ -0,0 +1,178 @@ +# ApprovalsBetaApi + +All URIs are relative to https://developers.fireblocks.com/reference/ + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getApprovalById**](ApprovalsBetaApi.md#getApprovalById) | **GET** /approvals/{requestId} | Get a single approval request | +| [**getApprovals**](ApprovalsBetaApi.md#getApprovals) | **GET** /approvals | List approval requests | + + + +## getApprovalById + +> CompletableFuture> getApprovalById getApprovalById(requestId, userId, quorumStatusMode) + +Get a single approval request + +Retrieve full detail for a single approval request by ID, including the payload to sign and, when requested, the request's `quorumStatus`. Because this endpoint addresses one request, it accepts `quorumStatusMode=FULL`, which adds the participating approvers and their individual approval state. `userStatus` reflects the authenticated user by default. Pass `userId` to report it for another user instead. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, 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.ApprovalsBetaApi; +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); + + String requestId = "requestId_example"; // String | The approval request ID. + String userId = "8f3c1a2e-4b7d-4c91-a0e5-2d6f8b1c3a94"; // String | Report `userStatus` for this user instead of the authenticated user. This selects whose approval state is returned; it does not change which requests can be fetched. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. + String quorumStatusMode = "NONE"; // String | How much quorum detail to include in `quorumStatus`. `NONE` (the default) returns it as `null`. `SUMMARY` returns the approval thresholds, current counts and status. `FULL` adds `users` and the per-group `members` indexes identifying who may approve and who already has. Any other value is rejected with 400; the parameter is case-sensitive. + try { + CompletableFuture> response = fireblocks.approvalsBeta().getApprovalById(requestId, userId, quorumStatusMode); + 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 ApprovalsBetaApi#getApprovalById"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **requestId** | **String**| The approval request ID. | | +| **userId** | **String**| Report `userStatus` for this user instead of the authenticated user. This selects whose approval state is returned; it does not change which requests can be fetched. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. | [optional] | +| **quorumStatusMode** | **String**| How much quorum detail to include in `quorumStatus`. `NONE` (the default) returns it as `null`. `SUMMARY` returns the approval thresholds, current counts and status. `FULL` adds `users` and the per-group `members` indexes identifying who may approve and who already has. Any other value is rejected with 400; the parameter is case-sensitive. | [optional] [default to NONE] [enum: NONE, SUMMARY, FULL] | + +### 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** | The requested approval request. | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## getApprovals + +> CompletableFuture> getApprovals getApprovals(includeUserApproved, userId, includeAllUsers, quorumStatusMode, pageSize, pageCursor) + +List approval requests + +Retrieve the pending approval requests the authenticated API user is eligible to act on, including requests the user has already approved that are still pending overall. The response is scoped to the authenticated user by default. Pass `userId` to read another user's queue, or `includeAllUsers=true` to read every pending request in the workspace. Both require an Admin, Non-Signing Admin, Security Admin or Security Auditor role and are rejected with 403 otherwise. Set `quorumStatusMode=SUMMARY` to include each request's approval thresholds and counts. The per-approver breakdown is available only when fetching a single request — see `GET /approvals/{requestId}`. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, 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.ApprovalsBetaApi; +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); + + Boolean includeUserApproved = true; // Boolean | When true, also include requests the authenticated user has already approved that are still pending overall. Defaults to false (only requests the user has not yet acted on). + String userId = "8f3c1a2e-4b7d-4c91-a0e5-2d6f8b1c3a94"; // String | Return the pending requests for this user instead of the authenticated user. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. Cannot be combined with `includeAllUsers=true` — sending both is rejected with 400. + Boolean includeAllUsers = false; // Boolean | When true, return every pending request in the workspace instead of a single user's queue. Defaults to false. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. In this mode `userStatus` is always `USER_STATUS_NOT_APPLICABLE`, because the response is not scoped to one user, and `includeUserApproved` has no effect. Cannot be combined with `userId`. + String quorumStatusMode = "NONE"; // String | How much quorum detail to include in each request's `quorumStatus`. `NONE` (the default) returns it as `null`. `SUMMARY` returns the approval thresholds, current counts and status. `FULL` is rejected with 400 on this endpoint because the per-approver breakdown requires a single request — use `GET /approvals/{requestId}` for it. Any other value is rejected with 400; the parameter is case-sensitive. + Integer pageSize = 20; // Integer | Number of results per page. Maximum 30. Defaults to 20. + String pageCursor = "pageCursor_example"; // String | Cursor returned from the previous response (the `next` field) to fetch the next page. + try { + CompletableFuture> response = fireblocks.approvalsBeta().getApprovals(includeUserApproved, userId, includeAllUsers, quorumStatusMode, pageSize, pageCursor); + 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 ApprovalsBetaApi#getApprovals"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **includeUserApproved** | **Boolean**| When true, also include requests the authenticated user has already approved that are still pending overall. Defaults to false (only requests the user has not yet acted on). | [optional] | +| **userId** | **String**| Return the pending requests for this user instead of the authenticated user. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. Cannot be combined with `includeAllUsers=true` — sending both is rejected with 400. | [optional] | +| **includeAllUsers** | **Boolean**| When true, return every pending request in the workspace instead of a single user's queue. Defaults to false. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. In this mode `userStatus` is always `USER_STATUS_NOT_APPLICABLE`, because the response is not scoped to one user, and `includeUserApproved` has no effect. Cannot be combined with `userId`. | [optional] [default to false] | +| **quorumStatusMode** | **String**| How much quorum detail to include in each request's `quorumStatus`. `NONE` (the default) returns it as `null`. `SUMMARY` returns the approval thresholds, current counts and status. `FULL` is rejected with 400 on this endpoint because the per-approver breakdown requires a single request — use `GET /approvals/{requestId}` for it. Any other value is rejected with 400; the parameter is case-sensitive. | [optional] [default to NONE] [enum: NONE, SUMMARY] | +| **pageSize** | **Integer**| Number of results per page. Maximum 30. Defaults to 20. | [optional] [default to 20] | +| **pageCursor** | **String**| Cursor returned from the previous response (the `next` field) to fetch the next page. | [optional] | + +### 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** | Approval requests the authenticated user is eligible to act on. | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + diff --git a/docs/CallAccepted.md b/docs/CallAccepted.md new file mode 100644 index 00000000..2fd6f136 --- /dev/null +++ b/docs/CallAccepted.md @@ -0,0 +1,15 @@ + + +# CallAccepted + +The outgoing transaction that carries the call. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**transactionId** | **String** | The outgoing transaction that carries the call. | | +|**status** | **String** | The transaction's status at the time of this response — `SUBMITTED`. | | + + + diff --git a/docs/CantonCall.md b/docs/CantonCall.md new file mode 100644 index 00000000..ddde9643 --- /dev/null +++ b/docs/CantonCall.md @@ -0,0 +1,91 @@ + + +# CantonCall + +## oneOf schemas +* [CantonCallAllocationWithdraw](CantonCallAllocationWithdraw.md) +* [CantonCallAllowListAdd](CantonCallAllowListAdd.md) +* [CantonCallAllowListRemove](CantonCallAllowListRemove.md) +* [CantonCallEndInvestorInvite](CantonCallEndInvestorInvite.md) +* [CantonCallEndInvestorInviteCancel](CantonCallEndInvestorInviteCancel.md) +* [CantonCallEndInvestorOffboard](CantonCallEndInvestorOffboard.md) +* [CantonCallParticipantOnboarding](CantonCallParticipantOnboarding.md) +* [CantonCallTransferWithdraw](CantonCallTransferWithdraw.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.CantonCall; +import com.fireblocks.sdk.model.CantonCallAllocationWithdraw; +import com.fireblocks.sdk.model.CantonCallAllowListAdd; +import com.fireblocks.sdk.model.CantonCallAllowListRemove; +import com.fireblocks.sdk.model.CantonCallEndInvestorInvite; +import com.fireblocks.sdk.model.CantonCallEndInvestorInviteCancel; +import com.fireblocks.sdk.model.CantonCallEndInvestorOffboard; +import com.fireblocks.sdk.model.CantonCallParticipantOnboarding; +import com.fireblocks.sdk.model.CantonCallTransferWithdraw; + +public class Example { + public static void main(String[] args) { + CantonCall exampleCantonCall = new CantonCall(); + + // create a new CantonCallAllocationWithdraw + CantonCallAllocationWithdraw exampleCantonCallAllocationWithdraw = new CantonCallAllocationWithdraw(); + // set CantonCall to CantonCallAllocationWithdraw + exampleCantonCall.setActualInstance(exampleCantonCallAllocationWithdraw); + // to get back the CantonCallAllocationWithdraw set earlier + CantonCallAllocationWithdraw testCantonCallAllocationWithdraw = (CantonCallAllocationWithdraw) exampleCantonCall.getActualInstance(); + + // create a new CantonCallAllowListAdd + CantonCallAllowListAdd exampleCantonCallAllowListAdd = new CantonCallAllowListAdd(); + // set CantonCall to CantonCallAllowListAdd + exampleCantonCall.setActualInstance(exampleCantonCallAllowListAdd); + // to get back the CantonCallAllowListAdd set earlier + CantonCallAllowListAdd testCantonCallAllowListAdd = (CantonCallAllowListAdd) exampleCantonCall.getActualInstance(); + + // create a new CantonCallAllowListRemove + CantonCallAllowListRemove exampleCantonCallAllowListRemove = new CantonCallAllowListRemove(); + // set CantonCall to CantonCallAllowListRemove + exampleCantonCall.setActualInstance(exampleCantonCallAllowListRemove); + // to get back the CantonCallAllowListRemove set earlier + CantonCallAllowListRemove testCantonCallAllowListRemove = (CantonCallAllowListRemove) exampleCantonCall.getActualInstance(); + + // create a new CantonCallEndInvestorInvite + CantonCallEndInvestorInvite exampleCantonCallEndInvestorInvite = new CantonCallEndInvestorInvite(); + // set CantonCall to CantonCallEndInvestorInvite + exampleCantonCall.setActualInstance(exampleCantonCallEndInvestorInvite); + // to get back the CantonCallEndInvestorInvite set earlier + CantonCallEndInvestorInvite testCantonCallEndInvestorInvite = (CantonCallEndInvestorInvite) exampleCantonCall.getActualInstance(); + + // create a new CantonCallEndInvestorInviteCancel + CantonCallEndInvestorInviteCancel exampleCantonCallEndInvestorInviteCancel = new CantonCallEndInvestorInviteCancel(); + // set CantonCall to CantonCallEndInvestorInviteCancel + exampleCantonCall.setActualInstance(exampleCantonCallEndInvestorInviteCancel); + // to get back the CantonCallEndInvestorInviteCancel set earlier + CantonCallEndInvestorInviteCancel testCantonCallEndInvestorInviteCancel = (CantonCallEndInvestorInviteCancel) exampleCantonCall.getActualInstance(); + + // create a new CantonCallEndInvestorOffboard + CantonCallEndInvestorOffboard exampleCantonCallEndInvestorOffboard = new CantonCallEndInvestorOffboard(); + // set CantonCall to CantonCallEndInvestorOffboard + exampleCantonCall.setActualInstance(exampleCantonCallEndInvestorOffboard); + // to get back the CantonCallEndInvestorOffboard set earlier + CantonCallEndInvestorOffboard testCantonCallEndInvestorOffboard = (CantonCallEndInvestorOffboard) exampleCantonCall.getActualInstance(); + + // create a new CantonCallParticipantOnboarding + CantonCallParticipantOnboarding exampleCantonCallParticipantOnboarding = new CantonCallParticipantOnboarding(); + // set CantonCall to CantonCallParticipantOnboarding + exampleCantonCall.setActualInstance(exampleCantonCallParticipantOnboarding); + // to get back the CantonCallParticipantOnboarding set earlier + CantonCallParticipantOnboarding testCantonCallParticipantOnboarding = (CantonCallParticipantOnboarding) exampleCantonCall.getActualInstance(); + + // create a new CantonCallTransferWithdraw + CantonCallTransferWithdraw exampleCantonCallTransferWithdraw = new CantonCallTransferWithdraw(); + // set CantonCall to CantonCallTransferWithdraw + exampleCantonCall.setActualInstance(exampleCantonCallTransferWithdraw); + // to get back the CantonCallTransferWithdraw set earlier + CantonCallTransferWithdraw testCantonCallTransferWithdraw = (CantonCallTransferWithdraw) exampleCantonCall.getActualInstance(); + } +} +``` + + diff --git a/docs/CantonCallAllocationWithdraw.md b/docs/CantonCallAllocationWithdraw.md new file mode 100644 index 00000000..67616df5 --- /dev/null +++ b/docs/CantonCallAllocationWithdraw.md @@ -0,0 +1,22 @@ + + +# CantonCallAllocationWithdraw + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Which call to make. Selects the shape of `payload`. | | +|**payload** | [**AllocationWithdrawPayload**](AllocationWithdrawPayload.md) | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| ALLOCATION_WITHDRAW | "ALLOCATION_WITHDRAW" | + + + diff --git a/docs/CantonCallAllowListAdd.md b/docs/CantonCallAllowListAdd.md new file mode 100644 index 00000000..8962847a --- /dev/null +++ b/docs/CantonCallAllowListAdd.md @@ -0,0 +1,22 @@ + + +# CantonCallAllowListAdd + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Which call to make. Selects the shape of `payload`. | | +|**payload** | [**AllowListPayload**](AllowListPayload.md) | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| DTCC_ALLOW_LIST_ADD | "DTCC_ALLOW_LIST_ADD" | + + + diff --git a/docs/CantonCallAllowListRemove.md b/docs/CantonCallAllowListRemove.md new file mode 100644 index 00000000..fcd2de10 --- /dev/null +++ b/docs/CantonCallAllowListRemove.md @@ -0,0 +1,22 @@ + + +# CantonCallAllowListRemove + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Which call to make. Selects the shape of `payload`. | | +|**payload** | [**AllowListPayload**](AllowListPayload.md) | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| DTCC_ALLOW_LIST_REMOVE | "DTCC_ALLOW_LIST_REMOVE" | + + + diff --git a/docs/CantonCallEndInvestorInvite.md b/docs/CantonCallEndInvestorInvite.md new file mode 100644 index 00000000..39a9d662 --- /dev/null +++ b/docs/CantonCallEndInvestorInvite.md @@ -0,0 +1,22 @@ + + +# CantonCallEndInvestorInvite + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Which call to make. Selects the shape of `payload`. | | +|**payload** | [**EndInvestorPayload**](EndInvestorPayload.md) | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| DTCC_END_INVESTOR_INVITE | "DTCC_END_INVESTOR_INVITE" | + + + diff --git a/docs/CantonCallEndInvestorInviteCancel.md b/docs/CantonCallEndInvestorInviteCancel.md new file mode 100644 index 00000000..9bbd34b0 --- /dev/null +++ b/docs/CantonCallEndInvestorInviteCancel.md @@ -0,0 +1,22 @@ + + +# CantonCallEndInvestorInviteCancel + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Which call to make. Selects the shape of `payload`. | | +|**payload** | [**EndInvestorPayload**](EndInvestorPayload.md) | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| DTCC_END_INVESTOR_INVITE_CANCEL | "DTCC_END_INVESTOR_INVITE_CANCEL" | + + + diff --git a/docs/CantonCallEndInvestorOffboard.md b/docs/CantonCallEndInvestorOffboard.md new file mode 100644 index 00000000..e3e3432a --- /dev/null +++ b/docs/CantonCallEndInvestorOffboard.md @@ -0,0 +1,22 @@ + + +# CantonCallEndInvestorOffboard + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Which call to make. Selects the shape of `payload`. | | +|**payload** | [**EndInvestorPayload**](EndInvestorPayload.md) | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| DTCC_END_INVESTOR_OFFBOARD | "DTCC_END_INVESTOR_OFFBOARD" | + + + diff --git a/docs/CantonCallParticipantOnboarding.md b/docs/CantonCallParticipantOnboarding.md new file mode 100644 index 00000000..21ff7714 --- /dev/null +++ b/docs/CantonCallParticipantOnboarding.md @@ -0,0 +1,22 @@ + + +# CantonCallParticipantOnboarding + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Which call to make. Selects the shape of `payload`. | | +|**payload** | [**ParticipantOnboardingPayload**](ParticipantOnboardingPayload.md) | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| DTCC_PARTICIPANT_ONBOARDING | "DTCC_PARTICIPANT_ONBOARDING" | + + + diff --git a/docs/CantonCallTransferWithdraw.md b/docs/CantonCallTransferWithdraw.md new file mode 100644 index 00000000..5131fbae --- /dev/null +++ b/docs/CantonCallTransferWithdraw.md @@ -0,0 +1,22 @@ + + +# CantonCallTransferWithdraw + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Which call to make. Selects the shape of `payload`. | | +|**payload** | [**TransferWithdrawPayload**](TransferWithdrawPayload.md) | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| TRANSFER_WITHDRAW | "TRANSFER_WITHDRAW" | + + + diff --git a/docs/CreateWebhookOAuthRequest.md b/docs/CreateWebhookOAuthRequest.md new file mode 100644 index 00000000..2693c58d --- /dev/null +++ b/docs/CreateWebhookOAuthRequest.md @@ -0,0 +1,22 @@ + + +# CreateWebhookOAuthRequest + +A new reusable OAuth 2.0 client credential set. Attach it to a webhook by passing the returned id as that webhook's `webhookOauthId`. Several webhooks may share one credential set, so rotating its client secret covers all of them at once. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | A label for this credential set, shown when listing them. | | +|**clientId** | **String** | OAuth client ID used to authenticate with the token endpoint. | | +|**clientSecret** | **String** | OAuth client secret. Write-only — never returned. Limited to 480 bytes UTF-8 encoded. With `client_secret_jwt` it signs the assertion rather than being sent. | | +|**url** | **String** | Token endpoint URL. HTTPS on port 443 only, and the host must resolve publicly — localhost and private, link-local or loopback addresses are rejected. | | +|**authMethod** | **String** | How the client credentials reach the token endpoint. `client_secret_basic` uses an HTTP Basic header, `client_secret_post` uses form fields in the body, and `client_secret_jwt` sends a JWT assertion signed with the secret, so the secret itself is never transmitted. Defaults to `client_secret_basic`. | [optional] | +|**customJwtClaims** | **Map<String, Object>** | Extra claims for the JWT assertion. Used only when `authMethod` is `client_secret_jwt`. The usual one to set is `aud`, which defaults to the token endpoint URL; some authorization servers expect their own identifier instead. A value may be any JSON type except `null` — `null` is reserved for deleting a claim on update. `iss`, `sub`, `jti`, `iat` and `exp` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. Values are write-only; responses return only the claim names. On update this merges claim by claim rather than replacing — see `WebhookOAuthCustomJwtClaimsUpdate`. | [optional] | +|**customBodyParams** | **Map<String, String>** | Extra parameters for the token request body — `scope` most commonly, sometimes `audience` or `resource`. Applies to every authentication method. Values must be strings, because the token request body is form-encoded rather than JSON. An empty string is allowed. `grant_type`, `client_id`, `client_secret`, `client_assertion` and `client_assertion_type` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. Values are write-only; responses return only the parameter names. On update this merges key by key rather than replacing — see `WebhookOAuthCustomBodyParamsUpdate`. | [optional] | +|**customHeaders** | **Map<String, String>** | Extra HTTP headers for **the token request to your authorization server** — not for the webhook delivery, which has its own separate `customHeaders`. A gateway API key is the usual case. Applies to every authentication method. Values must be strings; an empty string is allowed. Names are matched case-insensitively, so two names differing only in case are a duplicate. Names are stored and returned lowercased, so `X-Api-Key` comes back as `x-api-key`. `Content-Type`, `Authorization`, `Content-Length` and `Host` are set by Fireblocks and cannot be overridden. The whole object must be under 16 KB. Values are write-only; responses return only the header names. On update this merges name by name rather than replacing — see `WebhookOAuthCustomHeadersUpdate`. | [optional] | +|**mtlsClientSignedCert** | **String** | PEM-encoded client certificate for mTLS when fetching tokens. Must be a valid X.509 certificate inside its validity window. | [optional] | + + + diff --git a/docs/CreateWebhookRequest.md b/docs/CreateWebhookRequest.md index 37253622..1f1cc292 100644 --- a/docs/CreateWebhookRequest.md +++ b/docs/CreateWebhookRequest.md @@ -13,7 +13,7 @@ |**enabled** | **Boolean** | The status of the webhook. If false, the webhook will not receive notifications. | [optional] | |**mtls** | [**WebhookMtls**](WebhookMtls.md) | | [optional] | |**oauth** | [**WebhookOAuth**](WebhookOAuth.md) | | [optional] | -|**customHeaders** | **Map<String, String>** | Custom HTTP headers attached to every notification delivered by this webhook (max 10). Header names must be valid RFC 7230 tokens (printable ASCII, no separators), are treated case-insensitively (duplicate names differing only in case are rejected), and may not exceed 128 characters. The following names are reserved and cannot be used: Host, Content-Type, Content-Length, Transfer-Encoding, Connection, User-Agent, Accept, Accept-Encoding, Fireblocks-Signature, Fireblocks-Webhook-Signature. Header values are write-only — never returned in responses. | [optional] | +|**customHeaders** | **Map<String, Object>** | Custom HTTP headers attached to every notification delivered by this webhook. A value is a string, sent as one header line, or an array of strings, sent as one header line per element under the same name. `Cookie` accepts only a string. An empty array is rejected — leave the name out instead. At most 10 header lines in total, counted per array element rather than per name. Names must be valid HTTP header tokens, are case-insensitive, and are at most 128 characters. Values are at most 1024 characters and may be empty. Reserved names: `Host`, `Content-Type`, `Content-Length`, `Transfer-Encoding`, `Connection`, `User-Agent`, `Accept`, `Accept-Encoding`, `Fireblocks-Signature`, `Fireblocks-Webhook-Signature`, `Authorization`. `Authorization` is reserved whether or not this webhook has OAuth credentials attached, because Fireblocks sets it once it does. Values are write-only; responses return only the header names. | [optional] | diff --git a/docs/DeleteWebhookOAuthResponse.md b/docs/DeleteWebhookOAuthResponse.md new file mode 100644 index 00000000..63c14f8f --- /dev/null +++ b/docs/DeleteWebhookOAuthResponse.md @@ -0,0 +1,25 @@ + + +# DeleteWebhookOAuthResponse + +The deleted OAuth credential set, plus the ids of any webhooks the delete detached from it. Webhooks are only detached by `forceDelete=true`; without it a delete is refused with `409` while anything still references the credentials. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **UUID** | The id of the OAuth credentials. Pass this as a webhook's `webhookOauthId` to attach them. | | +|**name** | **String** | The label given to this credential set. | | +|**clientId** | **String** | OAuth client ID used to authenticate with the token endpoint. | | +|**url** | **String** | Token endpoint URL. | | +|**authMethod** | **String** | How the client credentials are presented to the token endpoint: `client_secret_basic`, `client_secret_post` or `client_secret_jwt`. Credentials created without this field report `client_secret_basic`, which is what they use. | | +|**customJwtClaims** | **List<String>** | Names of the additional claims placed in the JWT assertion. Claim values are write-only and are never returned. Absent when no custom claims are configured. | [optional] | +|**customBodyParams** | **List<String>** | Names of the additional parameters added to the token request body. Parameter values are write-only and are never returned. Absent when no custom parameters are configured. | [optional] | +|**customHeaders** | **List<String>** | Names of the additional HTTP headers added to **the token request sent to the authorization server** — not to the webhook delivery, which has its own separate `customHeaders`. Header values are write-only and are never returned. Absent when no custom headers are configured. | [optional] | +|**mtlsClientSignedCert** | **String** | PEM-encoded client certificate used for mTLS when fetching OAuth tokens. | [optional] | +|**createdAt** | **Long** | The date and time the OAuth credentials were created, in milliseconds. | | +|**updatedAt** | **Long** | The date and time the OAuth credentials were last updated, in milliseconds. | | +|**detachedWebhookIds** | **List<UUID>** | Webhooks whose `webhookOauthId` was cleared. The webhooks themselves are not deleted and keep delivering, just without an `Authorization` header. Empty unless `forceDelete=true` detached something. | | + + + diff --git a/docs/DirectAccessResponse.md b/docs/DirectAccessResponse.md new file mode 100644 index 00000000..d71aba10 --- /dev/null +++ b/docs/DirectAccessResponse.md @@ -0,0 +1,24 @@ + + +# DirectAccessResponse + +Response-only counterpart of DirectAccess. Adds the server-populated `subProviders` field. Never use this schema in a request body — requests must keep using DirectAccess (via AccessType). + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Indicates this uses direct provider access | | +|**providerId** | **String** | The ID of the provider | | +|**subProviders** | **List<String>** | The underlying providers or tools that this direct-access route is composed of, in execution order. Response-only: this field is populated by the server and is never accepted from client requests. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| PROVIDER | "PROVIDER" | + + + diff --git a/docs/DirectAccessResponseInfo.md b/docs/DirectAccessResponseInfo.md new file mode 100644 index 00000000..7f279775 --- /dev/null +++ b/docs/DirectAccessResponseInfo.md @@ -0,0 +1,13 @@ + + +# DirectAccessResponseInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**subProviders** | **List<String>** | The underlying providers or tools that this direct-access route is composed of, in execution order. Response-only: this field is populated by the server and is never accepted from client requests. | [optional] | + + + diff --git a/docs/EndInvestorPayload.md b/docs/EndInvestorPayload.md new file mode 100644 index 00000000..6b427f30 --- /dev/null +++ b/docs/EndInvestorPayload.md @@ -0,0 +1,25 @@ + + +# EndInvestorPayload + +Shared by invite / invite-cancel / offboard — identical wire shape, different verb. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vaultAccountId** | **String** | The vault account whose Canton wallet acts here. | | +|**asset** | [**AssetEnum**](#AssetEnum) | Chain asset — `CANTON` or `CANTON_TEST`. | | +|**endInvestor** | **String** | The end investor's Canton party id. | | + + + +## Enum: AssetEnum + +| Name | Value | +|---- | -----| +| CANTON | "CANTON" | +| CANTON_TEST | "CANTON_TEST" | + + + diff --git a/docs/GetFindingsExternalResponse.md b/docs/GetFindingsExternalResponse.md index d0fa3eb5..81d23e9a 100644 --- a/docs/GetFindingsExternalResponse.md +++ b/docs/GetFindingsExternalResponse.md @@ -2,7 +2,6 @@ # GetFindingsExternalResponse -A paginated list of FSPM findings ## Properties diff --git a/docs/ListApprovalsResponse.md b/docs/ListApprovalsResponse.md new file mode 100644 index 00000000..d70898a8 --- /dev/null +++ b/docs/ListApprovalsResponse.md @@ -0,0 +1,14 @@ + + +# ListApprovalsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<ApprovalRequestItem>**](ApprovalRequestItem.md) | The approval requests the authenticated user is eligible to act on. | | +|**next** | **String** | Cursor for the next page of results. Pass it back as the `pageCursor` query param to fetch the next page. Empty or absent when this is the last page. | [optional] | + + + diff --git a/docs/OfferResponse.md b/docs/OfferResponse.md new file mode 100644 index 00000000..9970d95b --- /dev/null +++ b/docs/OfferResponse.md @@ -0,0 +1,46 @@ + + +# OfferResponse + +## oneOf schemas +* [OfferResponseAllocation](OfferResponseAllocation.md) +* [OfferResponseOnboarding](OfferResponseOnboarding.md) +* [OfferResponseTransfer](OfferResponseTransfer.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.OfferResponse; +import com.fireblocks.sdk.model.OfferResponseAllocation; +import com.fireblocks.sdk.model.OfferResponseOnboarding; +import com.fireblocks.sdk.model.OfferResponseTransfer; + +public class Example { + public static void main(String[] args) { + OfferResponse exampleOfferResponse = new OfferResponse(); + + // create a new OfferResponseAllocation + OfferResponseAllocation exampleOfferResponseAllocation = new OfferResponseAllocation(); + // set OfferResponse to OfferResponseAllocation + exampleOfferResponse.setActualInstance(exampleOfferResponseAllocation); + // to get back the OfferResponseAllocation set earlier + OfferResponseAllocation testOfferResponseAllocation = (OfferResponseAllocation) exampleOfferResponse.getActualInstance(); + + // create a new OfferResponseOnboarding + OfferResponseOnboarding exampleOfferResponseOnboarding = new OfferResponseOnboarding(); + // set OfferResponse to OfferResponseOnboarding + exampleOfferResponse.setActualInstance(exampleOfferResponseOnboarding); + // to get back the OfferResponseOnboarding set earlier + OfferResponseOnboarding testOfferResponseOnboarding = (OfferResponseOnboarding) exampleOfferResponse.getActualInstance(); + + // create a new OfferResponseTransfer + OfferResponseTransfer exampleOfferResponseTransfer = new OfferResponseTransfer(); + // set OfferResponse to OfferResponseTransfer + exampleOfferResponse.setActualInstance(exampleOfferResponseTransfer); + // to get back the OfferResponseTransfer set earlier + OfferResponseTransfer testOfferResponseTransfer = (OfferResponseTransfer) exampleOfferResponse.getActualInstance(); + } +} +``` + + diff --git a/docs/OfferResponseAccepted.md b/docs/OfferResponseAccepted.md new file mode 100644 index 00000000..1d311fd0 --- /dev/null +++ b/docs/OfferResponseAccepted.md @@ -0,0 +1,16 @@ + + +# OfferResponseAccepted + +The outgoing transaction that carries the response. Its on-chain outcome arrives by webhook as a status update on this transaction. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**transactionId** | **String** | The outgoing response transaction. | | +|**status** | **String** | The transaction's status at the time of this response — `SUBMITTED`. | | +|**responseType** | **String** | The response type you sent, echoed back so you can correlate without re-reading. | | + + + diff --git a/docs/OfferResponseAllocation.md b/docs/OfferResponseAllocation.md new file mode 100644 index 00000000..e206877f --- /dev/null +++ b/docs/OfferResponseAllocation.md @@ -0,0 +1,22 @@ + + +# OfferResponseAllocation + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**domain** | [**DomainEnum**](#DomainEnum) | Which offer domain this response belongs to. Selects the shape of `response`. | | +|**response** | [**AllocationResponse**](AllocationResponse.md) | | | + + + +## Enum: DomainEnum + +| Name | Value | +|---- | -----| +| ALLOCATIONS | "ALLOCATIONS" | + + + diff --git a/docs/OfferResponseOnboarding.md b/docs/OfferResponseOnboarding.md new file mode 100644 index 00000000..2d24e736 --- /dev/null +++ b/docs/OfferResponseOnboarding.md @@ -0,0 +1,22 @@ + + +# OfferResponseOnboarding + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**domain** | [**DomainEnum**](#DomainEnum) | Which offer domain this response belongs to. Selects the shape of `response`. | | +|**response** | [**OnboardingResponse**](OnboardingResponse.md) | | | + + + +## Enum: DomainEnum + +| Name | Value | +|---- | -----| +| ONBOARDING | "ONBOARDING" | + + + diff --git a/docs/OfferResponseTransfer.md b/docs/OfferResponseTransfer.md new file mode 100644 index 00000000..e65f3398 --- /dev/null +++ b/docs/OfferResponseTransfer.md @@ -0,0 +1,22 @@ + + +# OfferResponseTransfer + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**domain** | [**DomainEnum**](#DomainEnum) | Which offer domain this response belongs to. Selects the shape of `response`. | | +|**response** | [**TransferResponse**](TransferResponse.md) | | | + + + +## Enum: DomainEnum + +| Name | Value | +|---- | -----| +| TRANSFERS | "TRANSFERS" | + + + diff --git a/docs/OnboardingResponse.md b/docs/OnboardingResponse.md new file mode 100644 index 00000000..d047dec2 --- /dev/null +++ b/docs/OnboardingResponse.md @@ -0,0 +1,55 @@ + + +# OnboardingResponse + +## oneOf schemas +* [OnboardingResponseDtccAccept](OnboardingResponseDtccAccept.md) +* [OnboardingResponseDtccReject](OnboardingResponseDtccReject.md) +* [OnboardingResponseTradewebAccept](OnboardingResponseTradewebAccept.md) +* [OnboardingResponseTradewebReject](OnboardingResponseTradewebReject.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.OnboardingResponse; +import com.fireblocks.sdk.model.OnboardingResponseDtccAccept; +import com.fireblocks.sdk.model.OnboardingResponseDtccReject; +import com.fireblocks.sdk.model.OnboardingResponseTradewebAccept; +import com.fireblocks.sdk.model.OnboardingResponseTradewebReject; + +public class Example { + public static void main(String[] args) { + OnboardingResponse exampleOnboardingResponse = new OnboardingResponse(); + + // create a new OnboardingResponseDtccAccept + OnboardingResponseDtccAccept exampleOnboardingResponseDtccAccept = new OnboardingResponseDtccAccept(); + // set OnboardingResponse to OnboardingResponseDtccAccept + exampleOnboardingResponse.setActualInstance(exampleOnboardingResponseDtccAccept); + // to get back the OnboardingResponseDtccAccept set earlier + OnboardingResponseDtccAccept testOnboardingResponseDtccAccept = (OnboardingResponseDtccAccept) exampleOnboardingResponse.getActualInstance(); + + // create a new OnboardingResponseDtccReject + OnboardingResponseDtccReject exampleOnboardingResponseDtccReject = new OnboardingResponseDtccReject(); + // set OnboardingResponse to OnboardingResponseDtccReject + exampleOnboardingResponse.setActualInstance(exampleOnboardingResponseDtccReject); + // to get back the OnboardingResponseDtccReject set earlier + OnboardingResponseDtccReject testOnboardingResponseDtccReject = (OnboardingResponseDtccReject) exampleOnboardingResponse.getActualInstance(); + + // create a new OnboardingResponseTradewebAccept + OnboardingResponseTradewebAccept exampleOnboardingResponseTradewebAccept = new OnboardingResponseTradewebAccept(); + // set OnboardingResponse to OnboardingResponseTradewebAccept + exampleOnboardingResponse.setActualInstance(exampleOnboardingResponseTradewebAccept); + // to get back the OnboardingResponseTradewebAccept set earlier + OnboardingResponseTradewebAccept testOnboardingResponseTradewebAccept = (OnboardingResponseTradewebAccept) exampleOnboardingResponse.getActualInstance(); + + // create a new OnboardingResponseTradewebReject + OnboardingResponseTradewebReject exampleOnboardingResponseTradewebReject = new OnboardingResponseTradewebReject(); + // set OnboardingResponse to OnboardingResponseTradewebReject + exampleOnboardingResponse.setActualInstance(exampleOnboardingResponseTradewebReject); + // to get back the OnboardingResponseTradewebReject set earlier + OnboardingResponseTradewebReject testOnboardingResponseTradewebReject = (OnboardingResponseTradewebReject) exampleOnboardingResponse.getActualInstance(); + } +} +``` + + diff --git a/docs/OnboardingResponseDtccAccept.md b/docs/OnboardingResponseDtccAccept.md new file mode 100644 index 00000000..66ad203f --- /dev/null +++ b/docs/OnboardingResponseDtccAccept.md @@ -0,0 +1,22 @@ + + +# OnboardingResponseDtccAccept + +Accept a DTCC end-investor onboarding offer. Carries no arguments. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responseType** | [**ResponseTypeEnum**](#ResponseTypeEnum) | How you are answering the offer. Must be one of the values currently listed in the transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`. | | + + + +## Enum: ResponseTypeEnum + +| Name | Value | +|---- | -----| +| DTCC_END_INVESTOR_ONBOARDING_ACCEPT | "DTCC_END_INVESTOR_ONBOARDING_ACCEPT" | + + + diff --git a/docs/OnboardingResponseDtccReject.md b/docs/OnboardingResponseDtccReject.md new file mode 100644 index 00000000..6f095713 --- /dev/null +++ b/docs/OnboardingResponseDtccReject.md @@ -0,0 +1,23 @@ + + +# OnboardingResponseDtccReject + +Reject a DTCC end-investor onboarding offer. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responseType** | [**ResponseTypeEnum**](#ResponseTypeEnum) | How you are answering the offer. Must be one of the values currently listed in the transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`. | | +|**reason** | **String** | Why the offer is being rejected. Recorded on-chain, where the counterparty can read it. | | + + + +## Enum: ResponseTypeEnum + +| Name | Value | +|---- | -----| +| DTCC_END_INVESTOR_ONBOARDING_REJECT | "DTCC_END_INVESTOR_ONBOARDING_REJECT" | + + + diff --git a/docs/OnboardingResponseTradewebAccept.md b/docs/OnboardingResponseTradewebAccept.md new file mode 100644 index 00000000..e9ad851c --- /dev/null +++ b/docs/OnboardingResponseTradewebAccept.md @@ -0,0 +1,22 @@ + + +# OnboardingResponseTradewebAccept + +Accept a Tradeweb co-signing delegation offer. Carries no arguments. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responseType** | [**ResponseTypeEnum**](#ResponseTypeEnum) | How you are answering the offer. Must be one of the values currently listed in the transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`. | | + + + +## Enum: ResponseTypeEnum + +| Name | Value | +|---- | -----| +| TRADEWEB_COSIGNING_DELEGATION_ACCEPT | "TRADEWEB_COSIGNING_DELEGATION_ACCEPT" | + + + diff --git a/docs/OnboardingResponseTradewebReject.md b/docs/OnboardingResponseTradewebReject.md new file mode 100644 index 00000000..4fca5e42 --- /dev/null +++ b/docs/OnboardingResponseTradewebReject.md @@ -0,0 +1,22 @@ + + +# OnboardingResponseTradewebReject + +Reject a Tradeweb co-signing delegation offer. Carries no arguments — the DAR has nowhere on-ledger to record a reason, so none is accepted. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responseType** | [**ResponseTypeEnum**](#ResponseTypeEnum) | How you are answering the offer. Must be one of the values currently listed in the transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`. | | + + + +## Enum: ResponseTypeEnum + +| Name | Value | +|---- | -----| +| TRADEWEB_COSIGNING_DELEGATION_REJECT | "TRADEWEB_COSIGNING_DELEGATION_REJECT" | + + + diff --git a/docs/OrderDetails.md b/docs/OrderDetails.md index fa624faf..f981ab3d 100644 --- a/docs/OrderDetails.md +++ b/docs/OrderDetails.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**id** | **String** | | | -|**via** | [**AccessType**](AccessType.md) | | | +|**via** | [**AccessTypeResponse**](AccessTypeResponse.md) | | | |**status** | **OrderStatus** | | | |**createdAt** | **OffsetDateTime** | | | |**updatedAt** | **OffsetDateTime** | | [optional] | diff --git a/docs/OrderSummary.md b/docs/OrderSummary.md index ceb96f45..5db6dc68 100644 --- a/docs/OrderSummary.md +++ b/docs/OrderSummary.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**id** | **String** | | | -|**via** | [**AccessType**](AccessType.md) | | | +|**via** | [**AccessTypeResponse**](AccessTypeResponse.md) | | | |**side** | **Side** | | | |**baseAmount** | **String** | | | |**quoteAmount** | **String** | | [optional] | diff --git a/docs/ParticipantOnboardingPayload.md b/docs/ParticipantOnboardingPayload.md new file mode 100644 index 00000000..fc737fcd --- /dev/null +++ b/docs/ParticipantOnboardingPayload.md @@ -0,0 +1,29 @@ + + +# ParticipantOnboardingPayload + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vaultAccountId** | **String** | The vault account that acts as the participant. Its Canton party is derived for you. | | +|**asset** | [**AssetEnum**](#AssetEnum) | Chain asset — CANTON or CANTON_TEST. | | +|**expiresAt** | **OffsetDateTime** | When the onboarding request expires if it has not been answered. RFC 3339. | [optional] | +|**operator** | **String** | DTCC infra operator party id. | | +|**provider** | **String** | DTCC provider party id. | | +|**compliance** | **String** | DTCC compliance party id. | | +|**registrar** | **String** | DTCC registrar party id — co-signs the accept. | | +|**clientOnboarder** | **String** | DTCC client onboarder party id — co-signs the accept. | | + + + +## Enum: AssetEnum + +| Name | Value | +|---- | -----| +| CANTON | "CANTON" | +| CANTON_TEST | "CANTON_TEST" | + + + diff --git a/docs/PositionRelatedTransaction.md b/docs/PositionRelatedTransaction.md index 47c7a69d..828dd08f 100644 --- a/docs/PositionRelatedTransaction.md +++ b/docs/PositionRelatedTransaction.md @@ -14,6 +14,7 @@ |**status** | [**StatusEnum**](#StatusEnum) | Transaction outcome. | | |**amount** | **String** | Portion of position amount this transaction moved (native units). Absent on legacy rows. | [optional] | |**txNote** | **String** | User-provided note from the transfer request. Omitted when not set. | [optional] | +|**completionTime** | **OffsetDateTime** | ISO timestamp when Cosmos unbonding is scheduled to end. Absent on other chains. | [optional] | diff --git a/docs/QuorumApprovalState.md b/docs/QuorumApprovalState.md new file mode 100644 index 00000000..91ccadb1 --- /dev/null +++ b/docs/QuorumApprovalState.md @@ -0,0 +1,13 @@ + + +# QuorumApprovalState + +## Enum + + +* `APPROVED` (value: `"APPROVED"`) + +* `PENDING` (value: `"PENDING"`) + + + diff --git a/docs/QuorumGroup.md b/docs/QuorumGroup.md new file mode 100644 index 00000000..819d7c23 --- /dev/null +++ b/docs/QuorumGroup.md @@ -0,0 +1,17 @@ + + +# QuorumGroup + +A single tier of a ruleset: a threshold and the approvals collected toward it. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**threshold** | **Integer** | Number of approvals this tier requires. | | +|**currentApprovalCount** | **Integer** | Approvals collected so far toward `threshold`. | | +|**status** | **QuorumApprovalState** | | | +|**members** | **List<Integer>** | Indexes into the top-level `users` array identifying the users who belong to this tier. Returned only for `quorumStatusMode=FULL`; omitted otherwise. | [optional] | + + + diff --git a/docs/QuorumRequestState.md b/docs/QuorumRequestState.md new file mode 100644 index 00000000..2edbd2ef --- /dev/null +++ b/docs/QuorumRequestState.md @@ -0,0 +1,21 @@ + + +# QuorumRequestState + +## Enum + + +* `PENDING` (value: `"PENDING"`) + +* `APPROVED` (value: `"APPROVED"`) + +* `REJECTED` (value: `"REJECTED"`) + +* `CANCELLED` (value: `"CANCELLED"`) + +* `TIMED_OUT` (value: `"TIMED_OUT"`) + +* `FAILED` (value: `"FAILED"`) + + + diff --git a/docs/QuorumRuleset.md b/docs/QuorumRuleset.md new file mode 100644 index 00000000..9f614968 --- /dev/null +++ b/docs/QuorumRuleset.md @@ -0,0 +1,25 @@ + + +# QuorumRuleset + +One sub-request of the approval criteria, made up of one or more tiers. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**groupMatch** | [**GroupMatchEnum**](#GroupMatchEnum) | Whether every tier in `groups` must be satisfied (`ALL`) or any single one of them (`ANY`). | | +|**status** | **QuorumApprovalState** | | | +|**groups** | [**List<QuorumGroup>**](QuorumGroup.md) | The tiers of this sub-request, evaluated according to `groupMatch`. | | + + + +## Enum: GroupMatchEnum + +| Name | Value | +|---- | -----| +| ALL | "ALL" | +| ANY | "ANY" | + + + diff --git a/docs/QuorumStatus.md b/docs/QuorumStatus.md new file mode 100644 index 00000000..9d3e50ef --- /dev/null +++ b/docs/QuorumStatus.md @@ -0,0 +1,16 @@ + + +# QuorumStatus + +The approval quorum's structure and progress for this request. `null` when `quorumStatusMode` is omitted or `NONE`. Also `null` on an otherwise successful response when the quorum cannot be reported faithfully — a multi-tier request in a workspace that does not maintain per-tier approval counts — so absence here does not imply the request has no quorum. The object may carry additional backend-defined fields beyond those documented. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requestStatus** | **QuorumRequestState** | | | +|**users** | [**List<QuorumUser>**](QuorumUser.md) | Every user participating in this request's quorum. Returned only for `quorumStatusMode=FULL`; omitted otherwise. | [optional] | +|**quorum** | [**QuorumStatusQuorum**](QuorumStatusQuorum.md) | | | + + + diff --git a/docs/QuorumStatusQuorum.md b/docs/QuorumStatusQuorum.md new file mode 100644 index 00000000..fbd40dc1 --- /dev/null +++ b/docs/QuorumStatusQuorum.md @@ -0,0 +1,39 @@ + + +# QuorumStatusQuorum + +The approval criteria and how far they have been met. `type` discriminates the two shapes: `SIMPLE` flattens the common single-tier case, `RULESET` is the general multi-tier form. + +## oneOf schemas +* [RulesetQuorum](RulesetQuorum.md) +* [SimpleQuorum](SimpleQuorum.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.QuorumStatusQuorum; +import com.fireblocks.sdk.model.RulesetQuorum; +import com.fireblocks.sdk.model.SimpleQuorum; + +public class Example { + public static void main(String[] args) { + QuorumStatusQuorum exampleQuorumStatusQuorum = new QuorumStatusQuorum(); + + // create a new RulesetQuorum + RulesetQuorum exampleRulesetQuorum = new RulesetQuorum(); + // set QuorumStatusQuorum to RulesetQuorum + exampleQuorumStatusQuorum.setActualInstance(exampleRulesetQuorum); + // to get back the RulesetQuorum set earlier + RulesetQuorum testRulesetQuorum = (RulesetQuorum) exampleQuorumStatusQuorum.getActualInstance(); + + // create a new SimpleQuorum + SimpleQuorum exampleSimpleQuorum = new SimpleQuorum(); + // set QuorumStatusQuorum to SimpleQuorum + exampleQuorumStatusQuorum.setActualInstance(exampleSimpleQuorum); + // to get back the SimpleQuorum set earlier + SimpleQuorum testSimpleQuorum = (SimpleQuorum) exampleQuorumStatusQuorum.getActualInstance(); + } +} +``` + + diff --git a/docs/QuorumUser.md b/docs/QuorumUser.md new file mode 100644 index 00000000..c2cb0783 --- /dev/null +++ b/docs/QuorumUser.md @@ -0,0 +1,17 @@ + + +# QuorumUser + +A user who participates in this request's approval quorum, and their approval state. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**index** | **Integer** | Zero-based position of this user within the `users` array. The `members` arrays elsewhere in the document reference users by this index rather than repeating the user ID. | | +|**userId** | **String** | The participating user's ID. | | +|**status** | **QuorumApprovalState** | | | +|**isMandatoryOwner** | **Boolean** | Present and `true` only for the workspace owner, when this request additionally requires the owner's approval. Absent for every other participant. | [optional] | + + + diff --git a/docs/Quote.md b/docs/Quote.md index 8cca0bdf..aaba439d 100644 --- a/docs/Quote.md +++ b/docs/Quote.md @@ -8,7 +8,7 @@ A committed executable quote for a trading pair. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**via** | [**AccessType**](AccessType.md) | | | +|**via** | [**AccessTypeResponse**](AccessTypeResponse.md) | | | |**id** | **String** | The unique identifier of the quote. | | |**quoteAssetId** | **String** | The target asset identifier. | | |**quoteAssetRail** | **TransferRail** | | [optional] | diff --git a/docs/QuoteOffer.md b/docs/QuoteOffer.md index e7c0019a..810586e6 100644 --- a/docs/QuoteOffer.md +++ b/docs/QuoteOffer.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**via** | [**AccessType**](AccessType.md) | | | +|**via** | [**AccessTypeResponse**](AccessTypeResponse.md) | | | |**id** | **String** | The unique identifier of the quote. | | |**quoteAssetId** | **String** | The target asset identifier. | | |**quoteAssetRail** | **TransferRail** | | [optional] | diff --git a/docs/Rate.md b/docs/Rate.md index b7ce89f2..80cc8177 100644 --- a/docs/Rate.md +++ b/docs/Rate.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**via** | [**AccessType**](AccessType.md) | | | +|**via** | [**AccessTypeResponse**](AccessTypeResponse.md) | | | |**baseAssetId** | **String** | The source asset identifier | | |**baseAssetRail** | **TransferRail** | | [optional] | |**quoteAssetId** | **String** | The target asset identifier | | diff --git a/docs/RateOffer.md b/docs/RateOffer.md index e8850506..7ce19a96 100644 --- a/docs/RateOffer.md +++ b/docs/RateOffer.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**via** | [**AccessType**](AccessType.md) | | | +|**via** | [**AccessTypeResponse**](AccessTypeResponse.md) | | | |**baseAssetId** | **String** | The source asset identifier | | |**baseAssetRail** | **TransferRail** | | [optional] | |**quoteAssetId** | **String** | The target asset identifier | | diff --git a/docs/RulesetQuorum.md b/docs/RulesetQuorum.md new file mode 100644 index 00000000..d4c57f89 --- /dev/null +++ b/docs/RulesetQuorum.md @@ -0,0 +1,35 @@ + + +# RulesetQuorum + +The general shape, used when the request has more than one sub-request or a sub-request with more than one tier. Each entry in `rulesets` is a sub-request; each of its `groups` is a tier. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Discriminator identifying the multi-tier shape. | | +|**rulesetMatch** | [**RulesetMatchEnum**](#RulesetMatchEnum) | Whether every sub-request in `rulesets` must be satisfied (`ALL`) or any single one of them (`ANY`). | | +|**status** | **QuorumApprovalState** | | | +|**isMandatoryOwnerApproved** | **Boolean** | Present only when this request additionally requires the workspace owner's approval. `false` means the owner has not approved yet. Absent when no owner approval is required. | [optional] | +|**rulesets** | [**List<QuorumRuleset>**](QuorumRuleset.md) | The sub-requests of the approval criteria, evaluated according to `rulesetMatch`. | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| RULESET | "RULESET" | + + + +## Enum: RulesetMatchEnum + +| Name | Value | +|---- | -----| +| ALL | "ALL" | +| ANY | "ANY" | + + + diff --git a/docs/SecurityFindingDetailed.md b/docs/SecurityFindingDetailed.md index 9fa4b23e..fafa66d4 100644 --- a/docs/SecurityFindingDetailed.md +++ b/docs/SecurityFindingDetailed.md @@ -2,7 +2,6 @@ # SecurityFindingDetailed -A single FSPM finding, redacted to the public field set ## Properties diff --git a/docs/SecurityPostureManagementApi.md b/docs/SecurityPostureManagementApi.md index 07f6681a..3cd7d872 100644 --- a/docs/SecurityPostureManagementApi.md +++ b/docs/SecurityPostureManagementApi.md @@ -16,7 +16,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ 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. +Returns a single FSPM security finding for the workspace, redacted to the public field set. Endpoint Roles: Security Admin, Security Auditor. **Note:** This endpoint is available only for the FSPM Pro package. It is not available for FSPM Basic. ### Example @@ -93,7 +93,7 @@ No authorization required Get FSPM security findings -Returns a paginated list of FSPM security findings for the workspace. Endpoint Roles: Security Admin, Security Auditor. +Returns a paginated list of FSPM security findings for the workspace. Endpoint Roles: Security Admin, Security Auditor. **Note:** This endpoint is available only for the FSPM Pro package. It is not available for FSPM Basic. ### Example @@ -183,7 +183,7 @@ No authorization required 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. +Accepts or reopens a finding for the workspace. When accepting a finding (`status: \"ACCEPTED\"`), `statusUpdatedReason` is required. Endpoint Roles: Security Admin. **Note:** This endpoint is available only for the FSPM Pro package. It is not available for FSPM Basic. ### Example diff --git a/docs/SimpleQuorum.md b/docs/SimpleQuorum.md new file mode 100644 index 00000000..b2d0ca28 --- /dev/null +++ b/docs/SimpleQuorum.md @@ -0,0 +1,27 @@ + + +# SimpleQuorum + +The flattened shape used when the request has a single sub-request with a single tier, which is the common case. The threshold and approval count sit directly on the quorum object instead of inside `rulesets`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Discriminator identifying the flattened single-tier shape. | | +|**threshold** | **Integer** | Number of approvals this request requires. | | +|**currentApprovalCount** | **Integer** | Approvals collected so far toward `threshold`. | | +|**status** | **QuorumApprovalState** | | | +|**isMandatoryOwnerApproved** | **Boolean** | Present only when this request additionally requires the workspace owner's approval. `false` means the owner has not approved yet, which is why `status` can remain `PENDING` even once `currentApprovalCount` reaches `threshold`. Absent when no owner approval is required. | [optional] | +|**members** | **List<Integer>** | Indexes into the top-level `users` array identifying the users who may approve. Returned only for `quorumStatusMode=FULL`; omitted otherwise. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| SIMPLE | "SIMPLE" | + + + diff --git a/docs/TransactionRequest.md b/docs/TransactionRequest.md index cc0926a7..efa9e226 100644 --- a/docs/TransactionRequest.md +++ b/docs/TransactionRequest.md @@ -17,7 +17,7 @@ |**destinations** | [**List<TransactionRequestDestination>**](TransactionRequestDestination.md) | For UTXO based blockchains, you can send a single transaction to multiple destinations. | [optional] | |**amount** | [**TransactionRequestAmount**](TransactionRequestAmount.md) | | [optional] | |**treatAsGrossAmount** | **Boolean** | \"When set to `true`, the fee will be deducted from the requested amount.\" **Note**: This parameter can only be considered if a transaction’s asset is a base asset, such as ETH or MATIC. If the asset can’t be used for transaction fees, like USDC, this parameter is ignored and the fee is deducted from the relevant base asset wallet in the source account. | [optional] | -|**forceSweep** | **Boolean** | For Polkadot, Kusama and Westend transactions only. When set to true, Fireblocks will empty the asset wallet. **Note:** If set to true when the source account is exactly 1 DOT, the transaction will fail. Any amount more or less than 1 DOT succeeds. This is a Polkadot blockchain limitation. | [optional] | +|**forceSweep** | **Boolean** | For Polkadot, Kusama and Westend transactions only. When set to true, Fireblocks will empty the asset wallet. **Note:** If set to true when the source account is exactly 1 DOT, the transaction will fail. Any amount more or less than 1 DOT succeeds. This is a Polkadot blockchain limitation. **Note:** `forceSweep` and `treatAsGrossAmount` can also be used to empty a TON/GRAM wallet. | [optional] | |**feeLevel** | [**FeeLevelEnum**](#FeeLevelEnum) | For UTXO, EVM-based, or Solana blockchains only. Defines the blockchain fee level which will be payed for the transaction. Alternatively, specific fee estimation parameters exist below. | [optional] | |**fee** | [**TransactionRequestFee**](TransactionRequestFee.md) | | [optional] | |**priorityFee** | [**TransactionRequestPriorityFee**](TransactionRequestPriorityFee.md) | | [optional] | diff --git a/docs/TransactionResponse.md b/docs/TransactionResponse.md index b2cd9f6f..9e2e6d10 100644 --- a/docs/TransactionResponse.md +++ b/docs/TransactionResponse.md @@ -30,6 +30,7 @@ |**treatAsGrossAmount** | **Boolean** | For transactions initiated via this Fireblocks workspace, when set to `true`, the fee is deducted from the requested amount. **Note**: This parameter can only be considered if a transaction's asset is a base asset, such as ETH or MATIC. If the asset can't be used for transaction fees, like USDC, this parameter is ignored and the fee is deducted from the relevant base asset wallet in the source account. | [optional] | |**feeInfo** | [**FeeInfo**](FeeInfo.md) | | [optional] | |**feeCurrency** | **String** | The asset which was withdrawn to pay the transaction fee, for example ETH for EVM-based blockchains, BTC for Tether Omni. | [optional] | +|**requestedFeeCurrency** | **String** | The fee-paying asset requested at transaction creation via the `feeCurrency` field, if any. | [optional] | |**networkRecords** | [**List<NetworkRecord>**](NetworkRecord.md) | In case a single transaction resulted with multiple transfers, for example a result of a contract call, then this parameter specifies each transfer that took place on the blockchain. In case of a single transfer transaction, this parameter is empty. | [optional] | |**createdAt** | **BigDecimal** | The transaction’s creation date and time, in unix timestamp. | [optional] | |**lastUpdated** | **BigDecimal** | The transaction’s last update date and time, in unix timestamp. | [optional] | diff --git a/docs/TransferResponse.md b/docs/TransferResponse.md new file mode 100644 index 00000000..212a8d04 --- /dev/null +++ b/docs/TransferResponse.md @@ -0,0 +1,37 @@ + + +# TransferResponse + +## oneOf schemas +* [TransferResponseAccept](TransferResponseAccept.md) +* [TransferResponseReject](TransferResponseReject.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.TransferResponse; +import com.fireblocks.sdk.model.TransferResponseAccept; +import com.fireblocks.sdk.model.TransferResponseReject; + +public class Example { + public static void main(String[] args) { + TransferResponse exampleTransferResponse = new TransferResponse(); + + // create a new TransferResponseAccept + TransferResponseAccept exampleTransferResponseAccept = new TransferResponseAccept(); + // set TransferResponse to TransferResponseAccept + exampleTransferResponse.setActualInstance(exampleTransferResponseAccept); + // to get back the TransferResponseAccept set earlier + TransferResponseAccept testTransferResponseAccept = (TransferResponseAccept) exampleTransferResponse.getActualInstance(); + + // create a new TransferResponseReject + TransferResponseReject exampleTransferResponseReject = new TransferResponseReject(); + // set TransferResponse to TransferResponseReject + exampleTransferResponse.setActualInstance(exampleTransferResponseReject); + // to get back the TransferResponseReject set earlier + TransferResponseReject testTransferResponseReject = (TransferResponseReject) exampleTransferResponse.getActualInstance(); + } +} +``` + + diff --git a/docs/TransferResponseAccept.md b/docs/TransferResponseAccept.md new file mode 100644 index 00000000..54a2f252 --- /dev/null +++ b/docs/TransferResponseAccept.md @@ -0,0 +1,22 @@ + + +# TransferResponseAccept + +Accept an inbound 2-step transfer offer. Carries no arguments. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responseType** | [**ResponseTypeEnum**](#ResponseTypeEnum) | How you are answering the transfer offer. | | + + + +## Enum: ResponseTypeEnum + +| Name | Value | +|---- | -----| +| TRANSFER_ACCEPT | "TRANSFER_ACCEPT" | + + + diff --git a/docs/TransferResponseReject.md b/docs/TransferResponseReject.md new file mode 100644 index 00000000..acdb0c8c --- /dev/null +++ b/docs/TransferResponseReject.md @@ -0,0 +1,22 @@ + + +# TransferResponseReject + +Reject an inbound 2-step transfer offer. Carries no arguments. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responseType** | [**ResponseTypeEnum**](#ResponseTypeEnum) | How you are answering the transfer offer. | | + + + +## Enum: ResponseTypeEnum + +| Name | Value | +|---- | -----| +| TRANSFER_REJECT | "TRANSFER_REJECT" | + + + diff --git a/docs/TransferWithdrawPayload.md b/docs/TransferWithdrawPayload.md new file mode 100644 index 00000000..3aa527f1 --- /dev/null +++ b/docs/TransferWithdrawPayload.md @@ -0,0 +1,24 @@ + + +# TransferWithdrawPayload + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vaultAccountId** | **String** | The vault account whose Canton wallet acts here. | | +|**asset** | [**AssetEnum**](#AssetEnum) | Chain asset — `CANTON` or `CANTON_TEST`. | | +|**offerTransactionId** | **String** | The Fireblocks transaction id of the OUTGOING transfer offer being withdrawn. | | + + + +## Enum: AssetEnum + +| Name | Value | +|---- | -----| +| CANTON | "CANTON" | +| CANTON_TEST | "CANTON_TEST" | + + + diff --git a/docs/UpdateWebhookOAuthRequest.md b/docs/UpdateWebhookOAuthRequest.md new file mode 100644 index 00000000..05517864 --- /dev/null +++ b/docs/UpdateWebhookOAuthRequest.md @@ -0,0 +1,22 @@ + + +# UpdateWebhookOAuthRequest + +A partial update. Every field is optional and an omitted field is left as it is, so `{ \"clientSecret\": \"new-secret\" }` rotates the secret and changes nothing else. A rotation applies to every webhook referencing these credentials. The three custom maps merge: a key with a value is upserted, a key with `null` is deleted, a key you leave out is untouched. Because `null` inside a map means delete, none of the three is nullable as a whole — `customJwtClaims: null` and friends are rejected with a `400`. Clear a map by naming each key with a `null` value. `mtlsClientSignedCert` is a scalar, so `null` there does remove it. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | A label for this credential set. Omit to leave it unchanged. | [optional] | +|**clientId** | **String** | OAuth client ID. Omit to leave it unchanged. | [optional] | +|**clientSecret** | **String** | A new OAuth client secret. Limited to 480 bytes when UTF-8 encoded, so a secret using non-ASCII characters fits fewer than 480 of them. Write-only — never returned in any response. Send this on its own to rotate the secret without changing anything else. Omit to leave it unchanged. | [optional] | +|**url** | **String** | Token endpoint URL. HTTPS on port 443 only, and the host must resolve publicly. Omit to leave it unchanged. | [optional] | +|**authMethod** | **String** | `client_secret_basic`, `client_secret_post` or `client_secret_jwt`. Omit to leave it unchanged — it does not revert to the default. | [optional] | +|**customJwtClaims** | **Map<String, Object>** | A delta applied to the JWT assertion claims. A claim with a value is added or replaced, a claim with `null` is deleted, and a claim you leave out is untouched. So `{ \"aud\": \"https://auth.example.com\", \"resource\": null }` sets `aud`, drops `resource`, and changes nothing else. Send `customJwtClaims: null` to clear every claim in one call. That does not collide with a `null` value on a name: one names the claim to delete, the other names the whole field. Same rules as on create: any JSON type except `null`, `iss`/`sub`/`jti`/`iat`/`exp` reserved, names case-sensitive, resulting set under 16 KB, values write-only. | [optional] | +|**customBodyParams** | **Map<String, String>** | A delta applied to the token request body parameters. A parameter with a value is added or replaced, a parameter with `null` is deleted, and one you leave out is untouched. So `{ \"scope\": \"payments.read\", \"audience\": null }` sets `scope`, drops `audience`, and changes nothing else. Send `customBodyParams: null` to clear every parameter in one call. That does not collide with a `null` value on a name: one names the parameter to delete, the other names the whole field. Same rules as on create: string values only, `grant_type`/`client_id`/`client_secret`/ `client_assertion`/`client_assertion_type` reserved, names case-sensitive, resulting set under 16 KB, values write-only. | [optional] | +|**customHeaders** | **Map<String, String>** | A delta applied to the token request headers — not the webhook delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. So `{ \"X-Api-Key\": \"new-key\", \"X-Tenant\": null }` rotates `X-Api-Key`, drops `X-Tenant`, and changes nothing else. Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. Names are case-insensitive, so a `null` under one casing deletes a header stored under another, and names are stored and returned lowercased. Same rules as on create: string values only, `Content-Type`/`Authorization`/ `Content-Length`/`Host` reserved, resulting set under 16 KB, values write-only. | [optional] | +|**mtlsClientSignedCert** | **String** | PEM-encoded client certificate for mTLS. Must be a valid X.509 certificate inside its validity window. Omit to leave it unchanged, or send `null` to remove it. | [optional] | + + + diff --git a/docs/UpdateWebhookRequest.md b/docs/UpdateWebhookRequest.md index 975995b2..b875b680 100644 --- a/docs/UpdateWebhookRequest.md +++ b/docs/UpdateWebhookRequest.md @@ -13,7 +13,7 @@ |**enabled** | **Boolean** | The status of the webhook | [optional] | |**mtls** | [**WebhookMtls**](WebhookMtls.md) | | [optional] | |**oauth** | [**WebhookOAuth**](WebhookOAuth.md) | | [optional] | -|**customHeaders** | **Map<String, String>** | Custom headers delta: entries with a string value are added or updated, entries with a `null` value delete that header (no-op if absent), and header names omitted from the payload are left untouched. The resulting set is limited to 10 headers. Header names are case-insensitive, up to 128 characters, and limited to valid HTTP header name characters. Some system header names are reserved and cannot be used. Values are write-only — never returned in responses. | [optional] | +|**customHeaders** | **Map<String, Object>** | A delta applied to the delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. A value replaces what is stored under that name rather than adding to it, so an array is the complete new set of lines for that header. Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. Names are case-insensitive, so a `null` under one casing deletes a header stored under another. Same rules as on create: string or non-empty array, `Cookie` string-only, 10 lines total in the resulting set, the same reserved names, and values write-only. Entries set to `null` do not count towards the limit. | [optional] | diff --git a/docs/UtxoOutput.md b/docs/UtxoOutput.md index 6b1950d2..a9555ed2 100644 --- a/docs/UtxoOutput.md +++ b/docs/UtxoOutput.md @@ -22,6 +22,7 @@ |**createdAt** | **OffsetDateTime** | The timestamp when this UTXO was created | [optional] | |**updatedAt** | **OffsetDateTime** | The timestamp when this UTXO was last updated | [optional] | |**labels** | **List<String>** | Labels attached to this UTXO | [optional] | +|**hasNativeAssets** | **Boolean** | Whether this UTXO carries Cardano native assets (tokens) | [optional] | diff --git a/docs/VaultsApi.md b/docs/VaultsApi.md index 5f54081d..97aa1182 100644 --- a/docs/VaultsApi.md +++ b/docs/VaultsApi.md @@ -51,7 +51,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ Activate a wallet in a vault account -Initiates activation for a wallet in a vault account. Activation is required for tokens that need an on-chain transaction for creation (XLM tokens, SOL tokens etc). Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. +Initiates activation for a wallet in a vault account. Activation is required for tokens that need an on-chain transaction for creation. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. ### Example diff --git a/docs/WebhookEvent.md b/docs/WebhookEvent.md index 1e20a852..f1a80666 100644 --- a/docs/WebhookEvent.md +++ b/docs/WebhookEvent.md @@ -13,6 +13,8 @@ * `TRANSACTION_NETWORK_RECORDS_PROCESSING_COMPLETED` (value: `"transaction.network_records.processing_completed"`) +* `TRANSACTION_ALERT_STUCK` (value: `"transaction.alert.stuck"`) + * `EXTERNAL_WALLET_ASSET_ADDED` (value: `"external_wallet.asset.added"`) * `EXTERNAL_WALLET_ASSET_REMOVED` (value: `"external_wallet.asset.removed"`) @@ -33,6 +35,14 @@ * `VAULT_ACCOUNT_NFT_BALANCE_UPDATED` (value: `"vault_account.nft.balance_updated"`) +* `VAULT_ACCOUNT_BULK_CREATE_JOB_STARTED` (value: `"vault_account.bulk_create_job_started"`) + +* `VAULT_ACCOUNT_BULK_CREATE_JOB_ENDED` (value: `"vault_account.bulk_create_job_ended"`) + +* `VAULT_ACCOUNT_ASSET_BULK_ADD_JOB_STARTED` (value: `"vault_account.asset.bulk_add_job_started"`) + +* `VAULT_ACCOUNT_ASSET_BULK_ADD_JOB_ENDED` (value: `"vault_account.asset.bulk_add_job_ended"`) + * `EMBEDDED_WALLET_STATUS_UPDATED` (value: `"embedded_wallet.status.updated"`) * `EMBEDDED_WALLET_CREATED` (value: `"embedded_wallet.created"`) diff --git a/docs/WebhookOAuthCredentials.md b/docs/WebhookOAuthCredentials.md new file mode 100644 index 00000000..ec7729f8 --- /dev/null +++ b/docs/WebhookOAuthCredentials.md @@ -0,0 +1,24 @@ + + +# WebhookOAuthCredentials + +A stored OAuth 2.0 client credential set, referenced by webhooks through their `webhookOauthId`. When a webhook references one, the dispatcher fetches a bearer token from `url` before each delivery and attaches it as `Authorization: Bearer {token}`. Secret material is never returned: `clientSecret` is absent from this schema entirely, and the `customJwtClaims`, `customBodyParams` and `customHeaders` fields are reduced to their names, without the configured values. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **UUID** | The id of the OAuth credentials. Pass this as a webhook's `webhookOauthId` to attach them. | | +|**name** | **String** | The label given to this credential set. | | +|**clientId** | **String** | OAuth client ID used to authenticate with the token endpoint. | | +|**url** | **String** | Token endpoint URL. | | +|**authMethod** | **String** | How the client credentials are presented to the token endpoint: `client_secret_basic`, `client_secret_post` or `client_secret_jwt`. Credentials created without this field report `client_secret_basic`, which is what they use. | | +|**customJwtClaims** | **List<String>** | Names of the additional claims placed in the JWT assertion. Claim values are write-only and are never returned. Absent when no custom claims are configured. | [optional] | +|**customBodyParams** | **List<String>** | Names of the additional parameters added to the token request body. Parameter values are write-only and are never returned. Absent when no custom parameters are configured. | [optional] | +|**customHeaders** | **List<String>** | Names of the additional HTTP headers added to **the token request sent to the authorization server** — not to the webhook delivery, which has its own separate `customHeaders`. Header values are write-only and are never returned. Absent when no custom headers are configured. | [optional] | +|**mtlsClientSignedCert** | **String** | PEM-encoded client certificate used for mTLS when fetching OAuth tokens. | [optional] | +|**createdAt** | **Long** | The date and time the OAuth credentials were created, in milliseconds. | | +|**updatedAt** | **Long** | The date and time the OAuth credentials were last updated, in milliseconds. | | + + + diff --git a/docs/WebhooksV2Api.md b/docs/WebhooksV2Api.md index f3a74f7f..d6e22ab4 100644 --- a/docs/WebhooksV2Api.md +++ b/docs/WebhooksV2Api.md @@ -5,7 +5,9 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**createWebhook**](WebhooksV2Api.md#createWebhook) | **POST** /webhooks | Create a new webhook | +| [**createWebhookOAuth**](WebhooksV2Api.md#createWebhookOAuth) | **POST** /webhooks_settings/oauth | Create OAuth credentials | | [**deleteWebhook**](WebhooksV2Api.md#deleteWebhook) | **DELETE** /webhooks/{webhookId} | Delete webhook | +| [**deleteWebhookOAuth**](WebhooksV2Api.md#deleteWebhookOAuth) | **DELETE** /webhooks_settings/oauth/{webhookOauthId} | Delete OAuth credentials | | [**getMetrics**](WebhooksV2Api.md#getMetrics) | **GET** /webhooks/{webhookId}/metrics/{metricName} | Get webhook metrics | | [**getMtlsCsr**](WebhooksV2Api.md#getMtlsCsr) | **GET** /webhooks/mtls/csr | Get mTLS CSR | | [**getNotification**](WebhooksV2Api.md#getNotification) | **GET** /webhooks/{webhookId}/notifications/{notificationId} | Get notification by id | @@ -14,12 +16,15 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | [**getResendByQueryJobStatus**](WebhooksV2Api.md#getResendByQueryJobStatus) | **GET** /webhooks/{webhookId}/notifications/resend_by_query/jobs/{jobId} | Get resend by query job status | | [**getResendJobStatus**](WebhooksV2Api.md#getResendJobStatus) | **GET** /webhooks/{webhookId}/notifications/resend_failed/jobs/{jobId} | Get resend job status | | [**getWebhook**](WebhooksV2Api.md#getWebhook) | **GET** /webhooks/{webhookId} | Get webhook by id | +| [**getWebhookOAuth**](WebhooksV2Api.md#getWebhookOAuth) | **GET** /webhooks_settings/oauth/{webhookOauthId} | Get OAuth credentials by id | +| [**getWebhookOAuths**](WebhooksV2Api.md#getWebhookOAuths) | **GET** /webhooks_settings/oauth | Get all OAuth credentials | | [**getWebhooks**](WebhooksV2Api.md#getWebhooks) | **GET** /webhooks | Get all webhooks | | [**resendFailedNotifications**](WebhooksV2Api.md#resendFailedNotifications) | **POST** /webhooks/{webhookId}/notifications/resend_failed | Resend failed notifications | | [**resendNotificationById**](WebhooksV2Api.md#resendNotificationById) | **POST** /webhooks/{webhookId}/notifications/{notificationId}/resend | Resend notification by id | | [**resendNotificationsByQuery**](WebhooksV2Api.md#resendNotificationsByQuery) | **POST** /webhooks/{webhookId}/notifications/resend_by_query | Resend notifications by query | | [**resendNotificationsByResourceId**](WebhooksV2Api.md#resendNotificationsByResourceId) | **POST** /webhooks/{webhookId}/notifications/resend_by_resource | Resend notifications by resource Id | | [**updateWebhook**](WebhooksV2Api.md#updateWebhook) | **PATCH** /webhooks/{webhookId} | Update webhook | +| [**updateWebhookOAuth**](WebhooksV2Api.md#updateWebhookOAuth) | **PATCH** /webhooks_settings/oauth/{webhookOauthId} | Update OAuth credentials | @@ -102,6 +107,85 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## createWebhookOAuth + +> CompletableFuture> createWebhookOAuth createWebhookOAuth(createWebhookOAuthRequest, idempotencyKey) + +Create OAuth credentials + +Creates a reusable OAuth client credential set. Attach it to a webhook by passing the returned id as that webhook's `webhookOauthId`. Several webhooks may share one credential set, so rotating its client secret covers all of them at once. The client secret is write-only and is never returned. **Endpoint Permissions:** Owner, Admin, Non-Signing 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.WebhooksV2Api; +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); + + CreateWebhookOAuthRequest createWebhookOAuthRequest = new CreateWebhookOAuthRequest(); // CreateWebhookOAuthRequest | + 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.webhooksV2().createWebhookOAuth(createWebhookOAuthRequest, 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 WebhooksV2Api#createWebhookOAuth"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **createWebhookOAuthRequest** | [**CreateWebhookOAuthRequest**](CreateWebhookOAuthRequest.md)| | | +| **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 | +|-------------|-------------|------------------| +| **201** | created the OAuth credentials successfully | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + ## deleteWebhook > CompletableFuture> deleteWebhook deleteWebhook(webhookId) @@ -179,6 +263,86 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## deleteWebhookOAuth + +> CompletableFuture> deleteWebhookOAuth deleteWebhookOAuth(webhookOauthId, forceDelete) + +Delete OAuth credentials + +Deletes an OAuth credential set. By default the delete is refused while the credentials are still in use: if any webhook references them, nothing is deleted and the request fails with `409 Conflict`, naming the reason and listing the ids of the referencing webhooks. This protects a shared credential set from being removed out from under the webhooks that depend on it, since several webhooks may reference the same one. Pass `forceDelete=true` to delete anyway. That detaches every referencing webhook — it clears each webhook's `webhookOauthId`, it does **not** delete the webhook — then deletes the credential set and returns the deleted resource together with `detachedWebhookIds`. The detached webhooks keep delivering notifications, but without an `Authorization` header, so their endpoints will see unauthenticated deliveries from that point on. When nothing references the credentials the delete succeeds either way, and `detachedWebhookIds` comes back empty. **Endpoint Permissions:** Owner, Admin, Non-Signing 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.WebhooksV2Api; +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 webhookOauthId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | The unique identifier of the OAuth credentials + Boolean forceDelete = false; // Boolean | Delete the credentials even while webhooks still reference them, detaching those webhooks instead of refusing. Leave it unset, or `false`, to get a `409 Conflict` whenever anything still references the credentials. + try { + CompletableFuture> response = fireblocks.webhooksV2().deleteWebhookOAuth(webhookOauthId, forceDelete); + 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 WebhooksV2Api#deleteWebhookOAuth"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **webhookOauthId** | **UUID**| The unique identifier of the OAuth credentials | | +| **forceDelete** | **Boolean**| Delete the credentials even while webhooks still reference them, detaching those webhooks instead of refusing. Leave it unset, or `false`, to get a `409 Conflict` whenever anything still references the credentials. | [optional] [default to false] | + +### 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** | The deleted OAuth credentials, plus the ids of any webhooks that were detached from them | * X-Request-ID -
| +| **409** | Webhooks still reference these credentials and `forceDelete` was not set. Nothing was deleted. The error message names the reason and the ids of the referencing webhooks — detach or delete those webhooks, or retry with `forceDelete=true`. | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + ## getMetrics > CompletableFuture> getMetrics getMetrics(webhookId, metricName) @@ -825,6 +989,156 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## getWebhookOAuth + +> CompletableFuture> getWebhookOAuth getWebhookOAuth(webhookOauthId) + +Get OAuth credentials by id + +Retrieve an OAuth credential set by its id. The client secret is never returned. + +### 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.WebhooksV2Api; +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 webhookOauthId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | The unique identifier of the OAuth credentials + try { + CompletableFuture> response = fireblocks.webhooksV2().getWebhookOAuth(webhookOauthId); + 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 WebhooksV2Api#getWebhookOAuth"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **webhookOauthId** | **UUID**| The unique identifier of the OAuth credentials | | + +### 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** | An OAuth credentials object | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## getWebhookOAuths + +> CompletableFuture>> getWebhookOAuths getWebhookOAuths() + +Get all OAuth credentials + +Lists every OAuth credential set for the workspace. Client secrets are never returned. + +### 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.WebhooksV2Api; +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); + + try { + CompletableFuture>> response = fireblocks.webhooksV2().getWebhookOAuths(); + 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 WebhooksV2Api#getWebhookOAuths"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### 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** | The workspace's OAuth credentials | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + ## getWebhooks > CompletableFuture> getWebhooks getWebhooks(order, pageCursor, pageSize) @@ -1308,3 +1622,82 @@ No authorization required | **200** | Updated webhook object | * X-Request-ID -
| | **0** | Error Response | * X-Request-ID -
| + +## updateWebhookOAuth + +> CompletableFuture> updateWebhookOAuth updateWebhookOAuth(updateWebhookOAuthRequest, webhookOauthId) + +Update OAuth credentials + +Updates only the fields present in the request; anything omitted is left as it is. Sending `clientSecret` on its own rotates the secret for every webhook using these credentials. `customJwtClaims`, `customBodyParams` and `customHeaders` are all merged key by key rather than replaced, the same way a webhook's own `customHeaders` behaves: a key sent with a value is added or overwritten, a key sent with a `null` value is deleted, and a key you omit is left alone. Since a `null` inside a map is the delete mechanism, none of the three accepts `null` for the whole field — `customJwtClaims: null`, `customBodyParams: null` or `customHeaders: null` is rejected with a `400` rather than ignored. Clear a map by listing each of its keys with a `null` value. Because `null` is spent on deletion, a claim cannot be set to JSON `null` either, on this endpoint or on create. `mtlsClientSignedCert` is a scalar rather than a map, so `null` there does remove it. **Endpoint Permissions:** Owner, Admin, Non-Signing 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.WebhooksV2Api; +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); + + UpdateWebhookOAuthRequest updateWebhookOAuthRequest = new UpdateWebhookOAuthRequest(); // UpdateWebhookOAuthRequest | + UUID webhookOauthId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | The unique identifier of the OAuth credentials + try { + CompletableFuture> response = fireblocks.webhooksV2().updateWebhookOAuth(updateWebhookOAuthRequest, webhookOauthId); + 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 WebhooksV2Api#updateWebhookOAuth"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **updateWebhookOAuthRequest** | [**UpdateWebhookOAuthRequest**](UpdateWebhookOAuthRequest.md)| | | +| **webhookOauthId** | **UUID**| The unique identifier of the OAuth credentials | | + +### 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** | Updated OAuth credentials object | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + diff --git a/pom.xml b/pom.xml index 8469c724..5c58d835 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 29.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 5620fef8..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 = "29.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/Fireblocks.java b/src/main/java/com/fireblocks/sdk/Fireblocks.java index 9b775eb2..1daaeb05 100644 --- a/src/main/java/com/fireblocks/sdk/Fireblocks.java +++ b/src/main/java/com/fireblocks/sdk/Fireblocks.java @@ -37,6 +37,7 @@ public class Fireblocks { private final String userAgent; private ApiUserApi apiUser; + private ApprovalsBetaApi approvalsBeta; private AuditLogsApi auditLogs; private BlockchainLinkBetaApi blockchainLinkBeta; private BlockchainsAssetsApi blockchainsAssets; @@ -236,6 +237,13 @@ public ApiUserApi apiUser() { return apiUser; } + public ApprovalsBetaApi approvalsBeta() { + if (approvalsBeta == null) { + approvalsBeta = new ApprovalsBetaApi(apiClient); + } + return approvalsBeta; + } + public AuditLogsApi auditLogs() { if (auditLogs == null) { auditLogs = new AuditLogsApi(apiClient); diff --git a/src/main/java/com/fireblocks/sdk/api/ApprovalsBetaApi.java b/src/main/java/com/fireblocks/sdk/api/ApprovalsBetaApi.java new file mode 100644 index 00000000..07676fa2 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/api/ApprovalsBetaApi.java @@ -0,0 +1,363 @@ +/* + * 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.api; + + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fireblocks.sdk.ApiClient; +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.ApprovalRequestItem; +import com.fireblocks.sdk.model.ListApprovalsResponse; +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.StringJoiner; +import java.util.concurrent.CancellationException; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; +import java.util.function.Consumer; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ApprovalsBetaApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public ApprovalsBetaApi() { + this(new ApiClient()); + } + + public ApprovalsBetaApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + private ApiException getApiException(String operationId, HttpResponse response) { + String message = + formatExceptionMessage(operationId, response.statusCode(), response.body()); + return new ApiException( + response.statusCode(), message, response.headers(), response.body()); + } + + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get a single approval request Retrieve full detail for a single approval request by ID, + * including the payload to sign and, when requested, the request's + * `quorumStatus`. Because this endpoint addresses one request, it accepts + * `quorumStatusMode=FULL`, which adds the participating approvers and their + * individual approval state. `userStatus` reflects the authenticated user by default. + * Pass `userId` to report it for another user instead. Endpoint Permission: Owner, + * Admin, Non-Signing Admin, Approver, Signer, Security Admin, Security Auditor. + * + * @param requestId The approval request ID. (required) + * @param userId Report `userStatus` for this user instead of the authenticated user. + * This selects whose approval state is returned; it does not change which requests can be + * fetched. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; + * other roles are rejected with 403. (optional) + * @param quorumStatusMode How much quorum detail to include in `quorumStatus`. + * `NONE` (the default) returns it as `null`. `SUMMARY` + * returns the approval thresholds, current counts and status. `FULL` adds + * `users` and the per-group `members` indexes identifying who may + * approve and who already has. Any other value is rejected with 400; the parameter is + * case-sensitive. (optional, default to NONE) + * @return CompletableFuture<ApiResponse<ApprovalRequestItem>>, which completes + * exceptionally with an {@link ApiException} if the API call fails + */ + public CompletableFuture> getApprovalById( + String requestId, String userId, String quorumStatusMode) { + try { + HttpRequest.Builder localVarRequestBuilder = + getApprovalByIdRequestBuilder(requestId, userId, quorumStatusMode); + 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("getApprovalById", 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< + ApprovalRequestItem>() {}))); + } 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 getApprovalByIdRequestBuilder( + String requestId, String userId, String quorumStatusMode) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("getApprovalById", "requestId", requestId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/approvals/{requestId}" + .replace("{requestId}", ApiClient.urlEncode(requestId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "userId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("userId", userId)); + localVarQueryParameterBaseName = "quorumStatusMode"; + localVarQueryParams.addAll( + ApiClient.parameterToPairs("quorumStatusMode", quorumStatusMode)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + 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; + } + /** + * List approval requests Retrieve the pending approval requests the authenticated API user is + * eligible to act on, including requests the user has already approved that are still pending + * overall. The response is scoped to the authenticated user by default. Pass `userId` + * to read another user's queue, or `includeAllUsers=true` to read every + * pending request in the workspace. Both require an Admin, Non-Signing Admin, Security Admin or + * Security Auditor role and are rejected with 403 otherwise. Set + * `quorumStatusMode=SUMMARY` to include each request's approval thresholds + * and counts. The per-approver breakdown is available only when fetching a single request — see + * `GET /approvals/{requestId}`. Endpoint Permission: Owner, Admin, Non-Signing Admin, + * Approver, Signer, Security Admin, Security Auditor. + * + * @param includeUserApproved When true, also include requests the authenticated user has + * already approved that are still pending overall. Defaults to false (only requests the + * user has not yet acted on). (optional) + * @param userId Return the pending requests for this user instead of the authenticated user. + * Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other + * roles are rejected with 403. Cannot be combined with + * `includeAllUsers=true` — sending both is rejected with 400. (optional) + * @param includeAllUsers When true, return every pending request in the workspace instead of a + * single user's queue. Defaults to false. Requires an Admin, Non-Signing Admin, + * Security Admin or Security Auditor role; other roles are rejected with 403. In this mode + * `userStatus` is always `USER_STATUS_NOT_APPLICABLE`, because the + * response is not scoped to one user, and `includeUserApproved` has no effect. + * Cannot be combined with `userId`. (optional, default to false) + * @param quorumStatusMode How much quorum detail to include in each request's + * `quorumStatus`. `NONE` (the default) returns it as `null`. + * `SUMMARY` returns the approval thresholds, current counts and status. + * `FULL` is rejected with 400 on this endpoint because the per-approver breakdown + * requires a single request — use `GET /approvals/{requestId}` for it. Any other + * value is rejected with 400; the parameter is case-sensitive. (optional, default to NONE) + * @param pageSize Number of results per page. Maximum 30. Defaults to 20. (optional, default to + * 20) + * @param pageCursor Cursor returned from the previous response (the `next` field) to + * fetch the next page. (optional) + * @return CompletableFuture<ApiResponse<ListApprovalsResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails + */ + public CompletableFuture> getApprovals( + Boolean includeUserApproved, + String userId, + Boolean includeAllUsers, + String quorumStatusMode, + Integer pageSize, + String pageCursor) { + try { + HttpRequest.Builder localVarRequestBuilder = + getApprovalsRequestBuilder( + includeUserApproved, + userId, + includeAllUsers, + quorumStatusMode, + pageSize, + pageCursor); + 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("getApprovals", 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< + ListApprovalsResponse>() {}))); + } 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 getApprovalsRequestBuilder( + Boolean includeUserApproved, + String userId, + Boolean includeAllUsers, + String quorumStatusMode, + Integer pageSize, + String pageCursor) + throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/approvals"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "includeUserApproved"; + localVarQueryParams.addAll( + ApiClient.parameterToPairs("includeUserApproved", includeUserApproved)); + localVarQueryParameterBaseName = "userId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("userId", userId)); + localVarQueryParameterBaseName = "includeAllUsers"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("includeAllUsers", includeAllUsers)); + localVarQueryParameterBaseName = "quorumStatusMode"; + localVarQueryParams.addAll( + ApiClient.parameterToPairs("quorumStatusMode", quorumStatusMode)); + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + 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; + } +} diff --git a/src/main/java/com/fireblocks/sdk/api/SecurityPostureManagementApi.java b/src/main/java/com/fireblocks/sdk/api/SecurityPostureManagementApi.java index 23f19489..ccc848b3 100644 --- a/src/main/java/com/fireblocks/sdk/api/SecurityPostureManagementApi.java +++ b/src/main/java/com/fireblocks/sdk/api/SecurityPostureManagementApi.java @@ -104,7 +104,8 @@ private String formatExceptionMessage(String operationId, int statusCode, String /** * 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. + * redacted to the public field set. Endpoint Roles: Security Admin, Security Auditor. **Note:** + * This endpoint is available only for the FSPM Pro package. It is not available for FSPM Basic. * * @param id Unique identifier of the finding (required) * @return CompletableFuture<ApiResponse<SecurityFindingDetailed>>, which completes @@ -179,7 +180,8 @@ private HttpRequest.Builder getSecurityFindingByIdRequestBuilder(UUID id) throws } /** * Get FSPM security findings Returns a paginated list of FSPM security findings for the - * workspace. Endpoint Roles: Security Admin, Security Auditor. + * workspace. Endpoint Roles: Security Admin, Security Auditor. **Note:** This endpoint is + * available only for the FSPM Pro package. It is not available for FSPM Basic. * * @param pageCursor Cursor indicating the page position. Omit to fetch the first page. * (optional) @@ -287,7 +289,8 @@ private HttpRequest.Builder getSecurityFindingsRequestBuilder( /** * 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. + * `statusUpdatedReason` is required. Endpoint Roles: Security Admin. **Note:** This + * endpoint is available only for the FSPM Pro package. It is not available for FSPM Basic. * * @param updateFindingExternalRequest (required) * @param id Unique identifier of the finding (required) diff --git a/src/main/java/com/fireblocks/sdk/api/VaultsApi.java b/src/main/java/com/fireblocks/sdk/api/VaultsApi.java index 384abfe8..5e02bfde 100644 --- a/src/main/java/com/fireblocks/sdk/api/VaultsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/VaultsApi.java @@ -138,8 +138,8 @@ private String formatExceptionMessage(String operationId, int statusCode, String /** * Activate a wallet in a vault account Initiates activation for a wallet in a vault account. - * Activation is required for tokens that need an on-chain transaction for creation (XLM tokens, - * SOL tokens etc). Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. + * Activation is required for tokens that need an on-chain transaction for creation. Endpoint + * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. * * @param vaultAccountId The ID of the vault account to return, or 'default' for the * default vault account (required) diff --git a/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java b/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java index 346133ef..7d20906e 100644 --- a/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java +++ b/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java @@ -20,7 +20,9 @@ import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; +import com.fireblocks.sdk.model.CreateWebhookOAuthRequest; import com.fireblocks.sdk.model.CreateWebhookRequest; +import com.fireblocks.sdk.model.DeleteWebhookOAuthResponse; import com.fireblocks.sdk.model.NotificationAttemptsPaginatedResponse; import com.fireblocks.sdk.model.NotificationPaginatedResponse; import com.fireblocks.sdk.model.NotificationStatus; @@ -31,11 +33,13 @@ import com.fireblocks.sdk.model.ResendFailedNotificationsRequest; import com.fireblocks.sdk.model.ResendFailedNotificationsResponse; import com.fireblocks.sdk.model.ResendNotificationsByResourceIdRequest; +import com.fireblocks.sdk.model.UpdateWebhookOAuthRequest; import com.fireblocks.sdk.model.UpdateWebhookRequest; import com.fireblocks.sdk.model.Webhook; import com.fireblocks.sdk.model.WebhookEvent; import com.fireblocks.sdk.model.WebhookMetric; import com.fireblocks.sdk.model.WebhookMtlsCsrResponse; +import com.fireblocks.sdk.model.WebhookOAuthCredentials; import com.fireblocks.sdk.model.WebhookPaginatedResponse; import java.io.IOException; import java.io.InputStream; @@ -204,6 +208,102 @@ private HttpRequest.Builder createWebhookRequestBuilder( } return localVarRequestBuilder; } + /** + * Create OAuth credentials Creates a reusable OAuth client credential set. Attach it to a + * webhook by passing the returned id as that webhook's `webhookOauthId`. Several + * webhooks may share one credential set, so rotating its client secret covers all of them at + * once. The client secret is write-only and is never returned. **Endpoint Permissions:** Owner, + * Admin, Non-Signing Admin. + * + * @param createWebhookOAuthRequest (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<WebhookOAuthCredentials>>, which completes + * exceptionally with an {@link ApiException} if the API call fails + */ + public CompletableFuture> createWebhookOAuth( + CreateWebhookOAuthRequest createWebhookOAuthRequest, String idempotencyKey) { + try { + HttpRequest.Builder localVarRequestBuilder = + createWebhookOAuthRequestBuilder(createWebhookOAuthRequest, 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( + "createWebhookOAuth", 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< + WebhookOAuthCredentials>() {}))); + } 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 createWebhookOAuthRequestBuilder( + CreateWebhookOAuthRequest createWebhookOAuthRequest, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "createWebhookOAuth", "createWebhookOAuthRequest", createWebhookOAuthRequest); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/webhooks_settings/oauth"; + + 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(createWebhookOAuthRequest); + localVarRequestBuilder.method( + "POST", 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; + } /** * Delete webhook Delete a webhook by its id Endpoint Permission: Owner, Admin, Non-Signing * Admin. @@ -277,6 +377,118 @@ private HttpRequest.Builder deleteWebhookRequestBuilder(UUID webhookId) throws A } return localVarRequestBuilder; } + /** + * Delete OAuth credentials Deletes an OAuth credential set. By default the delete is refused + * while the credentials are still in use: if any webhook references them, nothing is deleted + * and the request fails with `409 Conflict`, naming the reason and listing the ids of + * the referencing webhooks. This protects a shared credential set from being removed out from + * under the webhooks that depend on it, since several webhooks may reference the same one. Pass + * `forceDelete=true` to delete anyway. That detaches every referencing webhook — + * it clears each webhook's `webhookOauthId`, it does **not** delete the webhook — + * then deletes the credential set and returns the deleted resource together with + * `detachedWebhookIds`. The detached webhooks keep delivering notifications, but + * without an `Authorization` header, so their endpoints will see unauthenticated + * deliveries from that point on. When nothing references the credentials the delete succeeds + * either way, and `detachedWebhookIds` comes back empty. **Endpoint Permissions:** + * Owner, Admin, Non-Signing Admin. + * + * @param webhookOauthId The unique identifier of the OAuth credentials (required) + * @param forceDelete Delete the credentials even while webhooks still reference them, detaching + * those webhooks instead of refusing. Leave it unset, or `false`, to get a + * `409 Conflict` whenever anything still references the credentials. (optional, + * default to false) + * @return CompletableFuture<ApiResponse<DeleteWebhookOAuthResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails + */ + public CompletableFuture> deleteWebhookOAuth( + UUID webhookOauthId, Boolean forceDelete) { + try { + HttpRequest.Builder localVarRequestBuilder = + deleteWebhookOAuthRequestBuilder(webhookOauthId, forceDelete); + 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( + "deleteWebhookOAuth", 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< + DeleteWebhookOAuthResponse>() {}))); + } 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 deleteWebhookOAuthRequestBuilder( + UUID webhookOauthId, Boolean forceDelete) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty( + "deleteWebhookOAuth", "webhookOauthId", webhookOauthId.toString()); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/webhooks_settings/oauth/{webhookOauthId}" + .replace( + "{webhookOauthId}", ApiClient.urlEncode(webhookOauthId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "forceDelete"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("forceDelete", forceDelete)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } /** * Get webhook metrics Get webhook metrics by webhook id and metric name * @@ -1028,6 +1240,158 @@ private HttpRequest.Builder getWebhookRequestBuilder(UUID webhookId) throws ApiE } return localVarRequestBuilder; } + /** + * Get OAuth credentials by id Retrieve an OAuth credential set by its id. The client secret is + * never returned. + * + * @param webhookOauthId The unique identifier of the OAuth credentials (required) + * @return CompletableFuture<ApiResponse<WebhookOAuthCredentials>>, which completes + * exceptionally with an {@link ApiException} if the API call fails + */ + public CompletableFuture> getWebhookOAuth( + UUID webhookOauthId) { + try { + HttpRequest.Builder localVarRequestBuilder = + getWebhookOAuthRequestBuilder(webhookOauthId); + 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("getWebhookOAuth", 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< + WebhookOAuthCredentials>() {}))); + } 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 getWebhookOAuthRequestBuilder(UUID webhookOauthId) + throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty( + "getWebhookOAuth", "webhookOauthId", webhookOauthId.toString()); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/webhooks_settings/oauth/{webhookOauthId}" + .replace( + "{webhookOauthId}", ApiClient.urlEncode(webhookOauthId.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 all OAuth credentials Lists every OAuth credential set for the workspace. Client secrets + * are never returned. + * + * @return CompletableFuture<ApiResponse<List<WebhookOAuthCredentials>>>, + * which completes exceptionally with an {@link ApiException} if the API call fails + */ + public CompletableFuture>> getWebhookOAuths() { + try { + HttpRequest.Builder localVarRequestBuilder = getWebhookOAuthsRequestBuilder(); + 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("getWebhookOAuths", 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< + List< + WebhookOAuthCredentials>>() {}))); + } 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 getWebhookOAuthsRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/webhooks_settings/oauth"; + + 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 all webhooks Get all webhooks (paginated). * @@ -1588,4 +1952,109 @@ private HttpRequest.Builder updateWebhookRequestBuilder( } return localVarRequestBuilder; } + /** + * Update OAuth credentials Updates only the fields present in the request; anything omitted is + * left as it is. Sending `clientSecret` on its own rotates the secret for every + * webhook using these credentials. `customJwtClaims`, `customBodyParams` + * and `customHeaders` are all merged key by key rather than replaced, the same way a + * webhook's own `customHeaders` behaves: a key sent with a value is added or + * overwritten, a key sent with a `null` value is deleted, and a key you omit is left + * alone. Since a `null` inside a map is the delete mechanism, none of the three + * accepts `null` for the whole field — `customJwtClaims: null`, + * `customBodyParams: null` or `customHeaders: null` is rejected with a + * `400` rather than ignored. Clear a map by listing each of its keys with a + * `null` value. Because `null` is spent on deletion, a claim cannot be set + * to JSON `null` either, on this endpoint or on create. + * `mtlsClientSignedCert` is a scalar rather than a map, so `null` there + * does remove it. **Endpoint Permissions:** Owner, Admin, Non-Signing Admin. + * + * @param updateWebhookOAuthRequest (required) + * @param webhookOauthId The unique identifier of the OAuth credentials (required) + * @return CompletableFuture<ApiResponse<WebhookOAuthCredentials>>, which completes + * exceptionally with an {@link ApiException} if the API call fails + */ + public CompletableFuture> updateWebhookOAuth( + UpdateWebhookOAuthRequest updateWebhookOAuthRequest, UUID webhookOauthId) { + try { + HttpRequest.Builder localVarRequestBuilder = + updateWebhookOAuthRequestBuilder(updateWebhookOAuthRequest, webhookOauthId); + 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( + "updateWebhookOAuth", 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< + WebhookOAuthCredentials>() {}))); + } 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 updateWebhookOAuthRequestBuilder( + UpdateWebhookOAuthRequest updateWebhookOAuthRequest, UUID webhookOauthId) + throws ApiException { + ValidationUtils.assertParamExists( + "updateWebhookOAuth", "updateWebhookOAuthRequest", updateWebhookOAuthRequest); + ValidationUtils.assertParamExistsAndNotEmpty( + "updateWebhookOAuth", "webhookOauthId", webhookOauthId.toString()); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/webhooks_settings/oauth/{webhookOauthId}" + .replace( + "{webhookOauthId}", ApiClient.urlEncode(webhookOauthId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = + memberVarObjectMapper.writeValueAsBytes(updateWebhookOAuthRequest); + 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/AccessTypeResponse.java b/src/main/java/com/fireblocks/sdk/model/AccessTypeResponse.java new file mode 100644 index 00000000..667bab62 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AccessTypeResponse.java @@ -0,0 +1,329 @@ +/* + * 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 = AccessTypeResponse.AccessTypeResponseDeserializer.class) +@JsonSerialize(using = AccessTypeResponse.AccessTypeResponseSerializer.class) +public class AccessTypeResponse extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(AccessTypeResponse.class.getName()); + + public static class AccessTypeResponseSerializer extends StdSerializer { + public AccessTypeResponseSerializer(Class t) { + super(t); + } + + public AccessTypeResponseSerializer() { + this(null); + } + + @Override + public void serialize( + AccessTypeResponse value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class AccessTypeResponseDeserializer extends StdDeserializer { + public AccessTypeResponseDeserializer() { + this(AccessTypeResponse.class); + } + + public AccessTypeResponseDeserializer(Class vc) { + super(vc); + } + + @Override + public AccessTypeResponse 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 AccountAccessResponse + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AccountAccessResponse.class.equals(Integer.class) + || AccountAccessResponse.class.equals(Long.class) + || AccountAccessResponse.class.equals(Float.class) + || AccountAccessResponse.class.equals(Double.class) + || AccountAccessResponse.class.equals(Boolean.class) + || AccountAccessResponse.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((AccountAccessResponse.class.equals(Integer.class) + || AccountAccessResponse.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((AccountAccessResponse.class.equals(Float.class) + || AccountAccessResponse.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (AccountAccessResponse.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (AccountAccessResponse.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(AccountAccessResponse.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 'AccountAccessResponse'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AccountAccessResponse'", e); + } + + // deserialize DirectAccessResponse + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DirectAccessResponse.class.equals(Integer.class) + || DirectAccessResponse.class.equals(Long.class) + || DirectAccessResponse.class.equals(Float.class) + || DirectAccessResponse.class.equals(Double.class) + || DirectAccessResponse.class.equals(Boolean.class) + || DirectAccessResponse.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((DirectAccessResponse.class.equals(Integer.class) + || DirectAccessResponse.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((DirectAccessResponse.class.equals(Float.class) + || DirectAccessResponse.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (DirectAccessResponse.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (DirectAccessResponse.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(DirectAccessResponse.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 'DirectAccessResponse'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'DirectAccessResponse'", e); + } + + if (match == 1) { + AccessTypeResponse ret = new AccessTypeResponse(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for AccessTypeResponse: %d classes match" + + " result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public AccessTypeResponse getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "AccessTypeResponse cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public AccessTypeResponse() { + super("oneOf", Boolean.FALSE); + } + + public AccessTypeResponse(AccountAccessResponse o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public AccessTypeResponse(DirectAccessResponse o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("AccountAccessResponse", AccountAccessResponse.class); + schemas.put("DirectAccessResponse", DirectAccessResponse.class); + JSON.registerDescendants(AccessTypeResponse.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("PROVIDER", DirectAccessResponse.class); + mappings.put("PROVIDER_ACCOUNT", AccountAccessResponse.class); + mappings.put("AccountAccessResponse", AccountAccessResponse.class); + mappings.put("DirectAccessResponse", DirectAccessResponse.class); + mappings.put("AccessTypeResponse", AccessTypeResponse.class); + JSON.registerDiscriminator(AccessTypeResponse.class, "type", mappings); + } + + @Override + public Map> getSchemas() { + return AccessTypeResponse.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: AccountAccessResponse, DirectAccessResponse + * + *

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(AccountAccessResponse.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(DirectAccessResponse.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be AccountAccessResponse, DirectAccessResponse"); + } + + /** + * Get the actual instance, which can be the following: AccountAccessResponse, + * DirectAccessResponse + * + * @return The actual instance (AccountAccessResponse, DirectAccessResponse) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `AccountAccessResponse`. If the actual instance is not + * `AccountAccessResponse`, the ClassCastException will be thrown. + * + * @return The actual instance of `AccountAccessResponse` + * @throws ClassCastException if the instance is not `AccountAccessResponse` + */ + public AccountAccessResponse getAccountAccessResponse() throws ClassCastException { + return (AccountAccessResponse) super.getActualInstance(); + } + + /** + * Get the actual instance of `DirectAccessResponse`. If the actual instance is not + * `DirectAccessResponse`, the ClassCastException will be thrown. + * + * @return The actual instance of `DirectAccessResponse` + * @throws ClassCastException if the instance is not `DirectAccessResponse` + */ + public DirectAccessResponse getDirectAccessResponse() throws ClassCastException { + return (DirectAccessResponse) 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 AccountAccessResponse) { + if (getActualInstance() != null) { + joiner.add( + ((AccountAccessResponse) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof DirectAccessResponse) { + if (getActualInstance() != null) { + joiner.add( + ((DirectAccessResponse) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AccountAccessResponse.java b/src/main/java/com/fireblocks/sdk/model/AccountAccessResponse.java new file mode 100644 index 00000000..35ff7896 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AccountAccessResponse.java @@ -0,0 +1,260 @@ +/* + * 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; + +/** Response-only counterpart of AccountAccess. */ +@JsonPropertyOrder({ + AccountAccessResponse.JSON_PROPERTY_TYPE, + AccountAccessResponse.JSON_PROPERTY_PROVIDER_ID, + AccountAccessResponse.JSON_PROPERTY_ACCOUNT_ID +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class AccountAccessResponse { + /** Indicates this uses account-based access */ + public enum TypeEnum { + PROVIDER_ACCOUNT(String.valueOf("PROVIDER_ACCOUNT")); + + 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; + + public static final String JSON_PROPERTY_PROVIDER_ID = "providerId"; + @jakarta.annotation.Nullable private String providerId; + + public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; + @jakarta.annotation.Nonnull private String accountId; + + public AccountAccessResponse() {} + + @JsonCreator + public AccountAccessResponse( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_ID, required = true) String accountId) { + this.type = type; + this.accountId = accountId; + } + + public AccountAccessResponse type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Indicates this uses account-based access + * + * @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 AccountAccessResponse providerId(@jakarta.annotation.Nullable String providerId) { + this.providerId = providerId; + return this; + } + + /** + * The ID of the provider + * + * @return providerId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProviderId() { + return providerId; + } + + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProviderId(@jakarta.annotation.Nullable String providerId) { + this.providerId = providerId; + } + + public AccountAccessResponse accountId(@jakarta.annotation.Nonnull String accountId) { + this.accountId = accountId; + return this; + } + + /** + * The ID of the account + * + * @return accountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountId() { + return accountId; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountId(@jakarta.annotation.Nonnull String accountId) { + this.accountId = accountId; + } + + /** Return true if this AccountAccessResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountAccessResponse accountAccessResponse = (AccountAccessResponse) o; + return Objects.equals(this.type, accountAccessResponse.type) + && Objects.equals(this.providerId, accountAccessResponse.providerId) + && Objects.equals(this.accountId, accountAccessResponse.accountId); + } + + @Override + public int hashCode() { + return Objects.hash(type, providerId, accountId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountAccessResponse {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" providerId: ").append(toIndentedString(providerId)).append("\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `providerId` to the URL query string + if (getProviderId() != null) { + joiner.add( + String.format( + "%sproviderId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getProviderId())))); + } + + // add `accountId` to the URL query string + if (getAccountId() != null) { + joiner.add( + String.format( + "%saccountId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAccountId())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AllocationResponse.java b/src/main/java/com/fireblocks/sdk/model/AllocationResponse.java new file mode 100644 index 00000000..bf230189 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AllocationResponse.java @@ -0,0 +1,342 @@ +/* + * 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 = AllocationResponse.AllocationResponseDeserializer.class) +@JsonSerialize(using = AllocationResponse.AllocationResponseSerializer.class) +public class AllocationResponse extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(AllocationResponse.class.getName()); + + public static class AllocationResponseSerializer extends StdSerializer { + public AllocationResponseSerializer(Class t) { + super(t); + } + + public AllocationResponseSerializer() { + this(null); + } + + @Override + public void serialize( + AllocationResponse value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class AllocationResponseDeserializer extends StdDeserializer { + public AllocationResponseDeserializer() { + this(AllocationResponse.class); + } + + public AllocationResponseDeserializer(Class vc) { + super(vc); + } + + @Override + public AllocationResponse 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 AllocationResponseAccept + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AllocationResponseAccept.class.equals(Integer.class) + || AllocationResponseAccept.class.equals(Long.class) + || AllocationResponseAccept.class.equals(Float.class) + || AllocationResponseAccept.class.equals(Double.class) + || AllocationResponseAccept.class.equals(Boolean.class) + || AllocationResponseAccept.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((AllocationResponseAccept.class.equals(Integer.class) + || AllocationResponseAccept.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((AllocationResponseAccept.class.equals(Float.class) + || AllocationResponseAccept.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (AllocationResponseAccept.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (AllocationResponseAccept.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(AllocationResponseAccept.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 'AllocationResponseAccept'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'AllocationResponseAccept'", + e); + } + + // deserialize AllocationResponseReject + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AllocationResponseReject.class.equals(Integer.class) + || AllocationResponseReject.class.equals(Long.class) + || AllocationResponseReject.class.equals(Float.class) + || AllocationResponseReject.class.equals(Double.class) + || AllocationResponseReject.class.equals(Boolean.class) + || AllocationResponseReject.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((AllocationResponseReject.class.equals(Integer.class) + || AllocationResponseReject.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((AllocationResponseReject.class.equals(Float.class) + || AllocationResponseReject.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (AllocationResponseReject.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (AllocationResponseReject.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(AllocationResponseReject.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 'AllocationResponseReject'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'AllocationResponseReject'", + e); + } + + if (match == 1) { + AllocationResponse ret = new AllocationResponse(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for AllocationResponse: %d classes match" + + " result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public AllocationResponse getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "AllocationResponse cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public AllocationResponse() { + super("oneOf", Boolean.FALSE); + } + + public AllocationResponse(AllocationResponseAccept o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public AllocationResponse(AllocationResponseReject o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("AllocationResponseAccept", AllocationResponseAccept.class); + schemas.put("AllocationResponseReject", AllocationResponseReject.class); + JSON.registerDescendants(AllocationResponse.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ALLOCATION_ACCEPT", AllocationResponseAccept.class); + mappings.put("ALLOCATION_REJECT", AllocationResponseReject.class); + mappings.put("AllocationResponseAccept", AllocationResponseAccept.class); + mappings.put("AllocationResponseReject", AllocationResponseReject.class); + mappings.put("AllocationResponse", AllocationResponse.class); + JSON.registerDiscriminator(AllocationResponse.class, "responseType", mappings); + } + + @Override + public Map> getSchemas() { + return AllocationResponse.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: AllocationResponseAccept, AllocationResponseReject + * + *

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(AllocationResponseAccept.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(AllocationResponseReject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be AllocationResponseAccept," + + " AllocationResponseReject"); + } + + /** + * Get the actual instance, which can be the following: AllocationResponseAccept, + * AllocationResponseReject + * + * @return The actual instance (AllocationResponseAccept, AllocationResponseReject) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `AllocationResponseAccept`. If the actual instance is not + * `AllocationResponseAccept`, the ClassCastException will be thrown. + * + * @return The actual instance of `AllocationResponseAccept` + * @throws ClassCastException if the instance is not `AllocationResponseAccept` + */ + public AllocationResponseAccept getAllocationResponseAccept() throws ClassCastException { + return (AllocationResponseAccept) super.getActualInstance(); + } + + /** + * Get the actual instance of `AllocationResponseReject`. If the actual instance is not + * `AllocationResponseReject`, the ClassCastException will be thrown. + * + * @return The actual instance of `AllocationResponseReject` + * @throws ClassCastException if the instance is not `AllocationResponseReject` + */ + public AllocationResponseReject getAllocationResponseReject() throws ClassCastException { + return (AllocationResponseReject) 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 AllocationResponseAccept) { + if (getActualInstance() != null) { + joiner.add( + ((AllocationResponseAccept) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof AllocationResponseReject) { + if (getActualInstance() != null) { + joiner.add( + ((AllocationResponseReject) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AllocationResponseAccept.java b/src/main/java/com/fireblocks/sdk/model/AllocationResponseAccept.java new file mode 100644 index 00000000..7bee061b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AllocationResponseAccept.java @@ -0,0 +1,180 @@ +/* + * 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; + +/** Accept a CIP-56 allocation request. Carries no arguments. */ +@JsonPropertyOrder({AllocationResponseAccept.JSON_PROPERTY_RESPONSE_TYPE}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class AllocationResponseAccept { + /** How you are answering the allocation request. */ + public enum ResponseTypeEnum { + ALLOCATION_ACCEPT(String.valueOf("ALLOCATION_ACCEPT")); + + private String value; + + ResponseTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResponseTypeEnum fromValue(String value) { + for (ResponseTypeEnum b : ResponseTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RESPONSE_TYPE = "responseType"; + @jakarta.annotation.Nonnull private ResponseTypeEnum responseType; + + public AllocationResponseAccept() {} + + @JsonCreator + public AllocationResponseAccept( + @JsonProperty(value = JSON_PROPERTY_RESPONSE_TYPE, required = true) + ResponseTypeEnum responseType) { + this.responseType = responseType; + } + + public AllocationResponseAccept responseType( + @jakarta.annotation.Nonnull ResponseTypeEnum responseType) { + this.responseType = responseType; + return this; + } + + /** + * How you are answering the allocation request. + * + * @return responseType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ResponseTypeEnum getResponseType() { + return responseType; + } + + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResponseType(@jakarta.annotation.Nonnull ResponseTypeEnum responseType) { + this.responseType = responseType; + } + + /** Return true if this AllocationResponseAccept object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllocationResponseAccept allocationResponseAccept = (AllocationResponseAccept) o; + return Objects.equals(this.responseType, allocationResponseAccept.responseType); + } + + @Override + public int hashCode() { + return Objects.hash(responseType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllocationResponseAccept {\n"); + sb.append(" responseType: ").append(toIndentedString(responseType)).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 `responseType` to the URL query string + if (getResponseType() != null) { + joiner.add( + String.format( + "%sresponseType%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getResponseType())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AllocationResponseReject.java b/src/main/java/com/fireblocks/sdk/model/AllocationResponseReject.java new file mode 100644 index 00000000..e1419066 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AllocationResponseReject.java @@ -0,0 +1,180 @@ +/* + * 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; + +/** Reject a CIP-56 allocation request. Carries no arguments. */ +@JsonPropertyOrder({AllocationResponseReject.JSON_PROPERTY_RESPONSE_TYPE}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class AllocationResponseReject { + /** How you are answering the allocation request. */ + public enum ResponseTypeEnum { + ALLOCATION_REJECT(String.valueOf("ALLOCATION_REJECT")); + + private String value; + + ResponseTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResponseTypeEnum fromValue(String value) { + for (ResponseTypeEnum b : ResponseTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RESPONSE_TYPE = "responseType"; + @jakarta.annotation.Nonnull private ResponseTypeEnum responseType; + + public AllocationResponseReject() {} + + @JsonCreator + public AllocationResponseReject( + @JsonProperty(value = JSON_PROPERTY_RESPONSE_TYPE, required = true) + ResponseTypeEnum responseType) { + this.responseType = responseType; + } + + public AllocationResponseReject responseType( + @jakarta.annotation.Nonnull ResponseTypeEnum responseType) { + this.responseType = responseType; + return this; + } + + /** + * How you are answering the allocation request. + * + * @return responseType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ResponseTypeEnum getResponseType() { + return responseType; + } + + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResponseType(@jakarta.annotation.Nonnull ResponseTypeEnum responseType) { + this.responseType = responseType; + } + + /** Return true if this AllocationResponseReject object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllocationResponseReject allocationResponseReject = (AllocationResponseReject) o; + return Objects.equals(this.responseType, allocationResponseReject.responseType); + } + + @Override + public int hashCode() { + return Objects.hash(responseType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllocationResponseReject {\n"); + sb.append(" responseType: ").append(toIndentedString(responseType)).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 `responseType` to the URL query string + if (getResponseType() != null) { + joiner.add( + String.format( + "%sresponseType%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getResponseType())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AllocationWithdrawPayload.java b/src/main/java/com/fireblocks/sdk/model/AllocationWithdrawPayload.java new file mode 100644 index 00000000..5ff3e1e5 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AllocationWithdrawPayload.java @@ -0,0 +1,275 @@ +/* + * 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; + +/** AllocationWithdrawPayload */ +@JsonPropertyOrder({ + AllocationWithdrawPayload.JSON_PROPERTY_VAULT_ACCOUNT_ID, + AllocationWithdrawPayload.JSON_PROPERTY_ASSET, + AllocationWithdrawPayload.JSON_PROPERTY_ALLOCATION_TRANSACTION_ID +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class AllocationWithdrawPayload { + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + @jakarta.annotation.Nonnull private String vaultAccountId; + + /** Chain asset — `CANTON` or `CANTON_TEST`. */ + public enum AssetEnum { + CANTON(String.valueOf("CANTON")), + + CANTON_TEST(String.valueOf("CANTON_TEST")); + + private String value; + + AssetEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AssetEnum fromValue(String value) { + for (AssetEnum b : AssetEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ASSET = "asset"; + @jakarta.annotation.Nonnull private AssetEnum asset; + + public static final String JSON_PROPERTY_ALLOCATION_TRANSACTION_ID = "allocationTransactionId"; + @jakarta.annotation.Nonnull private String allocationTransactionId; + + public AllocationWithdrawPayload() {} + + @JsonCreator + public AllocationWithdrawPayload( + @JsonProperty(value = JSON_PROPERTY_VAULT_ACCOUNT_ID, required = true) + String vaultAccountId, + @JsonProperty(value = JSON_PROPERTY_ASSET, required = true) AssetEnum asset, + @JsonProperty(value = JSON_PROPERTY_ALLOCATION_TRANSACTION_ID, required = true) + String allocationTransactionId) { + this.vaultAccountId = vaultAccountId; + this.asset = asset; + this.allocationTransactionId = allocationTransactionId; + } + + public AllocationWithdrawPayload vaultAccountId( + @jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The vault account whose Canton wallet acts here. + * + * @return vaultAccountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVaultAccountId(@jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + public AllocationWithdrawPayload asset(@jakarta.annotation.Nonnull AssetEnum asset) { + this.asset = asset; + return this; + } + + /** + * Chain asset — `CANTON` or `CANTON_TEST`. + * + * @return asset + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ASSET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetEnum getAsset() { + return asset; + } + + @JsonProperty(JSON_PROPERTY_ASSET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAsset(@jakarta.annotation.Nonnull AssetEnum asset) { + this.asset = asset; + } + + public AllocationWithdrawPayload allocationTransactionId( + @jakarta.annotation.Nonnull String allocationTransactionId) { + this.allocationTransactionId = allocationTransactionId; + return this; + } + + /** + * The Fireblocks transaction id of the outgoing response that created the allocation. The + * allocation is resolved from it — Canton contract ids are never accepted here. + * + * @return allocationTransactionId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ALLOCATION_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAllocationTransactionId() { + return allocationTransactionId; + } + + @JsonProperty(JSON_PROPERTY_ALLOCATION_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAllocationTransactionId( + @jakarta.annotation.Nonnull String allocationTransactionId) { + this.allocationTransactionId = allocationTransactionId; + } + + /** Return true if this AllocationWithdrawPayload object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllocationWithdrawPayload allocationWithdrawPayload = (AllocationWithdrawPayload) o; + return Objects.equals(this.vaultAccountId, allocationWithdrawPayload.vaultAccountId) + && Objects.equals(this.asset, allocationWithdrawPayload.asset) + && Objects.equals( + this.allocationTransactionId, + allocationWithdrawPayload.allocationTransactionId); + } + + @Override + public int hashCode() { + return Objects.hash(vaultAccountId, asset, allocationTransactionId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllocationWithdrawPayload {\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); + sb.append(" allocationTransactionId: ") + .append(toIndentedString(allocationTransactionId)) + .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 `vaultAccountId` to the URL query string + if (getVaultAccountId() != null) { + joiner.add( + String.format( + "%svaultAccountId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getVaultAccountId())))); + } + + // add `asset` to the URL query string + if (getAsset() != null) { + joiner.add( + String.format( + "%sasset%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAsset())))); + } + + // add `allocationTransactionId` to the URL query string + if (getAllocationTransactionId() != null) { + joiner.add( + String.format( + "%sallocationTransactionId%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getAllocationTransactionId())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AllowListPayload.java b/src/main/java/com/fireblocks/sdk/model/AllowListPayload.java new file mode 100644 index 00000000..88c4b533 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AllowListPayload.java @@ -0,0 +1,281 @@ +/* + * 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.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** AllowListPayload */ +@JsonPropertyOrder({ + AllowListPayload.JSON_PROPERTY_VAULT_ACCOUNT_ID, + AllowListPayload.JSON_PROPERTY_ASSET, + AllowListPayload.JSON_PROPERTY_WALLETS +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class AllowListPayload { + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + @jakarta.annotation.Nonnull private String vaultAccountId; + + /** Chain asset — `CANTON` or `CANTON_TEST`. */ + public enum AssetEnum { + CANTON(String.valueOf("CANTON")), + + CANTON_TEST(String.valueOf("CANTON_TEST")); + + private String value; + + AssetEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AssetEnum fromValue(String value) { + for (AssetEnum b : AssetEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ASSET = "asset"; + @jakarta.annotation.Nonnull private AssetEnum asset; + + public static final String JSON_PROPERTY_WALLETS = "wallets"; + @jakarta.annotation.Nonnull private List wallets; + + public AllowListPayload() {} + + @JsonCreator + public AllowListPayload( + @JsonProperty(value = JSON_PROPERTY_VAULT_ACCOUNT_ID, required = true) + String vaultAccountId, + @JsonProperty(value = JSON_PROPERTY_ASSET, required = true) AssetEnum asset, + @JsonProperty(value = JSON_PROPERTY_WALLETS, required = true) List wallets) { + this.vaultAccountId = vaultAccountId; + this.asset = asset; + this.wallets = wallets; + } + + public AllowListPayload vaultAccountId(@jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The vault account whose Canton wallet acts here. + * + * @return vaultAccountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVaultAccountId(@jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + public AllowListPayload asset(@jakarta.annotation.Nonnull AssetEnum asset) { + this.asset = asset; + return this; + } + + /** + * Chain asset — `CANTON` or `CANTON_TEST`. + * + * @return asset + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ASSET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetEnum getAsset() { + return asset; + } + + @JsonProperty(JSON_PROPERTY_ASSET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAsset(@jakarta.annotation.Nonnull AssetEnum asset) { + this.asset = asset; + } + + public AllowListPayload wallets(@jakarta.annotation.Nonnull List wallets) { + this.wallets = wallets; + return this; + } + + public AllowListPayload addWalletsItem(String walletsItem) { + if (this.wallets == null) { + this.wallets = new ArrayList<>(); + } + this.wallets.add(walletsItem); + return this; + } + + /** + * Canton party ids to add or remove. + * + * @return wallets + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WALLETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getWallets() { + return wallets; + } + + @JsonProperty(JSON_PROPERTY_WALLETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWallets(@jakarta.annotation.Nonnull List wallets) { + this.wallets = wallets; + } + + /** Return true if this AllowListPayload object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllowListPayload allowListPayload = (AllowListPayload) o; + return Objects.equals(this.vaultAccountId, allowListPayload.vaultAccountId) + && Objects.equals(this.asset, allowListPayload.asset) + && Objects.equals(this.wallets, allowListPayload.wallets); + } + + @Override + public int hashCode() { + return Objects.hash(vaultAccountId, asset, wallets); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllowListPayload {\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); + sb.append(" wallets: ").append(toIndentedString(wallets)).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 `vaultAccountId` to the URL query string + if (getVaultAccountId() != null) { + joiner.add( + String.format( + "%svaultAccountId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getVaultAccountId())))); + } + + // add `asset` to the URL query string + if (getAsset() != null) { + joiner.add( + String.format( + "%sasset%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAsset())))); + } + + // add `wallets` to the URL query string + if (getWallets() != null) { + for (int i = 0; i < getWallets().size(); i++) { + joiner.add( + String.format( + "%swallets%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getWallets().get(i))))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ApprovalRequestItem.java b/src/main/java/com/fireblocks/sdk/model/ApprovalRequestItem.java new file mode 100644 index 00000000..cccaa57f --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ApprovalRequestItem.java @@ -0,0 +1,308 @@ +/* + * 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; + +/** ApprovalRequestItem */ +@JsonPropertyOrder({ + ApprovalRequestItem.JSON_PROPERTY_REQUEST_PAYLOAD, + ApprovalRequestItem.JSON_PROPERTY_REQUEST_SIGNATURE, + ApprovalRequestItem.JSON_PROPERTY_USER_STATUS, + ApprovalRequestItem.JSON_PROPERTY_QUORUM_STATUS +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ApprovalRequestItem { + public static final String JSON_PROPERTY_REQUEST_PAYLOAD = "requestPayload"; + @jakarta.annotation.Nonnull private String requestPayload; + + public static final String JSON_PROPERTY_REQUEST_SIGNATURE = "requestSignature"; + @jakarta.annotation.Nullable private String requestSignature; + + /** The authenticated user's approval status for this request. */ + public enum UserStatusEnum { + USER_STATUS_NOT_APPLICABLE(String.valueOf("USER_STATUS_NOT_APPLICABLE")), + + USER_NOT_ELIGIBLE_TO_APPROVE(String.valueOf("USER_NOT_ELIGIBLE_TO_APPROVE")), + + USER_NOT_APPROVED(String.valueOf("USER_NOT_APPROVED")), + + USER_APPROVED(String.valueOf("USER_APPROVED")); + + private String value; + + UserStatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static UserStatusEnum fromValue(String value) { + for (UserStatusEnum b : UserStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_USER_STATUS = "userStatus"; + @jakarta.annotation.Nonnull private UserStatusEnum userStatus; + + public static final String JSON_PROPERTY_QUORUM_STATUS = "quorumStatus"; + @jakarta.annotation.Nullable private QuorumStatus quorumStatus; + + public ApprovalRequestItem() {} + + @JsonCreator + public ApprovalRequestItem( + @JsonProperty(value = JSON_PROPERTY_REQUEST_PAYLOAD, required = true) + String requestPayload, + @JsonProperty(value = JSON_PROPERTY_USER_STATUS, required = true) + UserStatusEnum userStatus) { + this.requestPayload = requestPayload; + this.userStatus = userStatus; + } + + public ApprovalRequestItem requestPayload(@jakarta.annotation.Nonnull String requestPayload) { + this.requestPayload = requestPayload; + return this; + } + + /** + * The pending approval request as a JSON string, exactly as produced by the backend — this is + * the precise string to sign in order to approve the request (sign it as-is; do not + * re-serialize). The JSON has the shape { requestId, requestType, requestTimestamp (epoch ms), + * expiresAt (epoch seconds), requestData }, where requestData is the request-type-specific + * payload. + * + * @return requestPayload + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REQUEST_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRequestPayload() { + return requestPayload; + } + + @JsonProperty(JSON_PROPERTY_REQUEST_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRequestPayload(@jakarta.annotation.Nonnull String requestPayload) { + this.requestPayload = requestPayload; + } + + public ApprovalRequestItem requestSignature( + @jakarta.annotation.Nullable String requestSignature) { + this.requestSignature = requestSignature; + return this; + } + + /** + * Signature over the requestPayload. Empty until request signing is implemented. + * + * @return requestSignature + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUEST_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRequestSignature() { + return requestSignature; + } + + @JsonProperty(JSON_PROPERTY_REQUEST_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequestSignature(@jakarta.annotation.Nullable String requestSignature) { + this.requestSignature = requestSignature; + } + + public ApprovalRequestItem userStatus(@jakarta.annotation.Nonnull UserStatusEnum userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * The authenticated user's approval status for this request. + * + * @return userStatus + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UserStatusEnum getUserStatus() { + return userStatus; + } + + @JsonProperty(JSON_PROPERTY_USER_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserStatus(@jakarta.annotation.Nonnull UserStatusEnum userStatus) { + this.userStatus = userStatus; + } + + public ApprovalRequestItem quorumStatus( + @jakarta.annotation.Nullable QuorumStatus quorumStatus) { + this.quorumStatus = quorumStatus; + return this; + } + + /** + * Get quorumStatus + * + * @return quorumStatus + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUORUM_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public QuorumStatus getQuorumStatus() { + return quorumStatus; + } + + @JsonProperty(JSON_PROPERTY_QUORUM_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setQuorumStatus(@jakarta.annotation.Nullable QuorumStatus quorumStatus) { + this.quorumStatus = quorumStatus; + } + + /** Return true if this ApprovalRequestItem object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApprovalRequestItem approvalRequestItem = (ApprovalRequestItem) o; + return Objects.equals(this.requestPayload, approvalRequestItem.requestPayload) + && Objects.equals(this.requestSignature, approvalRequestItem.requestSignature) + && Objects.equals(this.userStatus, approvalRequestItem.userStatus) + && Objects.equals(this.quorumStatus, approvalRequestItem.quorumStatus); + } + + @Override + public int hashCode() { + return Objects.hash(requestPayload, requestSignature, userStatus, quorumStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApprovalRequestItem {\n"); + sb.append(" requestPayload: ").append(toIndentedString(requestPayload)).append("\n"); + sb.append(" requestSignature: ").append(toIndentedString(requestSignature)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append(" quorumStatus: ").append(toIndentedString(quorumStatus)).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 `requestPayload` to the URL query string + if (getRequestPayload() != null) { + joiner.add( + String.format( + "%srequestPayload%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getRequestPayload())))); + } + + // add `requestSignature` to the URL query string + if (getRequestSignature() != null) { + joiner.add( + String.format( + "%srequestSignature%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getRequestSignature())))); + } + + // add `userStatus` to the URL query string + if (getUserStatus() != null) { + joiner.add( + String.format( + "%suserStatus%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getUserStatus())))); + } + + // add `quorumStatus` to the URL query string + if (getQuorumStatus() != null) { + joiner.add(getQuorumStatus().toUrlQueryString(prefix + "quorumStatus" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CallAccepted.java b/src/main/java/com/fireblocks/sdk/model/CallAccepted.java new file mode 100644 index 00000000..1a88cc2a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CallAccepted.java @@ -0,0 +1,187 @@ +/* + * 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; + +/** The outgoing transaction that carries the call. */ +@JsonPropertyOrder({CallAccepted.JSON_PROPERTY_TRANSACTION_ID, CallAccepted.JSON_PROPERTY_STATUS}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class CallAccepted { + public static final String JSON_PROPERTY_TRANSACTION_ID = "transactionId"; + @jakarta.annotation.Nonnull private String transactionId; + + public static final String JSON_PROPERTY_STATUS = "status"; + @jakarta.annotation.Nonnull private String status; + + public CallAccepted() {} + + @JsonCreator + public CallAccepted( + @JsonProperty(value = JSON_PROPERTY_TRANSACTION_ID, required = true) + String transactionId, + @JsonProperty(value = JSON_PROPERTY_STATUS, required = true) String status) { + this.transactionId = transactionId; + this.status = status; + } + + public CallAccepted transactionId(@jakarta.annotation.Nonnull String transactionId) { + this.transactionId = transactionId; + return this; + } + + /** + * The outgoing transaction that carries the call. + * + * @return transactionId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTransactionId() { + return transactionId; + } + + @JsonProperty(JSON_PROPERTY_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTransactionId(@jakarta.annotation.Nonnull String transactionId) { + this.transactionId = transactionId; + } + + public CallAccepted status(@jakarta.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * The transaction's status at the time of this response — `SUBMITTED`. + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@jakarta.annotation.Nonnull String status) { + this.status = status; + } + + /** Return true if this CallAccepted object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallAccepted callAccepted = (CallAccepted) o; + return Objects.equals(this.transactionId, callAccepted.transactionId) + && Objects.equals(this.status, callAccepted.status); + } + + @Override + public int hashCode() { + return Objects.hash(transactionId, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CallAccepted {\n"); + sb.append(" transactionId: ").append(toIndentedString(transactionId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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 `transactionId` to the URL query string + if (getTransactionId() != null) { + joiner.add( + String.format( + "%stransactionId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getTransactionId())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CantonCall.java b/src/main/java/com/fireblocks/sdk/model/CantonCall.java new file mode 100644 index 00000000..4287a88e --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CantonCall.java @@ -0,0 +1,852 @@ +/* + * 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 = CantonCall.CantonCallDeserializer.class) +@JsonSerialize(using = CantonCall.CantonCallSerializer.class) +public class CantonCall extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CantonCall.class.getName()); + + public static class CantonCallSerializer extends StdSerializer { + public CantonCallSerializer(Class t) { + super(t); + } + + public CantonCallSerializer() { + this(null); + } + + @Override + public void serialize(CantonCall value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class CantonCallDeserializer extends StdDeserializer { + public CantonCallDeserializer() { + this(CantonCall.class); + } + + public CantonCallDeserializer(Class vc) { + super(vc); + } + + @Override + public CantonCall 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 CantonCallAllocationWithdraw + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CantonCallAllocationWithdraw.class.equals(Integer.class) + || CantonCallAllocationWithdraw.class.equals(Long.class) + || CantonCallAllocationWithdraw.class.equals(Float.class) + || CantonCallAllocationWithdraw.class.equals(Double.class) + || CantonCallAllocationWithdraw.class.equals(Boolean.class) + || CantonCallAllocationWithdraw.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((CantonCallAllocationWithdraw.class.equals(Integer.class) + || CantonCallAllocationWithdraw.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((CantonCallAllocationWithdraw.class.equals(Float.class) + || CantonCallAllocationWithdraw.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (CantonCallAllocationWithdraw.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (CantonCallAllocationWithdraw.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(CantonCallAllocationWithdraw.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 'CantonCallAllocationWithdraw'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'CantonCallAllocationWithdraw'", + e); + } + + // deserialize CantonCallAllowListAdd + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CantonCallAllowListAdd.class.equals(Integer.class) + || CantonCallAllowListAdd.class.equals(Long.class) + || CantonCallAllowListAdd.class.equals(Float.class) + || CantonCallAllowListAdd.class.equals(Double.class) + || CantonCallAllowListAdd.class.equals(Boolean.class) + || CantonCallAllowListAdd.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((CantonCallAllowListAdd.class.equals(Integer.class) + || CantonCallAllowListAdd.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((CantonCallAllowListAdd.class.equals(Float.class) + || CantonCallAllowListAdd.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (CantonCallAllowListAdd.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (CantonCallAllowListAdd.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(CantonCallAllowListAdd.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 'CantonCallAllowListAdd'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'CantonCallAllowListAdd'", + e); + } + + // deserialize CantonCallAllowListRemove + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CantonCallAllowListRemove.class.equals(Integer.class) + || CantonCallAllowListRemove.class.equals(Long.class) + || CantonCallAllowListRemove.class.equals(Float.class) + || CantonCallAllowListRemove.class.equals(Double.class) + || CantonCallAllowListRemove.class.equals(Boolean.class) + || CantonCallAllowListRemove.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((CantonCallAllowListRemove.class.equals(Integer.class) + || CantonCallAllowListRemove.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((CantonCallAllowListRemove.class.equals(Float.class) + || CantonCallAllowListRemove.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (CantonCallAllowListRemove.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (CantonCallAllowListRemove.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(CantonCallAllowListRemove.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 'CantonCallAllowListRemove'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'CantonCallAllowListRemove'", + e); + } + + // deserialize CantonCallEndInvestorInvite + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CantonCallEndInvestorInvite.class.equals(Integer.class) + || CantonCallEndInvestorInvite.class.equals(Long.class) + || CantonCallEndInvestorInvite.class.equals(Float.class) + || CantonCallEndInvestorInvite.class.equals(Double.class) + || CantonCallEndInvestorInvite.class.equals(Boolean.class) + || CantonCallEndInvestorInvite.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((CantonCallEndInvestorInvite.class.equals(Integer.class) + || CantonCallEndInvestorInvite.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((CantonCallEndInvestorInvite.class.equals(Float.class) + || CantonCallEndInvestorInvite.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (CantonCallEndInvestorInvite.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (CantonCallEndInvestorInvite.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(CantonCallEndInvestorInvite.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 'CantonCallEndInvestorInvite'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'CantonCallEndInvestorInvite'", + e); + } + + // deserialize CantonCallEndInvestorInviteCancel + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CantonCallEndInvestorInviteCancel.class.equals(Integer.class) + || CantonCallEndInvestorInviteCancel.class.equals(Long.class) + || CantonCallEndInvestorInviteCancel.class.equals(Float.class) + || CantonCallEndInvestorInviteCancel.class.equals(Double.class) + || CantonCallEndInvestorInviteCancel.class.equals(Boolean.class) + || CantonCallEndInvestorInviteCancel.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((CantonCallEndInvestorInviteCancel.class.equals(Integer.class) + || CantonCallEndInvestorInviteCancel.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((CantonCallEndInvestorInviteCancel.class.equals(Float.class) + || CantonCallEndInvestorInviteCancel.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (CantonCallEndInvestorInviteCancel.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (CantonCallEndInvestorInviteCancel.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(CantonCallEndInvestorInviteCancel.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 'CantonCallEndInvestorInviteCancel'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'CantonCallEndInvestorInviteCancel'", + e); + } + + // deserialize CantonCallEndInvestorOffboard + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CantonCallEndInvestorOffboard.class.equals(Integer.class) + || CantonCallEndInvestorOffboard.class.equals(Long.class) + || CantonCallEndInvestorOffboard.class.equals(Float.class) + || CantonCallEndInvestorOffboard.class.equals(Double.class) + || CantonCallEndInvestorOffboard.class.equals(Boolean.class) + || CantonCallEndInvestorOffboard.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((CantonCallEndInvestorOffboard.class.equals(Integer.class) + || CantonCallEndInvestorOffboard.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((CantonCallEndInvestorOffboard.class.equals(Float.class) + || CantonCallEndInvestorOffboard.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (CantonCallEndInvestorOffboard.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (CantonCallEndInvestorOffboard.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(CantonCallEndInvestorOffboard.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 'CantonCallEndInvestorOffboard'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'CantonCallEndInvestorOffboard'", + e); + } + + // deserialize CantonCallParticipantOnboarding + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CantonCallParticipantOnboarding.class.equals(Integer.class) + || CantonCallParticipantOnboarding.class.equals(Long.class) + || CantonCallParticipantOnboarding.class.equals(Float.class) + || CantonCallParticipantOnboarding.class.equals(Double.class) + || CantonCallParticipantOnboarding.class.equals(Boolean.class) + || CantonCallParticipantOnboarding.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((CantonCallParticipantOnboarding.class.equals(Integer.class) + || CantonCallParticipantOnboarding.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((CantonCallParticipantOnboarding.class.equals(Float.class) + || CantonCallParticipantOnboarding.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (CantonCallParticipantOnboarding.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (CantonCallParticipantOnboarding.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(CantonCallParticipantOnboarding.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 'CantonCallParticipantOnboarding'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'CantonCallParticipantOnboarding'", + e); + } + + // deserialize CantonCallTransferWithdraw + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CantonCallTransferWithdraw.class.equals(Integer.class) + || CantonCallTransferWithdraw.class.equals(Long.class) + || CantonCallTransferWithdraw.class.equals(Float.class) + || CantonCallTransferWithdraw.class.equals(Double.class) + || CantonCallTransferWithdraw.class.equals(Boolean.class) + || CantonCallTransferWithdraw.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((CantonCallTransferWithdraw.class.equals(Integer.class) + || CantonCallTransferWithdraw.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((CantonCallTransferWithdraw.class.equals(Float.class) + || CantonCallTransferWithdraw.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (CantonCallTransferWithdraw.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (CantonCallTransferWithdraw.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(CantonCallTransferWithdraw.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 'CantonCallTransferWithdraw'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'CantonCallTransferWithdraw'", + e); + } + + if (match == 1) { + CantonCall ret = new CantonCall(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for CantonCall: %d classes match result," + + " expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public CantonCall getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "CantonCall cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public CantonCall() { + super("oneOf", Boolean.FALSE); + } + + public CantonCall(CantonCallAllocationWithdraw o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CantonCall(CantonCallAllowListAdd o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CantonCall(CantonCallAllowListRemove o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CantonCall(CantonCallEndInvestorInvite o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CantonCall(CantonCallEndInvestorInviteCancel o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CantonCall(CantonCallEndInvestorOffboard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CantonCall(CantonCallParticipantOnboarding o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CantonCall(CantonCallTransferWithdraw o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("CantonCallAllocationWithdraw", CantonCallAllocationWithdraw.class); + schemas.put("CantonCallAllowListAdd", CantonCallAllowListAdd.class); + schemas.put("CantonCallAllowListRemove", CantonCallAllowListRemove.class); + schemas.put("CantonCallEndInvestorInvite", CantonCallEndInvestorInvite.class); + schemas.put("CantonCallEndInvestorInviteCancel", CantonCallEndInvestorInviteCancel.class); + schemas.put("CantonCallEndInvestorOffboard", CantonCallEndInvestorOffboard.class); + schemas.put("CantonCallParticipantOnboarding", CantonCallParticipantOnboarding.class); + schemas.put("CantonCallTransferWithdraw", CantonCallTransferWithdraw.class); + JSON.registerDescendants(CantonCall.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ALLOCATION_WITHDRAW", CantonCallAllocationWithdraw.class); + mappings.put("DTCC_ALLOW_LIST_ADD", CantonCallAllowListAdd.class); + mappings.put("DTCC_ALLOW_LIST_REMOVE", CantonCallAllowListRemove.class); + mappings.put("DTCC_END_INVESTOR_INVITE", CantonCallEndInvestorInvite.class); + mappings.put("DTCC_END_INVESTOR_INVITE_CANCEL", CantonCallEndInvestorInviteCancel.class); + mappings.put("DTCC_END_INVESTOR_OFFBOARD", CantonCallEndInvestorOffboard.class); + mappings.put("DTCC_PARTICIPANT_ONBOARDING", CantonCallParticipantOnboarding.class); + mappings.put("TRANSFER_WITHDRAW", CantonCallTransferWithdraw.class); + mappings.put("CantonCallAllocationWithdraw", CantonCallAllocationWithdraw.class); + mappings.put("CantonCallAllowListAdd", CantonCallAllowListAdd.class); + mappings.put("CantonCallAllowListRemove", CantonCallAllowListRemove.class); + mappings.put("CantonCallEndInvestorInvite", CantonCallEndInvestorInvite.class); + mappings.put("CantonCallEndInvestorInviteCancel", CantonCallEndInvestorInviteCancel.class); + mappings.put("CantonCallEndInvestorOffboard", CantonCallEndInvestorOffboard.class); + mappings.put("CantonCallParticipantOnboarding", CantonCallParticipantOnboarding.class); + mappings.put("CantonCallTransferWithdraw", CantonCallTransferWithdraw.class); + mappings.put("CantonCall", CantonCall.class); + JSON.registerDiscriminator(CantonCall.class, "type", mappings); + } + + @Override + public Map> getSchemas() { + return CantonCall.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: CantonCallAllocationWithdraw, CantonCallAllowListAdd, + * CantonCallAllowListRemove, CantonCallEndInvestorInvite, CantonCallEndInvestorInviteCancel, + * CantonCallEndInvestorOffboard, CantonCallParticipantOnboarding, CantonCallTransferWithdraw + * + *

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( + CantonCallAllocationWithdraw.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CantonCallAllowListAdd.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CantonCallAllowListRemove.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + CantonCallEndInvestorInvite.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + CantonCallEndInvestorInviteCancel.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + CantonCallEndInvestorOffboard.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + CantonCallParticipantOnboarding.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + CantonCallTransferWithdraw.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be CantonCallAllocationWithdraw," + + " CantonCallAllowListAdd, CantonCallAllowListRemove," + + " CantonCallEndInvestorInvite, CantonCallEndInvestorInviteCancel," + + " CantonCallEndInvestorOffboard, CantonCallParticipantOnboarding," + + " CantonCallTransferWithdraw"); + } + + /** + * Get the actual instance, which can be the following: CantonCallAllocationWithdraw, + * CantonCallAllowListAdd, CantonCallAllowListRemove, CantonCallEndInvestorInvite, + * CantonCallEndInvestorInviteCancel, CantonCallEndInvestorOffboard, + * CantonCallParticipantOnboarding, CantonCallTransferWithdraw + * + * @return The actual instance (CantonCallAllocationWithdraw, CantonCallAllowListAdd, + * CantonCallAllowListRemove, CantonCallEndInvestorInvite, + * CantonCallEndInvestorInviteCancel, CantonCallEndInvestorOffboard, + * CantonCallParticipantOnboarding, CantonCallTransferWithdraw) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `CantonCallAllocationWithdraw`. If the actual instance is not + * `CantonCallAllocationWithdraw`, the ClassCastException will be thrown. + * + * @return The actual instance of `CantonCallAllocationWithdraw` + * @throws ClassCastException if the instance is not `CantonCallAllocationWithdraw` + */ + public CantonCallAllocationWithdraw getCantonCallAllocationWithdraw() + throws ClassCastException { + return (CantonCallAllocationWithdraw) super.getActualInstance(); + } + + /** + * Get the actual instance of `CantonCallAllowListAdd`. If the actual instance is not + * `CantonCallAllowListAdd`, the ClassCastException will be thrown. + * + * @return The actual instance of `CantonCallAllowListAdd` + * @throws ClassCastException if the instance is not `CantonCallAllowListAdd` + */ + public CantonCallAllowListAdd getCantonCallAllowListAdd() throws ClassCastException { + return (CantonCallAllowListAdd) super.getActualInstance(); + } + + /** + * Get the actual instance of `CantonCallAllowListRemove`. If the actual instance is not + * `CantonCallAllowListRemove`, the ClassCastException will be thrown. + * + * @return The actual instance of `CantonCallAllowListRemove` + * @throws ClassCastException if the instance is not `CantonCallAllowListRemove` + */ + public CantonCallAllowListRemove getCantonCallAllowListRemove() throws ClassCastException { + return (CantonCallAllowListRemove) super.getActualInstance(); + } + + /** + * Get the actual instance of `CantonCallEndInvestorInvite`. If the actual instance is not + * `CantonCallEndInvestorInvite`, the ClassCastException will be thrown. + * + * @return The actual instance of `CantonCallEndInvestorInvite` + * @throws ClassCastException if the instance is not `CantonCallEndInvestorInvite` + */ + public CantonCallEndInvestorInvite getCantonCallEndInvestorInvite() throws ClassCastException { + return (CantonCallEndInvestorInvite) super.getActualInstance(); + } + + /** + * Get the actual instance of `CantonCallEndInvestorInviteCancel`. If the actual instance is not + * `CantonCallEndInvestorInviteCancel`, the ClassCastException will be thrown. + * + * @return The actual instance of `CantonCallEndInvestorInviteCancel` + * @throws ClassCastException if the instance is not `CantonCallEndInvestorInviteCancel` + */ + public CantonCallEndInvestorInviteCancel getCantonCallEndInvestorInviteCancel() + throws ClassCastException { + return (CantonCallEndInvestorInviteCancel) super.getActualInstance(); + } + + /** + * Get the actual instance of `CantonCallEndInvestorOffboard`. If the actual instance is not + * `CantonCallEndInvestorOffboard`, the ClassCastException will be thrown. + * + * @return The actual instance of `CantonCallEndInvestorOffboard` + * @throws ClassCastException if the instance is not `CantonCallEndInvestorOffboard` + */ + public CantonCallEndInvestorOffboard getCantonCallEndInvestorOffboard() + throws ClassCastException { + return (CantonCallEndInvestorOffboard) super.getActualInstance(); + } + + /** + * Get the actual instance of `CantonCallParticipantOnboarding`. If the actual instance is not + * `CantonCallParticipantOnboarding`, the ClassCastException will be thrown. + * + * @return The actual instance of `CantonCallParticipantOnboarding` + * @throws ClassCastException if the instance is not `CantonCallParticipantOnboarding` + */ + public CantonCallParticipantOnboarding getCantonCallParticipantOnboarding() + throws ClassCastException { + return (CantonCallParticipantOnboarding) super.getActualInstance(); + } + + /** + * Get the actual instance of `CantonCallTransferWithdraw`. If the actual instance is not + * `CantonCallTransferWithdraw`, the ClassCastException will be thrown. + * + * @return The actual instance of `CantonCallTransferWithdraw` + * @throws ClassCastException if the instance is not `CantonCallTransferWithdraw` + */ + public CantonCallTransferWithdraw getCantonCallTransferWithdraw() throws ClassCastException { + return (CantonCallTransferWithdraw) 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 CantonCallParticipantOnboarding) { + if (getActualInstance() != null) { + joiner.add( + ((CantonCallParticipantOnboarding) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CantonCallEndInvestorInvite) { + if (getActualInstance() != null) { + joiner.add( + ((CantonCallEndInvestorInvite) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CantonCallEndInvestorInviteCancel) { + if (getActualInstance() != null) { + joiner.add( + ((CantonCallEndInvestorInviteCancel) getActualInstance()) + .toUrlQueryString(prefix + "one_of_2" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CantonCallEndInvestorOffboard) { + if (getActualInstance() != null) { + joiner.add( + ((CantonCallEndInvestorOffboard) getActualInstance()) + .toUrlQueryString(prefix + "one_of_3" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CantonCallAllowListAdd) { + if (getActualInstance() != null) { + joiner.add( + ((CantonCallAllowListAdd) getActualInstance()) + .toUrlQueryString(prefix + "one_of_4" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CantonCallAllowListRemove) { + if (getActualInstance() != null) { + joiner.add( + ((CantonCallAllowListRemove) getActualInstance()) + .toUrlQueryString(prefix + "one_of_5" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CantonCallAllocationWithdraw) { + if (getActualInstance() != null) { + joiner.add( + ((CantonCallAllocationWithdraw) getActualInstance()) + .toUrlQueryString(prefix + "one_of_6" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CantonCallTransferWithdraw) { + if (getActualInstance() != null) { + joiner.add( + ((CantonCallTransferWithdraw) getActualInstance()) + .toUrlQueryString(prefix + "one_of_7" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CantonCallAllocationWithdraw.java b/src/main/java/com/fireblocks/sdk/model/CantonCallAllocationWithdraw.java new file mode 100644 index 00000000..00843d00 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CantonCallAllocationWithdraw.java @@ -0,0 +1,219 @@ +/* + * 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; + +/** CantonCallAllocationWithdraw */ +@JsonPropertyOrder({ + CantonCallAllocationWithdraw.JSON_PROPERTY_TYPE, + CantonCallAllocationWithdraw.JSON_PROPERTY_PAYLOAD +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class CantonCallAllocationWithdraw { + /** Which call to make. Selects the shape of `payload`. */ + public enum TypeEnum { + ALLOCATION_WITHDRAW(String.valueOf("ALLOCATION_WITHDRAW")); + + 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; + + public static final String JSON_PROPERTY_PAYLOAD = "payload"; + @jakarta.annotation.Nonnull private AllocationWithdrawPayload payload; + + public CantonCallAllocationWithdraw() {} + + @JsonCreator + public CantonCallAllocationWithdraw( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_PAYLOAD, required = true) + AllocationWithdrawPayload payload) { + this.type = type; + this.payload = payload; + } + + public CantonCallAllocationWithdraw type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Which call to make. Selects the shape of `payload`. + * + * @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 CantonCallAllocationWithdraw payload( + @jakarta.annotation.Nonnull AllocationWithdrawPayload payload) { + this.payload = payload; + return this; + } + + /** + * Get payload + * + * @return payload + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AllocationWithdrawPayload getPayload() { + return payload; + } + + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPayload(@jakarta.annotation.Nonnull AllocationWithdrawPayload payload) { + this.payload = payload; + } + + /** Return true if this CantonCallAllocationWithdraw object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CantonCallAllocationWithdraw cantonCallAllocationWithdraw = + (CantonCallAllocationWithdraw) o; + return Objects.equals(this.type, cantonCallAllocationWithdraw.type) + && Objects.equals(this.payload, cantonCallAllocationWithdraw.payload); + } + + @Override + public int hashCode() { + return Objects.hash(type, payload); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CantonCallAllocationWithdraw {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" payload: ").append(toIndentedString(payload)).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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `payload` to the URL query string + if (getPayload() != null) { + joiner.add(getPayload().toUrlQueryString(prefix + "payload" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CantonCallAllowListAdd.java b/src/main/java/com/fireblocks/sdk/model/CantonCallAllowListAdd.java new file mode 100644 index 00000000..5e5469f5 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CantonCallAllowListAdd.java @@ -0,0 +1,217 @@ +/* + * 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; + +/** CantonCallAllowListAdd */ +@JsonPropertyOrder({ + CantonCallAllowListAdd.JSON_PROPERTY_TYPE, + CantonCallAllowListAdd.JSON_PROPERTY_PAYLOAD +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class CantonCallAllowListAdd { + /** Which call to make. Selects the shape of `payload`. */ + public enum TypeEnum { + DTCC_ALLOW_LIST_ADD(String.valueOf("DTCC_ALLOW_LIST_ADD")); + + 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; + + public static final String JSON_PROPERTY_PAYLOAD = "payload"; + @jakarta.annotation.Nonnull private AllowListPayload payload; + + public CantonCallAllowListAdd() {} + + @JsonCreator + public CantonCallAllowListAdd( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_PAYLOAD, required = true) + AllowListPayload payload) { + this.type = type; + this.payload = payload; + } + + public CantonCallAllowListAdd type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Which call to make. Selects the shape of `payload`. + * + * @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 CantonCallAllowListAdd payload(@jakarta.annotation.Nonnull AllowListPayload payload) { + this.payload = payload; + return this; + } + + /** + * Get payload + * + * @return payload + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AllowListPayload getPayload() { + return payload; + } + + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPayload(@jakarta.annotation.Nonnull AllowListPayload payload) { + this.payload = payload; + } + + /** Return true if this CantonCallAllowListAdd object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CantonCallAllowListAdd cantonCallAllowListAdd = (CantonCallAllowListAdd) o; + return Objects.equals(this.type, cantonCallAllowListAdd.type) + && Objects.equals(this.payload, cantonCallAllowListAdd.payload); + } + + @Override + public int hashCode() { + return Objects.hash(type, payload); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CantonCallAllowListAdd {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" payload: ").append(toIndentedString(payload)).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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `payload` to the URL query string + if (getPayload() != null) { + joiner.add(getPayload().toUrlQueryString(prefix + "payload" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CantonCallAllowListRemove.java b/src/main/java/com/fireblocks/sdk/model/CantonCallAllowListRemove.java new file mode 100644 index 00000000..05c4a9c9 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CantonCallAllowListRemove.java @@ -0,0 +1,217 @@ +/* + * 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; + +/** CantonCallAllowListRemove */ +@JsonPropertyOrder({ + CantonCallAllowListRemove.JSON_PROPERTY_TYPE, + CantonCallAllowListRemove.JSON_PROPERTY_PAYLOAD +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class CantonCallAllowListRemove { + /** Which call to make. Selects the shape of `payload`. */ + public enum TypeEnum { + DTCC_ALLOW_LIST_REMOVE(String.valueOf("DTCC_ALLOW_LIST_REMOVE")); + + 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; + + public static final String JSON_PROPERTY_PAYLOAD = "payload"; + @jakarta.annotation.Nonnull private AllowListPayload payload; + + public CantonCallAllowListRemove() {} + + @JsonCreator + public CantonCallAllowListRemove( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_PAYLOAD, required = true) + AllowListPayload payload) { + this.type = type; + this.payload = payload; + } + + public CantonCallAllowListRemove type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Which call to make. Selects the shape of `payload`. + * + * @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 CantonCallAllowListRemove payload(@jakarta.annotation.Nonnull AllowListPayload payload) { + this.payload = payload; + return this; + } + + /** + * Get payload + * + * @return payload + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AllowListPayload getPayload() { + return payload; + } + + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPayload(@jakarta.annotation.Nonnull AllowListPayload payload) { + this.payload = payload; + } + + /** Return true if this CantonCallAllowListRemove object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CantonCallAllowListRemove cantonCallAllowListRemove = (CantonCallAllowListRemove) o; + return Objects.equals(this.type, cantonCallAllowListRemove.type) + && Objects.equals(this.payload, cantonCallAllowListRemove.payload); + } + + @Override + public int hashCode() { + return Objects.hash(type, payload); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CantonCallAllowListRemove {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" payload: ").append(toIndentedString(payload)).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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `payload` to the URL query string + if (getPayload() != null) { + joiner.add(getPayload().toUrlQueryString(prefix + "payload" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorInvite.java b/src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorInvite.java new file mode 100644 index 00000000..6d4a26d8 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorInvite.java @@ -0,0 +1,218 @@ +/* + * 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; + +/** CantonCallEndInvestorInvite */ +@JsonPropertyOrder({ + CantonCallEndInvestorInvite.JSON_PROPERTY_TYPE, + CantonCallEndInvestorInvite.JSON_PROPERTY_PAYLOAD +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class CantonCallEndInvestorInvite { + /** Which call to make. Selects the shape of `payload`. */ + public enum TypeEnum { + DTCC_END_INVESTOR_INVITE(String.valueOf("DTCC_END_INVESTOR_INVITE")); + + 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; + + public static final String JSON_PROPERTY_PAYLOAD = "payload"; + @jakarta.annotation.Nonnull private EndInvestorPayload payload; + + public CantonCallEndInvestorInvite() {} + + @JsonCreator + public CantonCallEndInvestorInvite( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_PAYLOAD, required = true) + EndInvestorPayload payload) { + this.type = type; + this.payload = payload; + } + + public CantonCallEndInvestorInvite type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Which call to make. Selects the shape of `payload`. + * + * @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 CantonCallEndInvestorInvite payload( + @jakarta.annotation.Nonnull EndInvestorPayload payload) { + this.payload = payload; + return this; + } + + /** + * Get payload + * + * @return payload + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EndInvestorPayload getPayload() { + return payload; + } + + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPayload(@jakarta.annotation.Nonnull EndInvestorPayload payload) { + this.payload = payload; + } + + /** Return true if this CantonCallEndInvestorInvite object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CantonCallEndInvestorInvite cantonCallEndInvestorInvite = (CantonCallEndInvestorInvite) o; + return Objects.equals(this.type, cantonCallEndInvestorInvite.type) + && Objects.equals(this.payload, cantonCallEndInvestorInvite.payload); + } + + @Override + public int hashCode() { + return Objects.hash(type, payload); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CantonCallEndInvestorInvite {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" payload: ").append(toIndentedString(payload)).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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `payload` to the URL query string + if (getPayload() != null) { + joiner.add(getPayload().toUrlQueryString(prefix + "payload" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorInviteCancel.java b/src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorInviteCancel.java new file mode 100644 index 00000000..9d5c9557 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorInviteCancel.java @@ -0,0 +1,219 @@ +/* + * 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; + +/** CantonCallEndInvestorInviteCancel */ +@JsonPropertyOrder({ + CantonCallEndInvestorInviteCancel.JSON_PROPERTY_TYPE, + CantonCallEndInvestorInviteCancel.JSON_PROPERTY_PAYLOAD +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class CantonCallEndInvestorInviteCancel { + /** Which call to make. Selects the shape of `payload`. */ + public enum TypeEnum { + DTCC_END_INVESTOR_INVITE_CANCEL(String.valueOf("DTCC_END_INVESTOR_INVITE_CANCEL")); + + 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; + + public static final String JSON_PROPERTY_PAYLOAD = "payload"; + @jakarta.annotation.Nonnull private EndInvestorPayload payload; + + public CantonCallEndInvestorInviteCancel() {} + + @JsonCreator + public CantonCallEndInvestorInviteCancel( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_PAYLOAD, required = true) + EndInvestorPayload payload) { + this.type = type; + this.payload = payload; + } + + public CantonCallEndInvestorInviteCancel type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Which call to make. Selects the shape of `payload`. + * + * @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 CantonCallEndInvestorInviteCancel payload( + @jakarta.annotation.Nonnull EndInvestorPayload payload) { + this.payload = payload; + return this; + } + + /** + * Get payload + * + * @return payload + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EndInvestorPayload getPayload() { + return payload; + } + + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPayload(@jakarta.annotation.Nonnull EndInvestorPayload payload) { + this.payload = payload; + } + + /** Return true if this CantonCallEndInvestorInviteCancel object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CantonCallEndInvestorInviteCancel cantonCallEndInvestorInviteCancel = + (CantonCallEndInvestorInviteCancel) o; + return Objects.equals(this.type, cantonCallEndInvestorInviteCancel.type) + && Objects.equals(this.payload, cantonCallEndInvestorInviteCancel.payload); + } + + @Override + public int hashCode() { + return Objects.hash(type, payload); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CantonCallEndInvestorInviteCancel {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" payload: ").append(toIndentedString(payload)).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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `payload` to the URL query string + if (getPayload() != null) { + joiner.add(getPayload().toUrlQueryString(prefix + "payload" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorOffboard.java b/src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorOffboard.java new file mode 100644 index 00000000..6f7b887b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorOffboard.java @@ -0,0 +1,219 @@ +/* + * 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; + +/** CantonCallEndInvestorOffboard */ +@JsonPropertyOrder({ + CantonCallEndInvestorOffboard.JSON_PROPERTY_TYPE, + CantonCallEndInvestorOffboard.JSON_PROPERTY_PAYLOAD +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class CantonCallEndInvestorOffboard { + /** Which call to make. Selects the shape of `payload`. */ + public enum TypeEnum { + DTCC_END_INVESTOR_OFFBOARD(String.valueOf("DTCC_END_INVESTOR_OFFBOARD")); + + 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; + + public static final String JSON_PROPERTY_PAYLOAD = "payload"; + @jakarta.annotation.Nonnull private EndInvestorPayload payload; + + public CantonCallEndInvestorOffboard() {} + + @JsonCreator + public CantonCallEndInvestorOffboard( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_PAYLOAD, required = true) + EndInvestorPayload payload) { + this.type = type; + this.payload = payload; + } + + public CantonCallEndInvestorOffboard type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Which call to make. Selects the shape of `payload`. + * + * @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 CantonCallEndInvestorOffboard payload( + @jakarta.annotation.Nonnull EndInvestorPayload payload) { + this.payload = payload; + return this; + } + + /** + * Get payload + * + * @return payload + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EndInvestorPayload getPayload() { + return payload; + } + + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPayload(@jakarta.annotation.Nonnull EndInvestorPayload payload) { + this.payload = payload; + } + + /** Return true if this CantonCallEndInvestorOffboard object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CantonCallEndInvestorOffboard cantonCallEndInvestorOffboard = + (CantonCallEndInvestorOffboard) o; + return Objects.equals(this.type, cantonCallEndInvestorOffboard.type) + && Objects.equals(this.payload, cantonCallEndInvestorOffboard.payload); + } + + @Override + public int hashCode() { + return Objects.hash(type, payload); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CantonCallEndInvestorOffboard {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" payload: ").append(toIndentedString(payload)).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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `payload` to the URL query string + if (getPayload() != null) { + joiner.add(getPayload().toUrlQueryString(prefix + "payload" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CantonCallParticipantOnboarding.java b/src/main/java/com/fireblocks/sdk/model/CantonCallParticipantOnboarding.java new file mode 100644 index 00000000..eebd0bbd --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CantonCallParticipantOnboarding.java @@ -0,0 +1,219 @@ +/* + * 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; + +/** CantonCallParticipantOnboarding */ +@JsonPropertyOrder({ + CantonCallParticipantOnboarding.JSON_PROPERTY_TYPE, + CantonCallParticipantOnboarding.JSON_PROPERTY_PAYLOAD +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class CantonCallParticipantOnboarding { + /** Which call to make. Selects the shape of `payload`. */ + public enum TypeEnum { + DTCC_PARTICIPANT_ONBOARDING(String.valueOf("DTCC_PARTICIPANT_ONBOARDING")); + + 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; + + public static final String JSON_PROPERTY_PAYLOAD = "payload"; + @jakarta.annotation.Nonnull private ParticipantOnboardingPayload payload; + + public CantonCallParticipantOnboarding() {} + + @JsonCreator + public CantonCallParticipantOnboarding( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_PAYLOAD, required = true) + ParticipantOnboardingPayload payload) { + this.type = type; + this.payload = payload; + } + + public CantonCallParticipantOnboarding type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Which call to make. Selects the shape of `payload`. + * + * @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 CantonCallParticipantOnboarding payload( + @jakarta.annotation.Nonnull ParticipantOnboardingPayload payload) { + this.payload = payload; + return this; + } + + /** + * Get payload + * + * @return payload + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ParticipantOnboardingPayload getPayload() { + return payload; + } + + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPayload(@jakarta.annotation.Nonnull ParticipantOnboardingPayload payload) { + this.payload = payload; + } + + /** Return true if this CantonCallParticipantOnboarding object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CantonCallParticipantOnboarding cantonCallParticipantOnboarding = + (CantonCallParticipantOnboarding) o; + return Objects.equals(this.type, cantonCallParticipantOnboarding.type) + && Objects.equals(this.payload, cantonCallParticipantOnboarding.payload); + } + + @Override + public int hashCode() { + return Objects.hash(type, payload); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CantonCallParticipantOnboarding {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" payload: ").append(toIndentedString(payload)).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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `payload` to the URL query string + if (getPayload() != null) { + joiner.add(getPayload().toUrlQueryString(prefix + "payload" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CantonCallTransferWithdraw.java b/src/main/java/com/fireblocks/sdk/model/CantonCallTransferWithdraw.java new file mode 100644 index 00000000..c305a1a8 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CantonCallTransferWithdraw.java @@ -0,0 +1,218 @@ +/* + * 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; + +/** CantonCallTransferWithdraw */ +@JsonPropertyOrder({ + CantonCallTransferWithdraw.JSON_PROPERTY_TYPE, + CantonCallTransferWithdraw.JSON_PROPERTY_PAYLOAD +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class CantonCallTransferWithdraw { + /** Which call to make. Selects the shape of `payload`. */ + public enum TypeEnum { + TRANSFER_WITHDRAW(String.valueOf("TRANSFER_WITHDRAW")); + + 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; + + public static final String JSON_PROPERTY_PAYLOAD = "payload"; + @jakarta.annotation.Nonnull private TransferWithdrawPayload payload; + + public CantonCallTransferWithdraw() {} + + @JsonCreator + public CantonCallTransferWithdraw( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_PAYLOAD, required = true) + TransferWithdrawPayload payload) { + this.type = type; + this.payload = payload; + } + + public CantonCallTransferWithdraw type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Which call to make. Selects the shape of `payload`. + * + * @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 CantonCallTransferWithdraw payload( + @jakarta.annotation.Nonnull TransferWithdrawPayload payload) { + this.payload = payload; + return this; + } + + /** + * Get payload + * + * @return payload + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TransferWithdrawPayload getPayload() { + return payload; + } + + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPayload(@jakarta.annotation.Nonnull TransferWithdrawPayload payload) { + this.payload = payload; + } + + /** Return true if this CantonCallTransferWithdraw object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CantonCallTransferWithdraw cantonCallTransferWithdraw = (CantonCallTransferWithdraw) o; + return Objects.equals(this.type, cantonCallTransferWithdraw.type) + && Objects.equals(this.payload, cantonCallTransferWithdraw.payload); + } + + @Override + public int hashCode() { + return Objects.hash(type, payload); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CantonCallTransferWithdraw {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" payload: ").append(toIndentedString(payload)).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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `payload` to the URL query string + if (getPayload() != null) { + joiner.add(getPayload().toUrlQueryString(prefix + "payload" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CreateWebhookOAuthRequest.java b/src/main/java/com/fireblocks/sdk/model/CreateWebhookOAuthRequest.java new file mode 100644 index 00000000..c24ae20b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CreateWebhookOAuthRequest.java @@ -0,0 +1,571 @@ +/* + * 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.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.StringJoiner; + +/** + * A new reusable OAuth 2.0 client credential set. Attach it to a webhook by passing the returned id + * as that webhook's `webhookOauthId`. Several webhooks may share one credential set, + * so rotating its client secret covers all of them at once. + */ +@JsonPropertyOrder({ + CreateWebhookOAuthRequest.JSON_PROPERTY_NAME, + CreateWebhookOAuthRequest.JSON_PROPERTY_CLIENT_ID, + CreateWebhookOAuthRequest.JSON_PROPERTY_CLIENT_SECRET, + CreateWebhookOAuthRequest.JSON_PROPERTY_URL, + CreateWebhookOAuthRequest.JSON_PROPERTY_AUTH_METHOD, + CreateWebhookOAuthRequest.JSON_PROPERTY_CUSTOM_JWT_CLAIMS, + CreateWebhookOAuthRequest.JSON_PROPERTY_CUSTOM_BODY_PARAMS, + CreateWebhookOAuthRequest.JSON_PROPERTY_CUSTOM_HEADERS, + CreateWebhookOAuthRequest.JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class CreateWebhookOAuthRequest { + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull private String name; + + public static final String JSON_PROPERTY_CLIENT_ID = "clientId"; + @jakarta.annotation.Nonnull private String clientId; + + public static final String JSON_PROPERTY_CLIENT_SECRET = "clientSecret"; + @jakarta.annotation.Nonnull private String clientSecret; + + public static final String JSON_PROPERTY_URL = "url"; + @jakarta.annotation.Nonnull private String url; + + public static final String JSON_PROPERTY_AUTH_METHOD = "authMethod"; + @jakarta.annotation.Nullable private String authMethod = "client_secret_basic"; + + public static final String JSON_PROPERTY_CUSTOM_JWT_CLAIMS = "customJwtClaims"; + @jakarta.annotation.Nullable private Map customJwtClaims; + + public static final String JSON_PROPERTY_CUSTOM_BODY_PARAMS = "customBodyParams"; + @jakarta.annotation.Nullable private Map customBodyParams; + + public static final String JSON_PROPERTY_CUSTOM_HEADERS = "customHeaders"; + @jakarta.annotation.Nullable private Map customHeaders; + + public static final String JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT = "mtlsClientSignedCert"; + @jakarta.annotation.Nullable private String mtlsClientSignedCert; + + public CreateWebhookOAuthRequest() {} + + @JsonCreator + public CreateWebhookOAuthRequest( + @JsonProperty(value = JSON_PROPERTY_NAME, required = true) String name, + @JsonProperty(value = JSON_PROPERTY_CLIENT_ID, required = true) String clientId, + @JsonProperty(value = JSON_PROPERTY_CLIENT_SECRET, required = true) String clientSecret, + @JsonProperty(value = JSON_PROPERTY_URL, required = true) String url) { + this.name = name; + this.clientId = clientId; + this.clientSecret = clientSecret; + this.url = url; + } + + public CreateWebhookOAuthRequest name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * A label for this credential set, shown when listing them. + * + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + public CreateWebhookOAuthRequest clientId(@jakarta.annotation.Nonnull String clientId) { + this.clientId = clientId; + return this; + } + + /** + * OAuth client ID used to authenticate with the token endpoint. + * + * @return clientId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getClientId() { + return clientId; + } + + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setClientId(@jakarta.annotation.Nonnull String clientId) { + this.clientId = clientId; + } + + public CreateWebhookOAuthRequest clientSecret(@jakarta.annotation.Nonnull String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * OAuth client secret. Write-only — never returned. Limited to 480 bytes UTF-8 encoded. With + * `client_secret_jwt` it signs the assertion rather than being sent. + * + * @return clientSecret + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getClientSecret() { + return clientSecret; + } + + @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setClientSecret(@jakarta.annotation.Nonnull String clientSecret) { + this.clientSecret = clientSecret; + } + + public CreateWebhookOAuthRequest url(@jakarta.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * Token endpoint URL. HTTPS on port 443 only, and the host must resolve publicly — localhost + * and private, link-local or loopback addresses are rejected. + * + * @return url + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUrl() { + return url; + } + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUrl(@jakarta.annotation.Nonnull String url) { + this.url = url; + } + + public CreateWebhookOAuthRequest authMethod(@jakarta.annotation.Nullable String authMethod) { + this.authMethod = authMethod; + return this; + } + + /** + * How the client credentials reach the token endpoint. `client_secret_basic` uses an + * HTTP Basic header, `client_secret_post` uses form fields in the body, and + * `client_secret_jwt` sends a JWT assertion signed with the secret, so the secret + * itself is never transmitted. Defaults to `client_secret_basic`. + * + * @return authMethod + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTH_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAuthMethod() { + return authMethod; + } + + @JsonProperty(JSON_PROPERTY_AUTH_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAuthMethod(@jakarta.annotation.Nullable String authMethod) { + this.authMethod = authMethod; + } + + public CreateWebhookOAuthRequest customJwtClaims( + @jakarta.annotation.Nullable Map customJwtClaims) { + this.customJwtClaims = customJwtClaims; + return this; + } + + public CreateWebhookOAuthRequest putCustomJwtClaimsItem( + String key, Object customJwtClaimsItem) { + if (this.customJwtClaims == null) { + this.customJwtClaims = new HashMap<>(); + } + this.customJwtClaims.put(key, customJwtClaimsItem); + return this; + } + + /** + * Extra claims for the JWT assertion. Used only when `authMethod` is + * `client_secret_jwt`. The usual one to set is `aud`, which defaults to the + * token endpoint URL; some authorization servers expect their own identifier instead. A value + * may be any JSON type except `null` — `null` is reserved for deleting a + * claim on update. `iss`, `sub`, `jti`, `iat` and + * `exp` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The + * whole object must be under 16 KB. Values are write-only; responses return only the claim + * names. On update this merges claim by claim rather than replacing — see + * `WebhookOAuthCustomJwtClaimsUpdate`. + * + * @return customJwtClaims + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_JWT_CLAIMS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCustomJwtClaims() { + return customJwtClaims; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_JWT_CLAIMS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomJwtClaims( + @jakarta.annotation.Nullable Map customJwtClaims) { + this.customJwtClaims = customJwtClaims; + } + + public CreateWebhookOAuthRequest customBodyParams( + @jakarta.annotation.Nullable Map customBodyParams) { + this.customBodyParams = customBodyParams; + return this; + } + + public CreateWebhookOAuthRequest putCustomBodyParamsItem( + String key, String customBodyParamsItem) { + if (this.customBodyParams == null) { + this.customBodyParams = new HashMap<>(); + } + this.customBodyParams.put(key, customBodyParamsItem); + return this; + } + + /** + * Extra parameters for the token request body — `scope` most commonly, sometimes + * `audience` or `resource`. Applies to every authentication method. Values + * must be strings, because the token request body is form-encoded rather than JSON. An empty + * string is allowed. `grant_type`, `client_id`, `client_secret`, + * `client_assertion` and `client_assertion_type` are set by Fireblocks and + * cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. Values + * are write-only; responses return only the parameter names. On update this merges key by key + * rather than replacing — see `WebhookOAuthCustomBodyParamsUpdate`. + * + * @return customBodyParams + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_BODY_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getCustomBodyParams() { + return customBodyParams; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_BODY_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomBodyParams( + @jakarta.annotation.Nullable Map customBodyParams) { + this.customBodyParams = customBodyParams; + } + + public CreateWebhookOAuthRequest customHeaders( + @jakarta.annotation.Nullable Map customHeaders) { + this.customHeaders = customHeaders; + return this; + } + + public CreateWebhookOAuthRequest putCustomHeadersItem(String key, String customHeadersItem) { + if (this.customHeaders == null) { + this.customHeaders = new HashMap<>(); + } + this.customHeaders.put(key, customHeadersItem); + return this; + } + + /** + * Extra HTTP headers for **the token request to your authorization server** — not for the + * webhook delivery, which has its own separate `customHeaders`. A gateway API key is + * the usual case. Applies to every authentication method. Values must be strings; an empty + * string is allowed. Names are matched case-insensitively, so two names differing only in case + * are a duplicate. Names are stored and returned lowercased, so `X-Api-Key` comes + * back as `x-api-key`. `Content-Type`, `Authorization`, + * `Content-Length` and `Host` are set by Fireblocks and cannot be + * overridden. The whole object must be under 16 KB. Values are write-only; responses return + * only the header names. On update this merges name by name rather than replacing — see + * `WebhookOAuthCustomHeadersUpdate`. + * + * @return customHeaders + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_HEADERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getCustomHeaders() { + return customHeaders; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_HEADERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomHeaders(@jakarta.annotation.Nullable Map customHeaders) { + this.customHeaders = customHeaders; + } + + public CreateWebhookOAuthRequest mtlsClientSignedCert( + @jakarta.annotation.Nullable String mtlsClientSignedCert) { + this.mtlsClientSignedCert = mtlsClientSignedCert; + return this; + } + + /** + * PEM-encoded client certificate for mTLS when fetching tokens. Must be a valid X.509 + * certificate inside its validity window. + * + * @return mtlsClientSignedCert + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMtlsClientSignedCert() { + return mtlsClientSignedCert; + } + + @JsonProperty(JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMtlsClientSignedCert(@jakarta.annotation.Nullable String mtlsClientSignedCert) { + this.mtlsClientSignedCert = mtlsClientSignedCert; + } + + /** Return true if this CreateWebhookOAuthRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateWebhookOAuthRequest createWebhookOAuthRequest = (CreateWebhookOAuthRequest) o; + return Objects.equals(this.name, createWebhookOAuthRequest.name) + && Objects.equals(this.clientId, createWebhookOAuthRequest.clientId) + && Objects.equals(this.clientSecret, createWebhookOAuthRequest.clientSecret) + && Objects.equals(this.url, createWebhookOAuthRequest.url) + && Objects.equals(this.authMethod, createWebhookOAuthRequest.authMethod) + && Objects.equals(this.customJwtClaims, createWebhookOAuthRequest.customJwtClaims) + && Objects.equals(this.customBodyParams, createWebhookOAuthRequest.customBodyParams) + && Objects.equals(this.customHeaders, createWebhookOAuthRequest.customHeaders) + && Objects.equals( + this.mtlsClientSignedCert, createWebhookOAuthRequest.mtlsClientSignedCert); + } + + @Override + public int hashCode() { + return Objects.hash( + name, + clientId, + clientSecret, + url, + authMethod, + customJwtClaims, + customBodyParams, + customHeaders, + mtlsClientSignedCert); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateWebhookOAuthRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); + sb.append(" clientSecret: ").append(toIndentedString(clientSecret)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" authMethod: ").append(toIndentedString(authMethod)).append("\n"); + sb.append(" customJwtClaims: ").append(toIndentedString(customJwtClaims)).append("\n"); + sb.append(" customBodyParams: ").append(toIndentedString(customBodyParams)).append("\n"); + sb.append(" customHeaders: ").append(toIndentedString(customHeaders)).append("\n"); + sb.append(" mtlsClientSignedCert: ") + .append(toIndentedString(mtlsClientSignedCert)) + .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 `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `clientId` to the URL query string + if (getClientId() != null) { + joiner.add( + String.format( + "%sclientId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getClientId())))); + } + + // add `clientSecret` to the URL query string + if (getClientSecret() != null) { + joiner.add( + String.format( + "%sclientSecret%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getClientSecret())))); + } + + // add `url` to the URL query string + if (getUrl() != null) { + joiner.add( + String.format( + "%surl%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getUrl())))); + } + + // add `authMethod` to the URL query string + if (getAuthMethod() != null) { + joiner.add( + String.format( + "%sauthMethod%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAuthMethod())))); + } + + // add `customJwtClaims` to the URL query string + if (getCustomJwtClaims() != null) { + for (String _key : getCustomJwtClaims().keySet()) { + joiner.add( + String.format( + "%scustomJwtClaims%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, _key, containerSuffix), + getCustomJwtClaims().get(_key), + ApiClient.urlEncode( + ApiClient.valueToString(getCustomJwtClaims().get(_key))))); + } + } + + // add `customBodyParams` to the URL query string + if (getCustomBodyParams() != null) { + for (String _key : getCustomBodyParams().keySet()) { + joiner.add( + String.format( + "%scustomBodyParams%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, _key, containerSuffix), + getCustomBodyParams().get(_key), + ApiClient.urlEncode( + ApiClient.valueToString(getCustomBodyParams().get(_key))))); + } + } + + // add `customHeaders` to the URL query string + if (getCustomHeaders() != null) { + for (String _key : getCustomHeaders().keySet()) { + joiner.add( + String.format( + "%scustomHeaders%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, _key, containerSuffix), + getCustomHeaders().get(_key), + ApiClient.urlEncode( + ApiClient.valueToString(getCustomHeaders().get(_key))))); + } + } + + // add `mtlsClientSignedCert` to the URL query string + if (getMtlsClientSignedCert() != null) { + joiner.add( + String.format( + "%smtlsClientSignedCert%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getMtlsClientSignedCert())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CreateWebhookRequest.java b/src/main/java/com/fireblocks/sdk/model/CreateWebhookRequest.java index 2e1e361e..a95ca900 100644 --- a/src/main/java/com/fireblocks/sdk/model/CreateWebhookRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/CreateWebhookRequest.java @@ -58,7 +58,7 @@ public class CreateWebhookRequest { @jakarta.annotation.Nullable private WebhookOAuth oauth; public static final String JSON_PROPERTY_CUSTOM_HEADERS = "customHeaders"; - @jakarta.annotation.Nullable private Map customHeaders; + @jakarta.annotation.Nullable private Map customHeaders; public CreateWebhookRequest() {} @@ -218,12 +218,12 @@ public void setOauth(@jakarta.annotation.Nullable WebhookOAuth oauth) { } public CreateWebhookRequest customHeaders( - @jakarta.annotation.Nullable Map customHeaders) { + @jakarta.annotation.Nullable Map customHeaders) { this.customHeaders = customHeaders; return this; } - public CreateWebhookRequest putCustomHeadersItem(String key, String customHeadersItem) { + public CreateWebhookRequest putCustomHeadersItem(String key, Object customHeadersItem) { if (this.customHeaders == null) { this.customHeaders = new HashMap<>(); } @@ -232,26 +232,32 @@ public CreateWebhookRequest putCustomHeadersItem(String key, String customHeader } /** - * Custom HTTP headers attached to every notification delivered by this webhook (max 10). Header - * names must be valid RFC 7230 tokens (printable ASCII, no separators), are treated - * case-insensitively (duplicate names differing only in case are rejected), and may not exceed - * 128 characters. The following names are reserved and cannot be used: Host, Content-Type, - * Content-Length, Transfer-Encoding, Connection, User-Agent, Accept, Accept-Encoding, - * Fireblocks-Signature, Fireblocks-Webhook-Signature. Header values are write-only — never - * returned in responses. + * Custom HTTP headers attached to every notification delivered by this webhook. A value is a + * string, sent as one header line, or an array of strings, sent as one header line per element + * under the same name. `Cookie` accepts only a string. An empty array is rejected — + * leave the name out instead. At most 10 header lines in total, counted per array element + * rather than per name. Names must be valid HTTP header tokens, are case-insensitive, and are + * at most 128 characters. Values are at most 1024 characters and may be empty. Reserved names: + * `Host`, `Content-Type`, `Content-Length`, + * `Transfer-Encoding`, `Connection`, `User-Agent`, + * `Accept`, `Accept-Encoding`, `Fireblocks-Signature`, + * `Fireblocks-Webhook-Signature`, `Authorization`. + * `Authorization` is reserved whether or not this webhook has OAuth credentials + * attached, because Fireblocks sets it once it does. Values are write-only; responses return + * only the header names. * * @return customHeaders */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_HEADERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getCustomHeaders() { + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCustomHeaders() { return customHeaders; } @JsonProperty(JSON_PROPERTY_CUSTOM_HEADERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomHeaders(@jakarta.annotation.Nullable Map customHeaders) { + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomHeaders(@jakarta.annotation.Nullable Map customHeaders) { this.customHeaders = customHeaders; } diff --git a/src/main/java/com/fireblocks/sdk/model/DeleteWebhookOAuthResponse.java b/src/main/java/com/fireblocks/sdk/model/DeleteWebhookOAuthResponse.java new file mode 100644 index 00000000..41a34cc0 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DeleteWebhookOAuthResponse.java @@ -0,0 +1,696 @@ +/* + * 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.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** + * The deleted OAuth credential set, plus the ids of any webhooks the delete detached from it. + * Webhooks are only detached by `forceDelete=true`; without it a delete is refused + * with `409` while anything still references the credentials. + */ +@JsonPropertyOrder({ + DeleteWebhookOAuthResponse.JSON_PROPERTY_ID, + DeleteWebhookOAuthResponse.JSON_PROPERTY_NAME, + DeleteWebhookOAuthResponse.JSON_PROPERTY_CLIENT_ID, + DeleteWebhookOAuthResponse.JSON_PROPERTY_URL, + DeleteWebhookOAuthResponse.JSON_PROPERTY_AUTH_METHOD, + DeleteWebhookOAuthResponse.JSON_PROPERTY_CUSTOM_JWT_CLAIMS, + DeleteWebhookOAuthResponse.JSON_PROPERTY_CUSTOM_BODY_PARAMS, + DeleteWebhookOAuthResponse.JSON_PROPERTY_CUSTOM_HEADERS, + DeleteWebhookOAuthResponse.JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT, + DeleteWebhookOAuthResponse.JSON_PROPERTY_CREATED_AT, + DeleteWebhookOAuthResponse.JSON_PROPERTY_UPDATED_AT, + DeleteWebhookOAuthResponse.JSON_PROPERTY_DETACHED_WEBHOOK_IDS +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class DeleteWebhookOAuthResponse { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull private String name; + + public static final String JSON_PROPERTY_CLIENT_ID = "clientId"; + @jakarta.annotation.Nonnull private String clientId; + + public static final String JSON_PROPERTY_URL = "url"; + @jakarta.annotation.Nonnull private String url; + + public static final String JSON_PROPERTY_AUTH_METHOD = "authMethod"; + @jakarta.annotation.Nonnull private String authMethod = "client_secret_basic"; + + public static final String JSON_PROPERTY_CUSTOM_JWT_CLAIMS = "customJwtClaims"; + @jakarta.annotation.Nullable private List customJwtClaims; + + public static final String JSON_PROPERTY_CUSTOM_BODY_PARAMS = "customBodyParams"; + @jakarta.annotation.Nullable private List customBodyParams; + + public static final String JSON_PROPERTY_CUSTOM_HEADERS = "customHeaders"; + @jakarta.annotation.Nullable private List customHeaders; + + public static final String JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT = "mtlsClientSignedCert"; + @jakarta.annotation.Nullable private String mtlsClientSignedCert; + + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + @jakarta.annotation.Nonnull private Long createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + @jakarta.annotation.Nonnull private Long updatedAt; + + public static final String JSON_PROPERTY_DETACHED_WEBHOOK_IDS = "detachedWebhookIds"; + @jakarta.annotation.Nonnull private List detachedWebhookIds; + + public DeleteWebhookOAuthResponse() {} + + @JsonCreator + public DeleteWebhookOAuthResponse( + @JsonProperty(value = JSON_PROPERTY_ID, required = true) UUID id, + @JsonProperty(value = JSON_PROPERTY_NAME, required = true) String name, + @JsonProperty(value = JSON_PROPERTY_CLIENT_ID, required = true) String clientId, + @JsonProperty(value = JSON_PROPERTY_URL, required = true) String url, + @JsonProperty(value = JSON_PROPERTY_AUTH_METHOD, required = true) String authMethod, + @JsonProperty(value = JSON_PROPERTY_CREATED_AT, required = true) Long createdAt, + @JsonProperty(value = JSON_PROPERTY_UPDATED_AT, required = true) Long updatedAt, + @JsonProperty(value = JSON_PROPERTY_DETACHED_WEBHOOK_IDS, required = true) + List detachedWebhookIds) { + this.id = id; + this.name = name; + this.clientId = clientId; + this.url = url; + this.authMethod = authMethod; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.detachedWebhookIds = detachedWebhookIds; + } + + public DeleteWebhookOAuthResponse id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * The id of the OAuth credentials. Pass this as a webhook's `webhookOauthId` to + * attach them. + * + * @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 DeleteWebhookOAuthResponse name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The label given to this credential set. + * + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + public DeleteWebhookOAuthResponse clientId(@jakarta.annotation.Nonnull String clientId) { + this.clientId = clientId; + return this; + } + + /** + * OAuth client ID used to authenticate with the token endpoint. + * + * @return clientId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getClientId() { + return clientId; + } + + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setClientId(@jakarta.annotation.Nonnull String clientId) { + this.clientId = clientId; + } + + public DeleteWebhookOAuthResponse url(@jakarta.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * Token endpoint URL. + * + * @return url + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUrl() { + return url; + } + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUrl(@jakarta.annotation.Nonnull String url) { + this.url = url; + } + + public DeleteWebhookOAuthResponse authMethod(@jakarta.annotation.Nonnull String authMethod) { + this.authMethod = authMethod; + return this; + } + + /** + * How the client credentials are presented to the token endpoint: + * `client_secret_basic`, `client_secret_post` or + * `client_secret_jwt`. Credentials created without this field report + * `client_secret_basic`, which is what they use. + * + * @return authMethod + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AUTH_METHOD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAuthMethod() { + return authMethod; + } + + @JsonProperty(JSON_PROPERTY_AUTH_METHOD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAuthMethod(@jakarta.annotation.Nonnull String authMethod) { + this.authMethod = authMethod; + } + + public DeleteWebhookOAuthResponse customJwtClaims( + @jakarta.annotation.Nullable List customJwtClaims) { + this.customJwtClaims = customJwtClaims; + return this; + } + + public DeleteWebhookOAuthResponse addCustomJwtClaimsItem(String customJwtClaimsItem) { + if (this.customJwtClaims == null) { + this.customJwtClaims = new ArrayList<>(); + } + this.customJwtClaims.add(customJwtClaimsItem); + return this; + } + + /** + * Names of the additional claims placed in the JWT assertion. Claim values are write-only and + * are never returned. Absent when no custom claims are configured. + * + * @return customJwtClaims + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_JWT_CLAIMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomJwtClaims() { + return customJwtClaims; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_JWT_CLAIMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomJwtClaims(@jakarta.annotation.Nullable List customJwtClaims) { + this.customJwtClaims = customJwtClaims; + } + + public DeleteWebhookOAuthResponse customBodyParams( + @jakarta.annotation.Nullable List customBodyParams) { + this.customBodyParams = customBodyParams; + return this; + } + + public DeleteWebhookOAuthResponse addCustomBodyParamsItem(String customBodyParamsItem) { + if (this.customBodyParams == null) { + this.customBodyParams = new ArrayList<>(); + } + this.customBodyParams.add(customBodyParamsItem); + return this; + } + + /** + * Names of the additional parameters added to the token request body. Parameter values are + * write-only and are never returned. Absent when no custom parameters are configured. + * + * @return customBodyParams + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_BODY_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomBodyParams() { + return customBodyParams; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_BODY_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomBodyParams(@jakarta.annotation.Nullable List customBodyParams) { + this.customBodyParams = customBodyParams; + } + + public DeleteWebhookOAuthResponse customHeaders( + @jakarta.annotation.Nullable List customHeaders) { + this.customHeaders = customHeaders; + return this; + } + + public DeleteWebhookOAuthResponse addCustomHeadersItem(String customHeadersItem) { + if (this.customHeaders == null) { + this.customHeaders = new ArrayList<>(); + } + this.customHeaders.add(customHeadersItem); + return this; + } + + /** + * Names of the additional HTTP headers added to **the token request sent to the authorization + * server** — not to the webhook delivery, which has its own separate `customHeaders`. + * Header values are write-only and are never returned. Absent when no custom headers are + * configured. + * + * @return customHeaders + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_HEADERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomHeaders() { + return customHeaders; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_HEADERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomHeaders(@jakarta.annotation.Nullable List customHeaders) { + this.customHeaders = customHeaders; + } + + public DeleteWebhookOAuthResponse mtlsClientSignedCert( + @jakarta.annotation.Nullable String mtlsClientSignedCert) { + this.mtlsClientSignedCert = mtlsClientSignedCert; + return this; + } + + /** + * PEM-encoded client certificate used for mTLS when fetching OAuth tokens. + * + * @return mtlsClientSignedCert + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMtlsClientSignedCert() { + return mtlsClientSignedCert; + } + + @JsonProperty(JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMtlsClientSignedCert(@jakarta.annotation.Nullable String mtlsClientSignedCert) { + this.mtlsClientSignedCert = mtlsClientSignedCert; + } + + public DeleteWebhookOAuthResponse createdAt(@jakarta.annotation.Nonnull Long createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The date and time the OAuth credentials were created, in milliseconds. + * + * @return createdAt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getCreatedAt() { + return createdAt; + } + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(@jakarta.annotation.Nonnull Long createdAt) { + this.createdAt = createdAt; + } + + public DeleteWebhookOAuthResponse updatedAt(@jakarta.annotation.Nonnull Long updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * The date and time the OAuth credentials were last updated, in milliseconds. + * + * @return updatedAt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getUpdatedAt() { + return updatedAt; + } + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUpdatedAt(@jakarta.annotation.Nonnull Long updatedAt) { + this.updatedAt = updatedAt; + } + + public DeleteWebhookOAuthResponse detachedWebhookIds( + @jakarta.annotation.Nonnull List detachedWebhookIds) { + this.detachedWebhookIds = detachedWebhookIds; + return this; + } + + public DeleteWebhookOAuthResponse addDetachedWebhookIdsItem(UUID detachedWebhookIdsItem) { + if (this.detachedWebhookIds == null) { + this.detachedWebhookIds = new ArrayList<>(); + } + this.detachedWebhookIds.add(detachedWebhookIdsItem); + return this; + } + + /** + * Webhooks whose `webhookOauthId` was cleared. The webhooks themselves are not + * deleted and keep delivering, just without an `Authorization` header. Empty unless + * `forceDelete=true` detached something. + * + * @return detachedWebhookIds + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DETACHED_WEBHOOK_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDetachedWebhookIds() { + return detachedWebhookIds; + } + + @JsonProperty(JSON_PROPERTY_DETACHED_WEBHOOK_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDetachedWebhookIds(@jakarta.annotation.Nonnull List detachedWebhookIds) { + this.detachedWebhookIds = detachedWebhookIds; + } + + /** Return true if this DeleteWebhookOAuthResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteWebhookOAuthResponse deleteWebhookOAuthResponse = (DeleteWebhookOAuthResponse) o; + return Objects.equals(this.id, deleteWebhookOAuthResponse.id) + && Objects.equals(this.name, deleteWebhookOAuthResponse.name) + && Objects.equals(this.clientId, deleteWebhookOAuthResponse.clientId) + && Objects.equals(this.url, deleteWebhookOAuthResponse.url) + && Objects.equals(this.authMethod, deleteWebhookOAuthResponse.authMethod) + && Objects.equals(this.customJwtClaims, deleteWebhookOAuthResponse.customJwtClaims) + && Objects.equals( + this.customBodyParams, deleteWebhookOAuthResponse.customBodyParams) + && Objects.equals(this.customHeaders, deleteWebhookOAuthResponse.customHeaders) + && Objects.equals( + this.mtlsClientSignedCert, deleteWebhookOAuthResponse.mtlsClientSignedCert) + && Objects.equals(this.createdAt, deleteWebhookOAuthResponse.createdAt) + && Objects.equals(this.updatedAt, deleteWebhookOAuthResponse.updatedAt) + && Objects.equals( + this.detachedWebhookIds, deleteWebhookOAuthResponse.detachedWebhookIds); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + name, + clientId, + url, + authMethod, + customJwtClaims, + customBodyParams, + customHeaders, + mtlsClientSignedCert, + createdAt, + updatedAt, + detachedWebhookIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteWebhookOAuthResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" authMethod: ").append(toIndentedString(authMethod)).append("\n"); + sb.append(" customJwtClaims: ").append(toIndentedString(customJwtClaims)).append("\n"); + sb.append(" customBodyParams: ").append(toIndentedString(customBodyParams)).append("\n"); + sb.append(" customHeaders: ").append(toIndentedString(customHeaders)).append("\n"); + sb.append(" mtlsClientSignedCert: ") + .append(toIndentedString(mtlsClientSignedCert)) + .append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" detachedWebhookIds: ") + .append(toIndentedString(detachedWebhookIds)) + .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 `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `clientId` to the URL query string + if (getClientId() != null) { + joiner.add( + String.format( + "%sclientId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getClientId())))); + } + + // add `url` to the URL query string + if (getUrl() != null) { + joiner.add( + String.format( + "%surl%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getUrl())))); + } + + // add `authMethod` to the URL query string + if (getAuthMethod() != null) { + joiner.add( + String.format( + "%sauthMethod%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAuthMethod())))); + } + + // add `customJwtClaims` to the URL query string + if (getCustomJwtClaims() != null) { + for (int i = 0; i < getCustomJwtClaims().size(); i++) { + joiner.add( + String.format( + "%scustomJwtClaims%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode( + ApiClient.valueToString(getCustomJwtClaims().get(i))))); + } + } + + // add `customBodyParams` to the URL query string + if (getCustomBodyParams() != null) { + for (int i = 0; i < getCustomBodyParams().size(); i++) { + joiner.add( + String.format( + "%scustomBodyParams%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode( + ApiClient.valueToString(getCustomBodyParams().get(i))))); + } + } + + // add `customHeaders` to the URL query string + if (getCustomHeaders() != null) { + for (int i = 0; i < getCustomHeaders().size(); i++) { + joiner.add( + String.format( + "%scustomHeaders%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode( + ApiClient.valueToString(getCustomHeaders().get(i))))); + } + } + + // add `mtlsClientSignedCert` to the URL query string + if (getMtlsClientSignedCert() != null) { + joiner.add( + String.format( + "%smtlsClientSignedCert%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getMtlsClientSignedCert())))); + } + + // 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 `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add( + String.format( + "%supdatedAt%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + // add `detachedWebhookIds` to the URL query string + if (getDetachedWebhookIds() != null) { + for (int i = 0; i < getDetachedWebhookIds().size(); i++) { + if (getDetachedWebhookIds().get(i) != null) { + joiner.add( + String.format( + "%sdetachedWebhookIds%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode( + ApiClient.valueToString( + getDetachedWebhookIds().get(i))))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DirectAccessResponse.java b/src/main/java/com/fireblocks/sdk/model/DirectAccessResponse.java new file mode 100644 index 00000000..8e80d2fe --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DirectAccessResponse.java @@ -0,0 +1,284 @@ +/* + * 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.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** + * Response-only counterpart of DirectAccess. Adds the server-populated `subProviders` + * field. Never use this schema in a request body — requests must keep using DirectAccess (via + * AccessType). + */ +@JsonPropertyOrder({ + DirectAccessResponse.JSON_PROPERTY_TYPE, + DirectAccessResponse.JSON_PROPERTY_PROVIDER_ID, + DirectAccessResponse.JSON_PROPERTY_SUB_PROVIDERS +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class DirectAccessResponse { + /** Indicates this uses direct provider access */ + public enum TypeEnum { + PROVIDER(String.valueOf("PROVIDER")); + + 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; + + public static final String JSON_PROPERTY_PROVIDER_ID = "providerId"; + @jakarta.annotation.Nonnull private String providerId; + + public static final String JSON_PROPERTY_SUB_PROVIDERS = "subProviders"; + @jakarta.annotation.Nullable private List subProviders; + + public DirectAccessResponse() {} + + @JsonCreator + public DirectAccessResponse( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_PROVIDER_ID, required = true) String providerId) { + this.type = type; + this.providerId = providerId; + } + + public DirectAccessResponse type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Indicates this uses direct provider access + * + * @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 DirectAccessResponse providerId(@jakarta.annotation.Nonnull String providerId) { + this.providerId = providerId; + return this; + } + + /** + * The ID of the provider + * + * @return providerId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProviderId() { + return providerId; + } + + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProviderId(@jakarta.annotation.Nonnull String providerId) { + this.providerId = providerId; + } + + public DirectAccessResponse subProviders( + @jakarta.annotation.Nullable List subProviders) { + this.subProviders = subProviders; + return this; + } + + public DirectAccessResponse addSubProvidersItem(String subProvidersItem) { + if (this.subProviders == null) { + this.subProviders = new ArrayList<>(); + } + this.subProviders.add(subProvidersItem); + return this; + } + + /** + * The underlying providers or tools that this direct-access route is composed of, in execution + * order. Response-only: this field is populated by the server and is never accepted from client + * requests. + * + * @return subProviders + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUB_PROVIDERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSubProviders() { + return subProviders; + } + + @JsonProperty(JSON_PROPERTY_SUB_PROVIDERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSubProviders(@jakarta.annotation.Nullable List subProviders) { + this.subProviders = subProviders; + } + + /** Return true if this DirectAccessResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DirectAccessResponse directAccessResponse = (DirectAccessResponse) o; + return Objects.equals(this.type, directAccessResponse.type) + && Objects.equals(this.providerId, directAccessResponse.providerId) + && Objects.equals(this.subProviders, directAccessResponse.subProviders); + } + + @Override + public int hashCode() { + return Objects.hash(type, providerId, subProviders); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DirectAccessResponse {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" providerId: ").append(toIndentedString(providerId)).append("\n"); + sb.append(" subProviders: ").append(toIndentedString(subProviders)).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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `providerId` to the URL query string + if (getProviderId() != null) { + joiner.add( + String.format( + "%sproviderId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getProviderId())))); + } + + // add `subProviders` to the URL query string + if (getSubProviders() != null) { + for (int i = 0; i < getSubProviders().size(); i++) { + joiner.add( + String.format( + "%ssubProviders%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode( + ApiClient.valueToString(getSubProviders().get(i))))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DirectAccessResponseInfo.java b/src/main/java/com/fireblocks/sdk/model/DirectAccessResponseInfo.java new file mode 100644 index 00000000..cf1425c4 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DirectAccessResponseInfo.java @@ -0,0 +1,159 @@ +/* + * 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.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** DirectAccessResponseInfo */ +@JsonPropertyOrder({DirectAccessResponseInfo.JSON_PROPERTY_SUB_PROVIDERS}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class DirectAccessResponseInfo { + public static final String JSON_PROPERTY_SUB_PROVIDERS = "subProviders"; + @jakarta.annotation.Nullable private List subProviders; + + public DirectAccessResponseInfo() {} + + public DirectAccessResponseInfo subProviders( + @jakarta.annotation.Nullable List subProviders) { + this.subProviders = subProviders; + return this; + } + + public DirectAccessResponseInfo addSubProvidersItem(String subProvidersItem) { + if (this.subProviders == null) { + this.subProviders = new ArrayList<>(); + } + this.subProviders.add(subProvidersItem); + return this; + } + + /** + * The underlying providers or tools that this direct-access route is composed of, in execution + * order. Response-only: this field is populated by the server and is never accepted from client + * requests. + * + * @return subProviders + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUB_PROVIDERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSubProviders() { + return subProviders; + } + + @JsonProperty(JSON_PROPERTY_SUB_PROVIDERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSubProviders(@jakarta.annotation.Nullable List subProviders) { + this.subProviders = subProviders; + } + + /** Return true if this DirectAccessResponseInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DirectAccessResponseInfo directAccessResponseInfo = (DirectAccessResponseInfo) o; + return Objects.equals(this.subProviders, directAccessResponseInfo.subProviders); + } + + @Override + public int hashCode() { + return Objects.hash(subProviders); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DirectAccessResponseInfo {\n"); + sb.append(" subProviders: ").append(toIndentedString(subProviders)).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 `subProviders` to the URL query string + if (getSubProviders() != null) { + for (int i = 0; i < getSubProviders().size(); i++) { + joiner.add( + String.format( + "%ssubProviders%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode( + ApiClient.valueToString(getSubProviders().get(i))))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/EndInvestorPayload.java b/src/main/java/com/fireblocks/sdk/model/EndInvestorPayload.java new file mode 100644 index 00000000..56fd18b4 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/EndInvestorPayload.java @@ -0,0 +1,265 @@ +/* + * 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; + +/** Shared by invite / invite-cancel / offboard — identical wire shape, different verb. */ +@JsonPropertyOrder({ + EndInvestorPayload.JSON_PROPERTY_VAULT_ACCOUNT_ID, + EndInvestorPayload.JSON_PROPERTY_ASSET, + EndInvestorPayload.JSON_PROPERTY_END_INVESTOR +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class EndInvestorPayload { + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + @jakarta.annotation.Nonnull private String vaultAccountId; + + /** Chain asset — `CANTON` or `CANTON_TEST`. */ + public enum AssetEnum { + CANTON(String.valueOf("CANTON")), + + CANTON_TEST(String.valueOf("CANTON_TEST")); + + private String value; + + AssetEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AssetEnum fromValue(String value) { + for (AssetEnum b : AssetEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ASSET = "asset"; + @jakarta.annotation.Nonnull private AssetEnum asset; + + public static final String JSON_PROPERTY_END_INVESTOR = "endInvestor"; + @jakarta.annotation.Nonnull private String endInvestor; + + public EndInvestorPayload() {} + + @JsonCreator + public EndInvestorPayload( + @JsonProperty(value = JSON_PROPERTY_VAULT_ACCOUNT_ID, required = true) + String vaultAccountId, + @JsonProperty(value = JSON_PROPERTY_ASSET, required = true) AssetEnum asset, + @JsonProperty(value = JSON_PROPERTY_END_INVESTOR, required = true) String endInvestor) { + this.vaultAccountId = vaultAccountId; + this.asset = asset; + this.endInvestor = endInvestor; + } + + public EndInvestorPayload vaultAccountId(@jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The vault account whose Canton wallet acts here. + * + * @return vaultAccountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVaultAccountId(@jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + public EndInvestorPayload asset(@jakarta.annotation.Nonnull AssetEnum asset) { + this.asset = asset; + return this; + } + + /** + * Chain asset — `CANTON` or `CANTON_TEST`. + * + * @return asset + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ASSET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetEnum getAsset() { + return asset; + } + + @JsonProperty(JSON_PROPERTY_ASSET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAsset(@jakarta.annotation.Nonnull AssetEnum asset) { + this.asset = asset; + } + + public EndInvestorPayload endInvestor(@jakarta.annotation.Nonnull String endInvestor) { + this.endInvestor = endInvestor; + return this; + } + + /** + * The end investor's Canton party id. + * + * @return endInvestor + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_END_INVESTOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEndInvestor() { + return endInvestor; + } + + @JsonProperty(JSON_PROPERTY_END_INVESTOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEndInvestor(@jakarta.annotation.Nonnull String endInvestor) { + this.endInvestor = endInvestor; + } + + /** Return true if this EndInvestorPayload object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EndInvestorPayload endInvestorPayload = (EndInvestorPayload) o; + return Objects.equals(this.vaultAccountId, endInvestorPayload.vaultAccountId) + && Objects.equals(this.asset, endInvestorPayload.asset) + && Objects.equals(this.endInvestor, endInvestorPayload.endInvestor); + } + + @Override + public int hashCode() { + return Objects.hash(vaultAccountId, asset, endInvestor); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EndInvestorPayload {\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); + sb.append(" endInvestor: ").append(toIndentedString(endInvestor)).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 `vaultAccountId` to the URL query string + if (getVaultAccountId() != null) { + joiner.add( + String.format( + "%svaultAccountId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getVaultAccountId())))); + } + + // add `asset` to the URL query string + if (getAsset() != null) { + joiner.add( + String.format( + "%sasset%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAsset())))); + } + + // add `endInvestor` to the URL query string + if (getEndInvestor() != null) { + joiner.add( + String.format( + "%sendInvestor%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getEndInvestor())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/GetFindingsExternalResponse.java b/src/main/java/com/fireblocks/sdk/model/GetFindingsExternalResponse.java index 3bd3dca8..bdc12070 100644 --- a/src/main/java/com/fireblocks/sdk/model/GetFindingsExternalResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/GetFindingsExternalResponse.java @@ -23,7 +23,7 @@ import java.util.Objects; import java.util.StringJoiner; -/** A paginated list of FSPM findings */ +/** GetFindingsExternalResponse */ @JsonPropertyOrder({ GetFindingsExternalResponse.JSON_PROPERTY_DATA, GetFindingsExternalResponse.JSON_PROPERTY_TOTAL, diff --git a/src/main/java/com/fireblocks/sdk/model/ListApprovalsResponse.java b/src/main/java/com/fireblocks/sdk/model/ListApprovalsResponse.java new file mode 100644 index 00000000..e6d7eb8b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ListApprovalsResponse.java @@ -0,0 +1,212 @@ +/* + * 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.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** ListApprovalsResponse */ +@JsonPropertyOrder({ + ListApprovalsResponse.JSON_PROPERTY_DATA, + ListApprovalsResponse.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ListApprovalsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + @jakarta.annotation.Nonnull private List data; + + public static final String JSON_PROPERTY_NEXT = "next"; + @jakarta.annotation.Nullable private String next; + + public ListApprovalsResponse() {} + + @JsonCreator + public ListApprovalsResponse( + @JsonProperty(value = JSON_PROPERTY_DATA, required = true) + List data) { + this.data = data; + } + + public ListApprovalsResponse data(@jakarta.annotation.Nonnull List data) { + this.data = data; + return this; + } + + public ListApprovalsResponse addDataItem(ApprovalRequestItem dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * The approval requests the authenticated user is eligible to act on. + * + * @return data + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(@jakarta.annotation.Nonnull List data) { + this.data = data; + } + + public ListApprovalsResponse next(@jakarta.annotation.Nullable String next) { + this.next = next; + return this; + } + + /** + * Cursor for the next page of results. Pass it back as the `pageCursor` query param + * to fetch the next page. Empty or absent when this is the last page. + * + * @return next + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNext() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNext(@jakarta.annotation.Nullable String next) { + this.next = next; + } + + /** Return true if this ListApprovalsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListApprovalsResponse listApprovalsResponse = (ListApprovalsResponse) o; + return Objects.equals(this.data, listApprovalsResponse.data) + && Objects.equals(this.next, listApprovalsResponse.next); + } + + @Override + public int hashCode() { + return Objects.hash(data, next); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListApprovalsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).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 `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add( + getData() + .get(i) + .toUrlQueryString( + String.format( + "%sdata%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add( + String.format( + "%snext%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/OfferResponse.java b/src/main/java/com/fireblocks/sdk/model/OfferResponse.java new file mode 100644 index 00000000..4473657a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/OfferResponse.java @@ -0,0 +1,413 @@ +/* + * 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 = OfferResponse.OfferResponseDeserializer.class) +@JsonSerialize(using = OfferResponse.OfferResponseSerializer.class) +public class OfferResponse extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(OfferResponse.class.getName()); + + public static class OfferResponseSerializer extends StdSerializer { + public OfferResponseSerializer(Class t) { + super(t); + } + + public OfferResponseSerializer() { + this(null); + } + + @Override + public void serialize(OfferResponse value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class OfferResponseDeserializer extends StdDeserializer { + public OfferResponseDeserializer() { + this(OfferResponse.class); + } + + public OfferResponseDeserializer(Class vc) { + super(vc); + } + + @Override + public OfferResponse 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 OfferResponseAllocation + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (OfferResponseAllocation.class.equals(Integer.class) + || OfferResponseAllocation.class.equals(Long.class) + || OfferResponseAllocation.class.equals(Float.class) + || OfferResponseAllocation.class.equals(Double.class) + || OfferResponseAllocation.class.equals(Boolean.class) + || OfferResponseAllocation.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((OfferResponseAllocation.class.equals(Integer.class) + || OfferResponseAllocation.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((OfferResponseAllocation.class.equals(Float.class) + || OfferResponseAllocation.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (OfferResponseAllocation.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (OfferResponseAllocation.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(OfferResponseAllocation.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 'OfferResponseAllocation'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'OfferResponseAllocation'", + e); + } + + // deserialize OfferResponseOnboarding + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (OfferResponseOnboarding.class.equals(Integer.class) + || OfferResponseOnboarding.class.equals(Long.class) + || OfferResponseOnboarding.class.equals(Float.class) + || OfferResponseOnboarding.class.equals(Double.class) + || OfferResponseOnboarding.class.equals(Boolean.class) + || OfferResponseOnboarding.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((OfferResponseOnboarding.class.equals(Integer.class) + || OfferResponseOnboarding.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((OfferResponseOnboarding.class.equals(Float.class) + || OfferResponseOnboarding.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (OfferResponseOnboarding.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (OfferResponseOnboarding.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(OfferResponseOnboarding.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 'OfferResponseOnboarding'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'OfferResponseOnboarding'", + e); + } + + // deserialize OfferResponseTransfer + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (OfferResponseTransfer.class.equals(Integer.class) + || OfferResponseTransfer.class.equals(Long.class) + || OfferResponseTransfer.class.equals(Float.class) + || OfferResponseTransfer.class.equals(Double.class) + || OfferResponseTransfer.class.equals(Boolean.class) + || OfferResponseTransfer.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((OfferResponseTransfer.class.equals(Integer.class) + || OfferResponseTransfer.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((OfferResponseTransfer.class.equals(Float.class) + || OfferResponseTransfer.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (OfferResponseTransfer.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (OfferResponseTransfer.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(OfferResponseTransfer.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 'OfferResponseTransfer'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'OfferResponseTransfer'", e); + } + + if (match == 1) { + OfferResponse ret = new OfferResponse(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for OfferResponse: %d classes match result," + + " expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public OfferResponse getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "OfferResponse cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public OfferResponse() { + super("oneOf", Boolean.FALSE); + } + + public OfferResponse(OfferResponseAllocation o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public OfferResponse(OfferResponseOnboarding o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public OfferResponse(OfferResponseTransfer o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("OfferResponseAllocation", OfferResponseAllocation.class); + schemas.put("OfferResponseOnboarding", OfferResponseOnboarding.class); + schemas.put("OfferResponseTransfer", OfferResponseTransfer.class); + JSON.registerDescendants(OfferResponse.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ALLOCATIONS", OfferResponseAllocation.class); + mappings.put("ONBOARDING", OfferResponseOnboarding.class); + mappings.put("TRANSFERS", OfferResponseTransfer.class); + mappings.put("OfferResponseAllocation", OfferResponseAllocation.class); + mappings.put("OfferResponseOnboarding", OfferResponseOnboarding.class); + mappings.put("OfferResponseTransfer", OfferResponseTransfer.class); + mappings.put("OfferResponse", OfferResponse.class); + JSON.registerDiscriminator(OfferResponse.class, "domain", mappings); + } + + @Override + public Map> getSchemas() { + return OfferResponse.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: OfferResponseAllocation, OfferResponseOnboarding, + * OfferResponseTransfer + * + *

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(OfferResponseAllocation.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(OfferResponseOnboarding.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(OfferResponseTransfer.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be OfferResponseAllocation, OfferResponseOnboarding," + + " OfferResponseTransfer"); + } + + /** + * Get the actual instance, which can be the following: OfferResponseAllocation, + * OfferResponseOnboarding, OfferResponseTransfer + * + * @return The actual instance (OfferResponseAllocation, OfferResponseOnboarding, + * OfferResponseTransfer) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `OfferResponseAllocation`. If the actual instance is not + * `OfferResponseAllocation`, the ClassCastException will be thrown. + * + * @return The actual instance of `OfferResponseAllocation` + * @throws ClassCastException if the instance is not `OfferResponseAllocation` + */ + public OfferResponseAllocation getOfferResponseAllocation() throws ClassCastException { + return (OfferResponseAllocation) super.getActualInstance(); + } + + /** + * Get the actual instance of `OfferResponseOnboarding`. If the actual instance is not + * `OfferResponseOnboarding`, the ClassCastException will be thrown. + * + * @return The actual instance of `OfferResponseOnboarding` + * @throws ClassCastException if the instance is not `OfferResponseOnboarding` + */ + public OfferResponseOnboarding getOfferResponseOnboarding() throws ClassCastException { + return (OfferResponseOnboarding) super.getActualInstance(); + } + + /** + * Get the actual instance of `OfferResponseTransfer`. If the actual instance is not + * `OfferResponseTransfer`, the ClassCastException will be thrown. + * + * @return The actual instance of `OfferResponseTransfer` + * @throws ClassCastException if the instance is not `OfferResponseTransfer` + */ + public OfferResponseTransfer getOfferResponseTransfer() throws ClassCastException { + return (OfferResponseTransfer) 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 OfferResponseOnboarding) { + if (getActualInstance() != null) { + joiner.add( + ((OfferResponseOnboarding) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof OfferResponseAllocation) { + if (getActualInstance() != null) { + joiner.add( + ((OfferResponseAllocation) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof OfferResponseTransfer) { + if (getActualInstance() != null) { + joiner.add( + ((OfferResponseTransfer) getActualInstance()) + .toUrlQueryString(prefix + "one_of_2" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/OfferResponseAccepted.java b/src/main/java/com/fireblocks/sdk/model/OfferResponseAccepted.java new file mode 100644 index 00000000..2a7ae630 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/OfferResponseAccepted.java @@ -0,0 +1,235 @@ +/* + * 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; + +/** + * The outgoing transaction that carries the response. Its on-chain outcome arrives by webhook as a + * status update on this transaction. + */ +@JsonPropertyOrder({ + OfferResponseAccepted.JSON_PROPERTY_TRANSACTION_ID, + OfferResponseAccepted.JSON_PROPERTY_STATUS, + OfferResponseAccepted.JSON_PROPERTY_RESPONSE_TYPE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class OfferResponseAccepted { + public static final String JSON_PROPERTY_TRANSACTION_ID = "transactionId"; + @jakarta.annotation.Nonnull private String transactionId; + + public static final String JSON_PROPERTY_STATUS = "status"; + @jakarta.annotation.Nonnull private String status; + + public static final String JSON_PROPERTY_RESPONSE_TYPE = "responseType"; + @jakarta.annotation.Nonnull private String responseType; + + public OfferResponseAccepted() {} + + @JsonCreator + public OfferResponseAccepted( + @JsonProperty(value = JSON_PROPERTY_TRANSACTION_ID, required = true) + String transactionId, + @JsonProperty(value = JSON_PROPERTY_STATUS, required = true) String status, + @JsonProperty(value = JSON_PROPERTY_RESPONSE_TYPE, required = true) + String responseType) { + this.transactionId = transactionId; + this.status = status; + this.responseType = responseType; + } + + public OfferResponseAccepted transactionId(@jakarta.annotation.Nonnull String transactionId) { + this.transactionId = transactionId; + return this; + } + + /** + * The outgoing response transaction. + * + * @return transactionId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTransactionId() { + return transactionId; + } + + @JsonProperty(JSON_PROPERTY_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTransactionId(@jakarta.annotation.Nonnull String transactionId) { + this.transactionId = transactionId; + } + + public OfferResponseAccepted status(@jakarta.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * The transaction's status at the time of this response — `SUBMITTED`. + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@jakarta.annotation.Nonnull String status) { + this.status = status; + } + + public OfferResponseAccepted responseType(@jakarta.annotation.Nonnull String responseType) { + this.responseType = responseType; + return this; + } + + /** + * The response type you sent, echoed back so you can correlate without re-reading. + * + * @return responseType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getResponseType() { + return responseType; + } + + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResponseType(@jakarta.annotation.Nonnull String responseType) { + this.responseType = responseType; + } + + /** Return true if this OfferResponseAccepted object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OfferResponseAccepted offerResponseAccepted = (OfferResponseAccepted) o; + return Objects.equals(this.transactionId, offerResponseAccepted.transactionId) + && Objects.equals(this.status, offerResponseAccepted.status) + && Objects.equals(this.responseType, offerResponseAccepted.responseType); + } + + @Override + public int hashCode() { + return Objects.hash(transactionId, status, responseType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OfferResponseAccepted {\n"); + sb.append(" transactionId: ").append(toIndentedString(transactionId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" responseType: ").append(toIndentedString(responseType)).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 `transactionId` to the URL query string + if (getTransactionId() != null) { + joiner.add( + String.format( + "%stransactionId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getTransactionId())))); + } + + // 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 `responseType` to the URL query string + if (getResponseType() != null) { + joiner.add( + String.format( + "%sresponseType%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getResponseType())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/OfferResponseAllocation.java b/src/main/java/com/fireblocks/sdk/model/OfferResponseAllocation.java new file mode 100644 index 00000000..35ae9a2b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/OfferResponseAllocation.java @@ -0,0 +1,218 @@ +/* + * 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; + +/** OfferResponseAllocation */ +@JsonPropertyOrder({ + OfferResponseAllocation.JSON_PROPERTY_DOMAIN, + OfferResponseAllocation.JSON_PROPERTY_RESPONSE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class OfferResponseAllocation { + /** Which offer domain this response belongs to. Selects the shape of `response`. */ + public enum DomainEnum { + ALLOCATIONS(String.valueOf("ALLOCATIONS")); + + private String value; + + DomainEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DomainEnum fromValue(String value) { + for (DomainEnum b : DomainEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DOMAIN = "domain"; + @jakarta.annotation.Nonnull private DomainEnum domain; + + public static final String JSON_PROPERTY_RESPONSE = "response"; + @jakarta.annotation.Nonnull private AllocationResponse response; + + public OfferResponseAllocation() {} + + @JsonCreator + public OfferResponseAllocation( + @JsonProperty(value = JSON_PROPERTY_DOMAIN, required = true) DomainEnum domain, + @JsonProperty(value = JSON_PROPERTY_RESPONSE, required = true) + AllocationResponse response) { + this.domain = domain; + this.response = response; + } + + public OfferResponseAllocation domain(@jakarta.annotation.Nonnull DomainEnum domain) { + this.domain = domain; + return this; + } + + /** + * Which offer domain this response belongs to. Selects the shape of `response`. + * + * @return domain + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DomainEnum getDomain() { + return domain; + } + + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDomain(@jakarta.annotation.Nonnull DomainEnum domain) { + this.domain = domain; + } + + public OfferResponseAllocation response( + @jakarta.annotation.Nonnull AllocationResponse response) { + this.response = response; + return this; + } + + /** + * Get response + * + * @return response + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESPONSE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AllocationResponse getResponse() { + return response; + } + + @JsonProperty(JSON_PROPERTY_RESPONSE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResponse(@jakarta.annotation.Nonnull AllocationResponse response) { + this.response = response; + } + + /** Return true if this OfferResponseAllocation object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OfferResponseAllocation offerResponseAllocation = (OfferResponseAllocation) o; + return Objects.equals(this.domain, offerResponseAllocation.domain) + && Objects.equals(this.response, offerResponseAllocation.response); + } + + @Override + public int hashCode() { + return Objects.hash(domain, response); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OfferResponseAllocation {\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" response: ").append(toIndentedString(response)).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 `domain` to the URL query string + if (getDomain() != null) { + joiner.add( + String.format( + "%sdomain%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getDomain())))); + } + + // add `response` to the URL query string + if (getResponse() != null) { + joiner.add(getResponse().toUrlQueryString(prefix + "response" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/OfferResponseOnboarding.java b/src/main/java/com/fireblocks/sdk/model/OfferResponseOnboarding.java new file mode 100644 index 00000000..8415f197 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/OfferResponseOnboarding.java @@ -0,0 +1,218 @@ +/* + * 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; + +/** OfferResponseOnboarding */ +@JsonPropertyOrder({ + OfferResponseOnboarding.JSON_PROPERTY_DOMAIN, + OfferResponseOnboarding.JSON_PROPERTY_RESPONSE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class OfferResponseOnboarding { + /** Which offer domain this response belongs to. Selects the shape of `response`. */ + public enum DomainEnum { + ONBOARDING(String.valueOf("ONBOARDING")); + + private String value; + + DomainEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DomainEnum fromValue(String value) { + for (DomainEnum b : DomainEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DOMAIN = "domain"; + @jakarta.annotation.Nonnull private DomainEnum domain; + + public static final String JSON_PROPERTY_RESPONSE = "response"; + @jakarta.annotation.Nonnull private OnboardingResponse response; + + public OfferResponseOnboarding() {} + + @JsonCreator + public OfferResponseOnboarding( + @JsonProperty(value = JSON_PROPERTY_DOMAIN, required = true) DomainEnum domain, + @JsonProperty(value = JSON_PROPERTY_RESPONSE, required = true) + OnboardingResponse response) { + this.domain = domain; + this.response = response; + } + + public OfferResponseOnboarding domain(@jakarta.annotation.Nonnull DomainEnum domain) { + this.domain = domain; + return this; + } + + /** + * Which offer domain this response belongs to. Selects the shape of `response`. + * + * @return domain + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DomainEnum getDomain() { + return domain; + } + + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDomain(@jakarta.annotation.Nonnull DomainEnum domain) { + this.domain = domain; + } + + public OfferResponseOnboarding response( + @jakarta.annotation.Nonnull OnboardingResponse response) { + this.response = response; + return this; + } + + /** + * Get response + * + * @return response + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESPONSE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OnboardingResponse getResponse() { + return response; + } + + @JsonProperty(JSON_PROPERTY_RESPONSE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResponse(@jakarta.annotation.Nonnull OnboardingResponse response) { + this.response = response; + } + + /** Return true if this OfferResponseOnboarding object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OfferResponseOnboarding offerResponseOnboarding = (OfferResponseOnboarding) o; + return Objects.equals(this.domain, offerResponseOnboarding.domain) + && Objects.equals(this.response, offerResponseOnboarding.response); + } + + @Override + public int hashCode() { + return Objects.hash(domain, response); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OfferResponseOnboarding {\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" response: ").append(toIndentedString(response)).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 `domain` to the URL query string + if (getDomain() != null) { + joiner.add( + String.format( + "%sdomain%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getDomain())))); + } + + // add `response` to the URL query string + if (getResponse() != null) { + joiner.add(getResponse().toUrlQueryString(prefix + "response" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/OfferResponseTransfer.java b/src/main/java/com/fireblocks/sdk/model/OfferResponseTransfer.java new file mode 100644 index 00000000..aa6f3fe4 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/OfferResponseTransfer.java @@ -0,0 +1,217 @@ +/* + * 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; + +/** OfferResponseTransfer */ +@JsonPropertyOrder({ + OfferResponseTransfer.JSON_PROPERTY_DOMAIN, + OfferResponseTransfer.JSON_PROPERTY_RESPONSE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class OfferResponseTransfer { + /** Which offer domain this response belongs to. Selects the shape of `response`. */ + public enum DomainEnum { + TRANSFERS(String.valueOf("TRANSFERS")); + + private String value; + + DomainEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DomainEnum fromValue(String value) { + for (DomainEnum b : DomainEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DOMAIN = "domain"; + @jakarta.annotation.Nonnull private DomainEnum domain; + + public static final String JSON_PROPERTY_RESPONSE = "response"; + @jakarta.annotation.Nonnull private TransferResponse response; + + public OfferResponseTransfer() {} + + @JsonCreator + public OfferResponseTransfer( + @JsonProperty(value = JSON_PROPERTY_DOMAIN, required = true) DomainEnum domain, + @JsonProperty(value = JSON_PROPERTY_RESPONSE, required = true) + TransferResponse response) { + this.domain = domain; + this.response = response; + } + + public OfferResponseTransfer domain(@jakarta.annotation.Nonnull DomainEnum domain) { + this.domain = domain; + return this; + } + + /** + * Which offer domain this response belongs to. Selects the shape of `response`. + * + * @return domain + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DomainEnum getDomain() { + return domain; + } + + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDomain(@jakarta.annotation.Nonnull DomainEnum domain) { + this.domain = domain; + } + + public OfferResponseTransfer response(@jakarta.annotation.Nonnull TransferResponse response) { + this.response = response; + return this; + } + + /** + * Get response + * + * @return response + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESPONSE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TransferResponse getResponse() { + return response; + } + + @JsonProperty(JSON_PROPERTY_RESPONSE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResponse(@jakarta.annotation.Nonnull TransferResponse response) { + this.response = response; + } + + /** Return true if this OfferResponseTransfer object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OfferResponseTransfer offerResponseTransfer = (OfferResponseTransfer) o; + return Objects.equals(this.domain, offerResponseTransfer.domain) + && Objects.equals(this.response, offerResponseTransfer.response); + } + + @Override + public int hashCode() { + return Objects.hash(domain, response); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OfferResponseTransfer {\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" response: ").append(toIndentedString(response)).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 `domain` to the URL query string + if (getDomain() != null) { + joiner.add( + String.format( + "%sdomain%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getDomain())))); + } + + // add `response` to the URL query string + if (getResponse() != null) { + joiner.add(getResponse().toUrlQueryString(prefix + "response" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/OnboardingResponse.java b/src/main/java/com/fireblocks/sdk/model/OnboardingResponse.java new file mode 100644 index 00000000..a0957845 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/OnboardingResponse.java @@ -0,0 +1,526 @@ +/* + * 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 = OnboardingResponse.OnboardingResponseDeserializer.class) +@JsonSerialize(using = OnboardingResponse.OnboardingResponseSerializer.class) +public class OnboardingResponse extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(OnboardingResponse.class.getName()); + + public static class OnboardingResponseSerializer extends StdSerializer { + public OnboardingResponseSerializer(Class t) { + super(t); + } + + public OnboardingResponseSerializer() { + this(null); + } + + @Override + public void serialize( + OnboardingResponse value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class OnboardingResponseDeserializer extends StdDeserializer { + public OnboardingResponseDeserializer() { + this(OnboardingResponse.class); + } + + public OnboardingResponseDeserializer(Class vc) { + super(vc); + } + + @Override + public OnboardingResponse 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 OnboardingResponseDtccAccept + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (OnboardingResponseDtccAccept.class.equals(Integer.class) + || OnboardingResponseDtccAccept.class.equals(Long.class) + || OnboardingResponseDtccAccept.class.equals(Float.class) + || OnboardingResponseDtccAccept.class.equals(Double.class) + || OnboardingResponseDtccAccept.class.equals(Boolean.class) + || OnboardingResponseDtccAccept.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((OnboardingResponseDtccAccept.class.equals(Integer.class) + || OnboardingResponseDtccAccept.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((OnboardingResponseDtccAccept.class.equals(Float.class) + || OnboardingResponseDtccAccept.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (OnboardingResponseDtccAccept.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (OnboardingResponseDtccAccept.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(OnboardingResponseDtccAccept.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 'OnboardingResponseDtccAccept'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'OnboardingResponseDtccAccept'", + e); + } + + // deserialize OnboardingResponseDtccReject + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (OnboardingResponseDtccReject.class.equals(Integer.class) + || OnboardingResponseDtccReject.class.equals(Long.class) + || OnboardingResponseDtccReject.class.equals(Float.class) + || OnboardingResponseDtccReject.class.equals(Double.class) + || OnboardingResponseDtccReject.class.equals(Boolean.class) + || OnboardingResponseDtccReject.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((OnboardingResponseDtccReject.class.equals(Integer.class) + || OnboardingResponseDtccReject.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((OnboardingResponseDtccReject.class.equals(Float.class) + || OnboardingResponseDtccReject.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (OnboardingResponseDtccReject.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (OnboardingResponseDtccReject.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(OnboardingResponseDtccReject.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 'OnboardingResponseDtccReject'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'OnboardingResponseDtccReject'", + e); + } + + // deserialize OnboardingResponseTradewebAccept + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (OnboardingResponseTradewebAccept.class.equals(Integer.class) + || OnboardingResponseTradewebAccept.class.equals(Long.class) + || OnboardingResponseTradewebAccept.class.equals(Float.class) + || OnboardingResponseTradewebAccept.class.equals(Double.class) + || OnboardingResponseTradewebAccept.class.equals(Boolean.class) + || OnboardingResponseTradewebAccept.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((OnboardingResponseTradewebAccept.class.equals(Integer.class) + || OnboardingResponseTradewebAccept.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((OnboardingResponseTradewebAccept.class.equals(Float.class) + || OnboardingResponseTradewebAccept.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (OnboardingResponseTradewebAccept.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (OnboardingResponseTradewebAccept.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(OnboardingResponseTradewebAccept.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 'OnboardingResponseTradewebAccept'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'OnboardingResponseTradewebAccept'", + e); + } + + // deserialize OnboardingResponseTradewebReject + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (OnboardingResponseTradewebReject.class.equals(Integer.class) + || OnboardingResponseTradewebReject.class.equals(Long.class) + || OnboardingResponseTradewebReject.class.equals(Float.class) + || OnboardingResponseTradewebReject.class.equals(Double.class) + || OnboardingResponseTradewebReject.class.equals(Boolean.class) + || OnboardingResponseTradewebReject.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((OnboardingResponseTradewebReject.class.equals(Integer.class) + || OnboardingResponseTradewebReject.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((OnboardingResponseTradewebReject.class.equals(Float.class) + || OnboardingResponseTradewebReject.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (OnboardingResponseTradewebReject.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (OnboardingResponseTradewebReject.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(OnboardingResponseTradewebReject.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 'OnboardingResponseTradewebReject'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'OnboardingResponseTradewebReject'", + e); + } + + if (match == 1) { + OnboardingResponse ret = new OnboardingResponse(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for OnboardingResponse: %d classes match" + + " result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public OnboardingResponse getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "OnboardingResponse cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public OnboardingResponse() { + super("oneOf", Boolean.FALSE); + } + + public OnboardingResponse(OnboardingResponseDtccAccept o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public OnboardingResponse(OnboardingResponseDtccReject o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public OnboardingResponse(OnboardingResponseTradewebAccept o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public OnboardingResponse(OnboardingResponseTradewebReject o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("OnboardingResponseDtccAccept", OnboardingResponseDtccAccept.class); + schemas.put("OnboardingResponseDtccReject", OnboardingResponseDtccReject.class); + schemas.put("OnboardingResponseTradewebAccept", OnboardingResponseTradewebAccept.class); + schemas.put("OnboardingResponseTradewebReject", OnboardingResponseTradewebReject.class); + JSON.registerDescendants(OnboardingResponse.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DTCC_END_INVESTOR_ONBOARDING_ACCEPT", OnboardingResponseDtccAccept.class); + mappings.put("DTCC_END_INVESTOR_ONBOARDING_REJECT", OnboardingResponseDtccReject.class); + mappings.put( + "TRADEWEB_COSIGNING_DELEGATION_ACCEPT", OnboardingResponseTradewebAccept.class); + mappings.put( + "TRADEWEB_COSIGNING_DELEGATION_REJECT", OnboardingResponseTradewebReject.class); + mappings.put("OnboardingResponseDtccAccept", OnboardingResponseDtccAccept.class); + mappings.put("OnboardingResponseDtccReject", OnboardingResponseDtccReject.class); + mappings.put("OnboardingResponseTradewebAccept", OnboardingResponseTradewebAccept.class); + mappings.put("OnboardingResponseTradewebReject", OnboardingResponseTradewebReject.class); + mappings.put("OnboardingResponse", OnboardingResponse.class); + JSON.registerDiscriminator(OnboardingResponse.class, "responseType", mappings); + } + + @Override + public Map> getSchemas() { + return OnboardingResponse.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: OnboardingResponseDtccAccept, OnboardingResponseDtccReject, + * OnboardingResponseTradewebAccept, OnboardingResponseTradewebReject + * + *

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( + OnboardingResponseDtccAccept.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + OnboardingResponseDtccReject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + OnboardingResponseTradewebAccept.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + OnboardingResponseTradewebReject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be OnboardingResponseDtccAccept," + + " OnboardingResponseDtccReject, OnboardingResponseTradewebAccept," + + " OnboardingResponseTradewebReject"); + } + + /** + * Get the actual instance, which can be the following: OnboardingResponseDtccAccept, + * OnboardingResponseDtccReject, OnboardingResponseTradewebAccept, + * OnboardingResponseTradewebReject + * + * @return The actual instance (OnboardingResponseDtccAccept, OnboardingResponseDtccReject, + * OnboardingResponseTradewebAccept, OnboardingResponseTradewebReject) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `OnboardingResponseDtccAccept`. If the actual instance is not + * `OnboardingResponseDtccAccept`, the ClassCastException will be thrown. + * + * @return The actual instance of `OnboardingResponseDtccAccept` + * @throws ClassCastException if the instance is not `OnboardingResponseDtccAccept` + */ + public OnboardingResponseDtccAccept getOnboardingResponseDtccAccept() + throws ClassCastException { + return (OnboardingResponseDtccAccept) super.getActualInstance(); + } + + /** + * Get the actual instance of `OnboardingResponseDtccReject`. If the actual instance is not + * `OnboardingResponseDtccReject`, the ClassCastException will be thrown. + * + * @return The actual instance of `OnboardingResponseDtccReject` + * @throws ClassCastException if the instance is not `OnboardingResponseDtccReject` + */ + public OnboardingResponseDtccReject getOnboardingResponseDtccReject() + throws ClassCastException { + return (OnboardingResponseDtccReject) super.getActualInstance(); + } + + /** + * Get the actual instance of `OnboardingResponseTradewebAccept`. If the actual instance is not + * `OnboardingResponseTradewebAccept`, the ClassCastException will be thrown. + * + * @return The actual instance of `OnboardingResponseTradewebAccept` + * @throws ClassCastException if the instance is not `OnboardingResponseTradewebAccept` + */ + public OnboardingResponseTradewebAccept getOnboardingResponseTradewebAccept() + throws ClassCastException { + return (OnboardingResponseTradewebAccept) super.getActualInstance(); + } + + /** + * Get the actual instance of `OnboardingResponseTradewebReject`. If the actual instance is not + * `OnboardingResponseTradewebReject`, the ClassCastException will be thrown. + * + * @return The actual instance of `OnboardingResponseTradewebReject` + * @throws ClassCastException if the instance is not `OnboardingResponseTradewebReject` + */ + public OnboardingResponseTradewebReject getOnboardingResponseTradewebReject() + throws ClassCastException { + return (OnboardingResponseTradewebReject) 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 OnboardingResponseDtccAccept) { + if (getActualInstance() != null) { + joiner.add( + ((OnboardingResponseDtccAccept) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof OnboardingResponseDtccReject) { + if (getActualInstance() != null) { + joiner.add( + ((OnboardingResponseDtccReject) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof OnboardingResponseTradewebAccept) { + if (getActualInstance() != null) { + joiner.add( + ((OnboardingResponseTradewebAccept) getActualInstance()) + .toUrlQueryString(prefix + "one_of_2" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof OnboardingResponseTradewebReject) { + if (getActualInstance() != null) { + joiner.add( + ((OnboardingResponseTradewebReject) getActualInstance()) + .toUrlQueryString(prefix + "one_of_3" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/OnboardingResponseDtccAccept.java b/src/main/java/com/fireblocks/sdk/model/OnboardingResponseDtccAccept.java new file mode 100644 index 00000000..38ed7904 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/OnboardingResponseDtccAccept.java @@ -0,0 +1,185 @@ +/* + * 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; + +/** Accept a DTCC end-investor onboarding offer. Carries no arguments. */ +@JsonPropertyOrder({OnboardingResponseDtccAccept.JSON_PROPERTY_RESPONSE_TYPE}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class OnboardingResponseDtccAccept { + /** + * How you are answering the offer. Must be one of the values currently listed in the + * transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`. + */ + public enum ResponseTypeEnum { + DTCC_END_INVESTOR_ONBOARDING_ACCEPT(String.valueOf("DTCC_END_INVESTOR_ONBOARDING_ACCEPT")); + + private String value; + + ResponseTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResponseTypeEnum fromValue(String value) { + for (ResponseTypeEnum b : ResponseTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RESPONSE_TYPE = "responseType"; + @jakarta.annotation.Nonnull private ResponseTypeEnum responseType; + + public OnboardingResponseDtccAccept() {} + + @JsonCreator + public OnboardingResponseDtccAccept( + @JsonProperty(value = JSON_PROPERTY_RESPONSE_TYPE, required = true) + ResponseTypeEnum responseType) { + this.responseType = responseType; + } + + public OnboardingResponseDtccAccept responseType( + @jakarta.annotation.Nonnull ResponseTypeEnum responseType) { + this.responseType = responseType; + return this; + } + + /** + * How you are answering the offer. Must be one of the values currently listed in the + * transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`. + * + * @return responseType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ResponseTypeEnum getResponseType() { + return responseType; + } + + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResponseType(@jakarta.annotation.Nonnull ResponseTypeEnum responseType) { + this.responseType = responseType; + } + + /** Return true if this OnboardingResponseDtccAccept object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OnboardingResponseDtccAccept onboardingResponseDtccAccept = + (OnboardingResponseDtccAccept) o; + return Objects.equals(this.responseType, onboardingResponseDtccAccept.responseType); + } + + @Override + public int hashCode() { + return Objects.hash(responseType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OnboardingResponseDtccAccept {\n"); + sb.append(" responseType: ").append(toIndentedString(responseType)).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 `responseType` to the URL query string + if (getResponseType() != null) { + joiner.add( + String.format( + "%sresponseType%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getResponseType())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/OnboardingResponseDtccReject.java b/src/main/java/com/fireblocks/sdk/model/OnboardingResponseDtccReject.java new file mode 100644 index 00000000..d3e5a8bf --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/OnboardingResponseDtccReject.java @@ -0,0 +1,228 @@ +/* + * 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; + +/** Reject a DTCC end-investor onboarding offer. */ +@JsonPropertyOrder({ + OnboardingResponseDtccReject.JSON_PROPERTY_RESPONSE_TYPE, + OnboardingResponseDtccReject.JSON_PROPERTY_REASON +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class OnboardingResponseDtccReject { + /** + * How you are answering the offer. Must be one of the values currently listed in the + * transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`. + */ + public enum ResponseTypeEnum { + DTCC_END_INVESTOR_ONBOARDING_REJECT(String.valueOf("DTCC_END_INVESTOR_ONBOARDING_REJECT")); + + private String value; + + ResponseTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResponseTypeEnum fromValue(String value) { + for (ResponseTypeEnum b : ResponseTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RESPONSE_TYPE = "responseType"; + @jakarta.annotation.Nonnull private ResponseTypeEnum responseType; + + public static final String JSON_PROPERTY_REASON = "reason"; + @jakarta.annotation.Nonnull private String reason; + + public OnboardingResponseDtccReject() {} + + @JsonCreator + public OnboardingResponseDtccReject( + @JsonProperty(value = JSON_PROPERTY_RESPONSE_TYPE, required = true) + ResponseTypeEnum responseType, + @JsonProperty(value = JSON_PROPERTY_REASON, required = true) String reason) { + this.responseType = responseType; + this.reason = reason; + } + + public OnboardingResponseDtccReject responseType( + @jakarta.annotation.Nonnull ResponseTypeEnum responseType) { + this.responseType = responseType; + return this; + } + + /** + * How you are answering the offer. Must be one of the values currently listed in the + * transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`. + * + * @return responseType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ResponseTypeEnum getResponseType() { + return responseType; + } + + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResponseType(@jakarta.annotation.Nonnull ResponseTypeEnum responseType) { + this.responseType = responseType; + } + + public OnboardingResponseDtccReject reason(@jakarta.annotation.Nonnull String reason) { + this.reason = reason; + return this; + } + + /** + * Why the offer is being rejected. Recorded on-chain, where the counterparty can read it. + * + * @return reason + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getReason() { + return reason; + } + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReason(@jakarta.annotation.Nonnull String reason) { + this.reason = reason; + } + + /** Return true if this OnboardingResponseDtccReject object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OnboardingResponseDtccReject onboardingResponseDtccReject = + (OnboardingResponseDtccReject) o; + return Objects.equals(this.responseType, onboardingResponseDtccReject.responseType) + && Objects.equals(this.reason, onboardingResponseDtccReject.reason); + } + + @Override + public int hashCode() { + return Objects.hash(responseType, reason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OnboardingResponseDtccReject {\n"); + sb.append(" responseType: ").append(toIndentedString(responseType)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).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 `responseType` to the URL query string + if (getResponseType() != null) { + joiner.add( + String.format( + "%sresponseType%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getResponseType())))); + } + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add( + String.format( + "%sreason%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getReason())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/OnboardingResponseTradewebAccept.java b/src/main/java/com/fireblocks/sdk/model/OnboardingResponseTradewebAccept.java new file mode 100644 index 00000000..7fad8a59 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/OnboardingResponseTradewebAccept.java @@ -0,0 +1,186 @@ +/* + * 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; + +/** Accept a Tradeweb co-signing delegation offer. Carries no arguments. */ +@JsonPropertyOrder({OnboardingResponseTradewebAccept.JSON_PROPERTY_RESPONSE_TYPE}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class OnboardingResponseTradewebAccept { + /** + * How you are answering the offer. Must be one of the values currently listed in the + * transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`. + */ + public enum ResponseTypeEnum { + TRADEWEB_COSIGNING_DELEGATION_ACCEPT( + String.valueOf("TRADEWEB_COSIGNING_DELEGATION_ACCEPT")); + + private String value; + + ResponseTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResponseTypeEnum fromValue(String value) { + for (ResponseTypeEnum b : ResponseTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RESPONSE_TYPE = "responseType"; + @jakarta.annotation.Nonnull private ResponseTypeEnum responseType; + + public OnboardingResponseTradewebAccept() {} + + @JsonCreator + public OnboardingResponseTradewebAccept( + @JsonProperty(value = JSON_PROPERTY_RESPONSE_TYPE, required = true) + ResponseTypeEnum responseType) { + this.responseType = responseType; + } + + public OnboardingResponseTradewebAccept responseType( + @jakarta.annotation.Nonnull ResponseTypeEnum responseType) { + this.responseType = responseType; + return this; + } + + /** + * How you are answering the offer. Must be one of the values currently listed in the + * transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`. + * + * @return responseType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ResponseTypeEnum getResponseType() { + return responseType; + } + + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResponseType(@jakarta.annotation.Nonnull ResponseTypeEnum responseType) { + this.responseType = responseType; + } + + /** Return true if this OnboardingResponseTradewebAccept object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OnboardingResponseTradewebAccept onboardingResponseTradewebAccept = + (OnboardingResponseTradewebAccept) o; + return Objects.equals(this.responseType, onboardingResponseTradewebAccept.responseType); + } + + @Override + public int hashCode() { + return Objects.hash(responseType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OnboardingResponseTradewebAccept {\n"); + sb.append(" responseType: ").append(toIndentedString(responseType)).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 `responseType` to the URL query string + if (getResponseType() != null) { + joiner.add( + String.format( + "%sresponseType%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getResponseType())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/OnboardingResponseTradewebReject.java b/src/main/java/com/fireblocks/sdk/model/OnboardingResponseTradewebReject.java new file mode 100644 index 00000000..89a5d413 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/OnboardingResponseTradewebReject.java @@ -0,0 +1,189 @@ +/* + * 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; + +/** + * Reject a Tradeweb co-signing delegation offer. Carries no arguments — the DAR has nowhere + * on-ledger to record a reason, so none is accepted. + */ +@JsonPropertyOrder({OnboardingResponseTradewebReject.JSON_PROPERTY_RESPONSE_TYPE}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class OnboardingResponseTradewebReject { + /** + * How you are answering the offer. Must be one of the values currently listed in the + * transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`. + */ + public enum ResponseTypeEnum { + TRADEWEB_COSIGNING_DELEGATION_REJECT( + String.valueOf("TRADEWEB_COSIGNING_DELEGATION_REJECT")); + + private String value; + + ResponseTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResponseTypeEnum fromValue(String value) { + for (ResponseTypeEnum b : ResponseTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RESPONSE_TYPE = "responseType"; + @jakarta.annotation.Nonnull private ResponseTypeEnum responseType; + + public OnboardingResponseTradewebReject() {} + + @JsonCreator + public OnboardingResponseTradewebReject( + @JsonProperty(value = JSON_PROPERTY_RESPONSE_TYPE, required = true) + ResponseTypeEnum responseType) { + this.responseType = responseType; + } + + public OnboardingResponseTradewebReject responseType( + @jakarta.annotation.Nonnull ResponseTypeEnum responseType) { + this.responseType = responseType; + return this; + } + + /** + * How you are answering the offer. Must be one of the values currently listed in the + * transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`. + * + * @return responseType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ResponseTypeEnum getResponseType() { + return responseType; + } + + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResponseType(@jakarta.annotation.Nonnull ResponseTypeEnum responseType) { + this.responseType = responseType; + } + + /** Return true if this OnboardingResponseTradewebReject object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OnboardingResponseTradewebReject onboardingResponseTradewebReject = + (OnboardingResponseTradewebReject) o; + return Objects.equals(this.responseType, onboardingResponseTradewebReject.responseType); + } + + @Override + public int hashCode() { + return Objects.hash(responseType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OnboardingResponseTradewebReject {\n"); + sb.append(" responseType: ").append(toIndentedString(responseType)).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 `responseType` to the URL query string + if (getResponseType() != null) { + joiner.add( + String.format( + "%sresponseType%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getResponseType())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/OrderDetails.java b/src/main/java/com/fireblocks/sdk/model/OrderDetails.java index c1c13a9c..142ecd9b 100644 --- a/src/main/java/com/fireblocks/sdk/model/OrderDetails.java +++ b/src/main/java/com/fireblocks/sdk/model/OrderDetails.java @@ -52,7 +52,7 @@ public class OrderDetails { @jakarta.annotation.Nonnull private String id; public static final String JSON_PROPERTY_VIA = "via"; - @jakarta.annotation.Nonnull private AccessType via; + @jakarta.annotation.Nonnull private AccessTypeResponse via; public static final String JSON_PROPERTY_STATUS = "status"; @jakarta.annotation.Nonnull private OrderStatus status; @@ -107,7 +107,7 @@ public OrderDetails() {} @JsonCreator public OrderDetails( @JsonProperty(value = JSON_PROPERTY_ID, required = true) String id, - @JsonProperty(value = JSON_PROPERTY_VIA, required = true) AccessType via, + @JsonProperty(value = JSON_PROPERTY_VIA, required = true) AccessTypeResponse via, @JsonProperty(value = JSON_PROPERTY_STATUS, required = true) OrderStatus status, @JsonProperty(value = JSON_PROPERTY_CREATED_AT, required = true) OffsetDateTime createdAt, @@ -150,7 +150,7 @@ public void setId(@jakarta.annotation.Nonnull String id) { this.id = id; } - public OrderDetails via(@jakarta.annotation.Nonnull AccessType via) { + public OrderDetails via(@jakarta.annotation.Nonnull AccessTypeResponse via) { this.via = via; return this; } @@ -163,13 +163,13 @@ public OrderDetails via(@jakarta.annotation.Nonnull AccessType via) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_VIA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AccessType getVia() { + public AccessTypeResponse getVia() { return via; } @JsonProperty(JSON_PROPERTY_VIA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVia(@jakarta.annotation.Nonnull AccessType via) { + public void setVia(@jakarta.annotation.Nonnull AccessTypeResponse via) { this.via = via; } diff --git a/src/main/java/com/fireblocks/sdk/model/OrderSummary.java b/src/main/java/com/fireblocks/sdk/model/OrderSummary.java index 2d44f1cd..222f54a0 100644 --- a/src/main/java/com/fireblocks/sdk/model/OrderSummary.java +++ b/src/main/java/com/fireblocks/sdk/model/OrderSummary.java @@ -44,7 +44,7 @@ public class OrderSummary { @jakarta.annotation.Nonnull private String id; public static final String JSON_PROPERTY_VIA = "via"; - @jakarta.annotation.Nonnull private AccessType via; + @jakarta.annotation.Nonnull private AccessTypeResponse via; public static final String JSON_PROPERTY_SIDE = "side"; @jakarta.annotation.Nonnull private Side side; @@ -78,7 +78,7 @@ public OrderSummary() {} @JsonCreator public OrderSummary( @JsonProperty(value = JSON_PROPERTY_ID, required = true) String id, - @JsonProperty(value = JSON_PROPERTY_VIA, required = true) AccessType via, + @JsonProperty(value = JSON_PROPERTY_VIA, required = true) AccessTypeResponse via, @JsonProperty(value = JSON_PROPERTY_SIDE, required = true) Side side, @JsonProperty(value = JSON_PROPERTY_BASE_AMOUNT, required = true) String baseAmount, @JsonProperty(value = JSON_PROPERTY_BASE_ASSET_ID, required = true) String baseAssetId, @@ -123,7 +123,7 @@ public void setId(@jakarta.annotation.Nonnull String id) { this.id = id; } - public OrderSummary via(@jakarta.annotation.Nonnull AccessType via) { + public OrderSummary via(@jakarta.annotation.Nonnull AccessTypeResponse via) { this.via = via; return this; } @@ -136,13 +136,13 @@ public OrderSummary via(@jakarta.annotation.Nonnull AccessType via) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_VIA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AccessType getVia() { + public AccessTypeResponse getVia() { return via; } @JsonProperty(JSON_PROPERTY_VIA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVia(@jakarta.annotation.Nonnull AccessType via) { + public void setVia(@jakarta.annotation.Nonnull AccessTypeResponse via) { this.via = via; } diff --git a/src/main/java/com/fireblocks/sdk/model/ParticipantOnboardingPayload.java b/src/main/java/com/fireblocks/sdk/model/ParticipantOnboardingPayload.java new file mode 100644 index 00000000..0b38f964 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ParticipantOnboardingPayload.java @@ -0,0 +1,483 @@ +/* + * 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.Objects; +import java.util.StringJoiner; + +/** ParticipantOnboardingPayload */ +@JsonPropertyOrder({ + ParticipantOnboardingPayload.JSON_PROPERTY_VAULT_ACCOUNT_ID, + ParticipantOnboardingPayload.JSON_PROPERTY_ASSET, + ParticipantOnboardingPayload.JSON_PROPERTY_EXPIRES_AT, + ParticipantOnboardingPayload.JSON_PROPERTY_OPERATOR, + ParticipantOnboardingPayload.JSON_PROPERTY_PROVIDER, + ParticipantOnboardingPayload.JSON_PROPERTY_COMPLIANCE, + ParticipantOnboardingPayload.JSON_PROPERTY_REGISTRAR, + ParticipantOnboardingPayload.JSON_PROPERTY_CLIENT_ONBOARDER +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ParticipantOnboardingPayload { + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + @jakarta.annotation.Nonnull private String vaultAccountId; + + /** Chain asset — CANTON or CANTON_TEST. */ + public enum AssetEnum { + CANTON(String.valueOf("CANTON")), + + CANTON_TEST(String.valueOf("CANTON_TEST")); + + private String value; + + AssetEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AssetEnum fromValue(String value) { + for (AssetEnum b : AssetEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ASSET = "asset"; + @jakarta.annotation.Nonnull private AssetEnum asset; + + public static final String JSON_PROPERTY_EXPIRES_AT = "expiresAt"; + @jakarta.annotation.Nullable private OffsetDateTime expiresAt; + + public static final String JSON_PROPERTY_OPERATOR = "operator"; + @jakarta.annotation.Nonnull private String operator; + + public static final String JSON_PROPERTY_PROVIDER = "provider"; + @jakarta.annotation.Nonnull private String provider; + + public static final String JSON_PROPERTY_COMPLIANCE = "compliance"; + @jakarta.annotation.Nonnull private String compliance; + + public static final String JSON_PROPERTY_REGISTRAR = "registrar"; + @jakarta.annotation.Nonnull private String registrar; + + public static final String JSON_PROPERTY_CLIENT_ONBOARDER = "clientOnboarder"; + @jakarta.annotation.Nonnull private String clientOnboarder; + + public ParticipantOnboardingPayload() {} + + @JsonCreator + public ParticipantOnboardingPayload( + @JsonProperty(value = JSON_PROPERTY_VAULT_ACCOUNT_ID, required = true) + String vaultAccountId, + @JsonProperty(value = JSON_PROPERTY_ASSET, required = true) AssetEnum asset, + @JsonProperty(value = JSON_PROPERTY_OPERATOR, required = true) String operator, + @JsonProperty(value = JSON_PROPERTY_PROVIDER, required = true) String provider, + @JsonProperty(value = JSON_PROPERTY_COMPLIANCE, required = true) String compliance, + @JsonProperty(value = JSON_PROPERTY_REGISTRAR, required = true) String registrar, + @JsonProperty(value = JSON_PROPERTY_CLIENT_ONBOARDER, required = true) + String clientOnboarder) { + this.vaultAccountId = vaultAccountId; + this.asset = asset; + this.operator = operator; + this.provider = provider; + this.compliance = compliance; + this.registrar = registrar; + this.clientOnboarder = clientOnboarder; + } + + public ParticipantOnboardingPayload vaultAccountId( + @jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The vault account that acts as the participant. Its Canton party is derived for you. + * + * @return vaultAccountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVaultAccountId(@jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + public ParticipantOnboardingPayload asset(@jakarta.annotation.Nonnull AssetEnum asset) { + this.asset = asset; + return this; + } + + /** + * Chain asset — CANTON or CANTON_TEST. + * + * @return asset + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ASSET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetEnum getAsset() { + return asset; + } + + @JsonProperty(JSON_PROPERTY_ASSET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAsset(@jakarta.annotation.Nonnull AssetEnum asset) { + this.asset = asset; + } + + public ParticipantOnboardingPayload expiresAt( + @jakarta.annotation.Nullable OffsetDateTime expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * When the onboarding request expires if it has not been answered. RFC 3339. + * + * @return expiresAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getExpiresAt() { + return expiresAt; + } + + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExpiresAt(@jakarta.annotation.Nullable OffsetDateTime expiresAt) { + this.expiresAt = expiresAt; + } + + public ParticipantOnboardingPayload operator(@jakarta.annotation.Nonnull String operator) { + this.operator = operator; + return this; + } + + /** + * DTCC infra operator party id. + * + * @return operator + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPERATOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOperator() { + return operator; + } + + @JsonProperty(JSON_PROPERTY_OPERATOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOperator(@jakarta.annotation.Nonnull String operator) { + this.operator = operator; + } + + public ParticipantOnboardingPayload provider(@jakarta.annotation.Nonnull String provider) { + this.provider = provider; + return this; + } + + /** + * DTCC provider party id. + * + * @return provider + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProvider() { + return provider; + } + + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProvider(@jakarta.annotation.Nonnull String provider) { + this.provider = provider; + } + + public ParticipantOnboardingPayload compliance(@jakarta.annotation.Nonnull String compliance) { + this.compliance = compliance; + return this; + } + + /** + * DTCC compliance party id. + * + * @return compliance + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPLIANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCompliance() { + return compliance; + } + + @JsonProperty(JSON_PROPERTY_COMPLIANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCompliance(@jakarta.annotation.Nonnull String compliance) { + this.compliance = compliance; + } + + public ParticipantOnboardingPayload registrar(@jakarta.annotation.Nonnull String registrar) { + this.registrar = registrar; + return this; + } + + /** + * DTCC registrar party id — co-signs the accept. + * + * @return registrar + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REGISTRAR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRegistrar() { + return registrar; + } + + @JsonProperty(JSON_PROPERTY_REGISTRAR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRegistrar(@jakarta.annotation.Nonnull String registrar) { + this.registrar = registrar; + } + + public ParticipantOnboardingPayload clientOnboarder( + @jakarta.annotation.Nonnull String clientOnboarder) { + this.clientOnboarder = clientOnboarder; + return this; + } + + /** + * DTCC client onboarder party id — co-signs the accept. + * + * @return clientOnboarder + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CLIENT_ONBOARDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getClientOnboarder() { + return clientOnboarder; + } + + @JsonProperty(JSON_PROPERTY_CLIENT_ONBOARDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setClientOnboarder(@jakarta.annotation.Nonnull String clientOnboarder) { + this.clientOnboarder = clientOnboarder; + } + + /** Return true if this ParticipantOnboardingPayload object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParticipantOnboardingPayload participantOnboardingPayload = + (ParticipantOnboardingPayload) o; + return Objects.equals(this.vaultAccountId, participantOnboardingPayload.vaultAccountId) + && Objects.equals(this.asset, participantOnboardingPayload.asset) + && Objects.equals(this.expiresAt, participantOnboardingPayload.expiresAt) + && Objects.equals(this.operator, participantOnboardingPayload.operator) + && Objects.equals(this.provider, participantOnboardingPayload.provider) + && Objects.equals(this.compliance, participantOnboardingPayload.compliance) + && Objects.equals(this.registrar, participantOnboardingPayload.registrar) + && Objects.equals( + this.clientOnboarder, participantOnboardingPayload.clientOnboarder); + } + + @Override + public int hashCode() { + return Objects.hash( + vaultAccountId, + asset, + expiresAt, + operator, + provider, + compliance, + registrar, + clientOnboarder); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParticipantOnboardingPayload {\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); + sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); + sb.append(" compliance: ").append(toIndentedString(compliance)).append("\n"); + sb.append(" registrar: ").append(toIndentedString(registrar)).append("\n"); + sb.append(" clientOnboarder: ").append(toIndentedString(clientOnboarder)).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 `vaultAccountId` to the URL query string + if (getVaultAccountId() != null) { + joiner.add( + String.format( + "%svaultAccountId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getVaultAccountId())))); + } + + // add `asset` to the URL query string + if (getAsset() != null) { + joiner.add( + String.format( + "%sasset%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAsset())))); + } + + // add `expiresAt` to the URL query string + if (getExpiresAt() != null) { + joiner.add( + String.format( + "%sexpiresAt%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getExpiresAt())))); + } + + // add `operator` to the URL query string + if (getOperator() != null) { + joiner.add( + String.format( + "%soperator%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getOperator())))); + } + + // add `provider` to the URL query string + if (getProvider() != null) { + joiner.add( + String.format( + "%sprovider%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getProvider())))); + } + + // add `compliance` to the URL query string + if (getCompliance() != null) { + joiner.add( + String.format( + "%scompliance%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getCompliance())))); + } + + // add `registrar` to the URL query string + if (getRegistrar() != null) { + joiner.add( + String.format( + "%sregistrar%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getRegistrar())))); + } + + // add `clientOnboarder` to the URL query string + if (getClientOnboarder() != null) { + joiner.add( + String.format( + "%sclientOnboarder%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getClientOnboarder())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/PositionRelatedTransaction.java b/src/main/java/com/fireblocks/sdk/model/PositionRelatedTransaction.java index edcb9dd1..03779552 100644 --- a/src/main/java/com/fireblocks/sdk/model/PositionRelatedTransaction.java +++ b/src/main/java/com/fireblocks/sdk/model/PositionRelatedTransaction.java @@ -31,7 +31,8 @@ PositionRelatedTransaction.JSON_PROPERTY_TIMESTAMP, PositionRelatedTransaction.JSON_PROPERTY_STATUS, PositionRelatedTransaction.JSON_PROPERTY_AMOUNT, - PositionRelatedTransaction.JSON_PROPERTY_TX_NOTE + PositionRelatedTransaction.JSON_PROPERTY_TX_NOTE, + PositionRelatedTransaction.JSON_PROPERTY_COMPLETION_TIME }) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -147,6 +148,9 @@ public static StatusEnum fromValue(String value) { public static final String JSON_PROPERTY_TX_NOTE = "txNote"; @jakarta.annotation.Nullable private String txNote; + public static final String JSON_PROPERTY_COMPLETION_TIME = "completionTime"; + @jakarta.annotation.Nullable private OffsetDateTime completionTime; + public PositionRelatedTransaction() {} @JsonCreator @@ -325,6 +329,30 @@ public void setTxNote(@jakarta.annotation.Nullable String txNote) { this.txNote = txNote; } + public PositionRelatedTransaction completionTime( + @jakarta.annotation.Nullable OffsetDateTime completionTime) { + this.completionTime = completionTime; + return this; + } + + /** + * ISO timestamp when Cosmos unbonding is scheduled to end. Absent on other chains. + * + * @return completionTime + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPLETION_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCompletionTime() { + return completionTime; + } + + @JsonProperty(JSON_PROPERTY_COMPLETION_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCompletionTime(@jakarta.annotation.Nullable OffsetDateTime completionTime) { + this.completionTime = completionTime; + } + /** Return true if this PositionRelatedTransaction object is equal to o. */ @Override public boolean equals(Object o) { @@ -342,12 +370,14 @@ public boolean equals(Object o) { && Objects.equals(this.timestamp, positionRelatedTransaction.timestamp) && Objects.equals(this.status, positionRelatedTransaction.status) && Objects.equals(this.amount, positionRelatedTransaction.amount) - && Objects.equals(this.txNote, positionRelatedTransaction.txNote); + && Objects.equals(this.txNote, positionRelatedTransaction.txNote) + && Objects.equals(this.completionTime, positionRelatedTransaction.completionTime); } @Override public int hashCode() { - return Objects.hash(txId, txHash, stakingOperation, timestamp, status, amount, txNote); + return Objects.hash( + txId, txHash, stakingOperation, timestamp, status, amount, txNote, completionTime); } @Override @@ -361,6 +391,7 @@ public String toString() { sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); sb.append(" txNote: ").append(toIndentedString(txNote)).append("\n"); + sb.append(" completionTime: ").append(toIndentedString(completionTime)).append("\n"); sb.append("}"); return sb.toString(); } @@ -478,6 +509,16 @@ public String toUrlQueryString(String prefix) { ApiClient.urlEncode(ApiClient.valueToString(getTxNote())))); } + // add `completionTime` to the URL query string + if (getCompletionTime() != null) { + joiner.add( + String.format( + "%scompletionTime%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getCompletionTime())))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/QuorumApprovalState.java b/src/main/java/com/fireblocks/sdk/model/QuorumApprovalState.java new file mode 100644 index 00000000..9c64f967 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/QuorumApprovalState.java @@ -0,0 +1,69 @@ +/* + * 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.JsonValue; + +/** + * Whether an approval requirement has been met. Treat this as authoritative rather than comparing + * the counts yourself: a group can show `currentApprovalCount` equal to + * `threshold` and still be `PENDING` when the request additionally requires the + * workspace owner's approval. + */ +public enum QuorumApprovalState { + APPROVED("APPROVED"), + + PENDING("PENDING"); + + private String value; + + QuorumApprovalState(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static QuorumApprovalState fromValue(String value) { + for (QuorumApprovalState b : QuorumApprovalState.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/QuorumGroup.java b/src/main/java/com/fireblocks/sdk/model/QuorumGroup.java new file mode 100644 index 00000000..aeb84c26 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/QuorumGroup.java @@ -0,0 +1,292 @@ +/* + * 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.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** A single tier of a ruleset: a threshold and the approvals collected toward it. */ +@JsonPropertyOrder({ + QuorumGroup.JSON_PROPERTY_THRESHOLD, + QuorumGroup.JSON_PROPERTY_CURRENT_APPROVAL_COUNT, + QuorumGroup.JSON_PROPERTY_STATUS, + QuorumGroup.JSON_PROPERTY_MEMBERS +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class QuorumGroup { + public static final String JSON_PROPERTY_THRESHOLD = "threshold"; + @jakarta.annotation.Nonnull private Integer threshold; + + public static final String JSON_PROPERTY_CURRENT_APPROVAL_COUNT = "currentApprovalCount"; + @jakarta.annotation.Nonnull private Integer currentApprovalCount; + + public static final String JSON_PROPERTY_STATUS = "status"; + @jakarta.annotation.Nonnull private QuorumApprovalState status; + + public static final String JSON_PROPERTY_MEMBERS = "members"; + @jakarta.annotation.Nullable private List members; + + public QuorumGroup() {} + + @JsonCreator + public QuorumGroup( + @JsonProperty(value = JSON_PROPERTY_THRESHOLD, required = true) Integer threshold, + @JsonProperty(value = JSON_PROPERTY_CURRENT_APPROVAL_COUNT, required = true) + Integer currentApprovalCount, + @JsonProperty(value = JSON_PROPERTY_STATUS, required = true) + QuorumApprovalState status) { + this.threshold = threshold; + this.currentApprovalCount = currentApprovalCount; + this.status = status; + } + + public QuorumGroup threshold(@jakarta.annotation.Nonnull Integer threshold) { + this.threshold = threshold; + return this; + } + + /** + * Number of approvals this tier requires. + * + * @return threshold + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getThreshold() { + return threshold; + } + + @JsonProperty(JSON_PROPERTY_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setThreshold(@jakarta.annotation.Nonnull Integer threshold) { + this.threshold = threshold; + } + + public QuorumGroup currentApprovalCount( + @jakarta.annotation.Nonnull Integer currentApprovalCount) { + this.currentApprovalCount = currentApprovalCount; + return this; + } + + /** + * Approvals collected so far toward `threshold`. + * + * @return currentApprovalCount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CURRENT_APPROVAL_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCurrentApprovalCount() { + return currentApprovalCount; + } + + @JsonProperty(JSON_PROPERTY_CURRENT_APPROVAL_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCurrentApprovalCount(@jakarta.annotation.Nonnull Integer currentApprovalCount) { + this.currentApprovalCount = currentApprovalCount; + } + + public QuorumGroup status(@jakarta.annotation.Nonnull QuorumApprovalState status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QuorumApprovalState getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@jakarta.annotation.Nonnull QuorumApprovalState status) { + this.status = status; + } + + public QuorumGroup members(@jakarta.annotation.Nullable List members) { + this.members = members; + return this; + } + + public QuorumGroup addMembersItem(Integer membersItem) { + if (this.members == null) { + this.members = new ArrayList<>(); + } + this.members.add(membersItem); + return this; + } + + /** + * Indexes into the top-level `users` array identifying the users who belong to this + * tier. Returned only for `quorumStatusMode=FULL`; omitted otherwise. + * + * @return members + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MEMBERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getMembers() { + return members; + } + + @JsonProperty(JSON_PROPERTY_MEMBERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMembers(@jakarta.annotation.Nullable List members) { + this.members = members; + } + + /** Return true if this QuorumGroup object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuorumGroup quorumGroup = (QuorumGroup) o; + return Objects.equals(this.threshold, quorumGroup.threshold) + && Objects.equals(this.currentApprovalCount, quorumGroup.currentApprovalCount) + && Objects.equals(this.status, quorumGroup.status) + && Objects.equals(this.members, quorumGroup.members); + } + + @Override + public int hashCode() { + return Objects.hash(threshold, currentApprovalCount, status, members); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuorumGroup {\n"); + sb.append(" threshold: ").append(toIndentedString(threshold)).append("\n"); + sb.append(" currentApprovalCount: ") + .append(toIndentedString(currentApprovalCount)) + .append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" members: ").append(toIndentedString(members)).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 `threshold` to the URL query string + if (getThreshold() != null) { + joiner.add( + String.format( + "%sthreshold%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getThreshold())))); + } + + // add `currentApprovalCount` to the URL query string + if (getCurrentApprovalCount() != null) { + joiner.add( + String.format( + "%scurrentApprovalCount%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getCurrentApprovalCount())))); + } + + // 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 `members` to the URL query string + if (getMembers() != null) { + for (int i = 0; i < getMembers().size(); i++) { + joiner.add( + String.format( + "%smembers%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getMembers().get(i))))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/QuorumRequestState.java b/src/main/java/com/fireblocks/sdk/model/QuorumRequestState.java new file mode 100644 index 00000000..daced809 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/QuorumRequestState.java @@ -0,0 +1,75 @@ +/* + * 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.JsonValue; + +/** + * The approval request's overall state. Anything other than `PENDING` means the + * request is no longer awaiting approvals. + */ +public enum QuorumRequestState { + PENDING("PENDING"), + + APPROVED("APPROVED"), + + REJECTED("REJECTED"), + + CANCELLED("CANCELLED"), + + TIMED_OUT("TIMED_OUT"), + + FAILED("FAILED"); + + private String value; + + QuorumRequestState(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static QuorumRequestState fromValue(String value) { + for (QuorumRequestState b : QuorumRequestState.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/QuorumRuleset.java b/src/main/java/com/fireblocks/sdk/model/QuorumRuleset.java new file mode 100644 index 00000000..1ac970f4 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/QuorumRuleset.java @@ -0,0 +1,292 @@ +/* + * 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.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** One sub-request of the approval criteria, made up of one or more tiers. */ +@JsonPropertyOrder({ + QuorumRuleset.JSON_PROPERTY_GROUP_MATCH, + QuorumRuleset.JSON_PROPERTY_STATUS, + QuorumRuleset.JSON_PROPERTY_GROUPS +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class QuorumRuleset { + /** + * Whether every tier in `groups` must be satisfied (`ALL`) or any single + * one of them (`ANY`). + */ + public enum GroupMatchEnum { + ALL(String.valueOf("ALL")), + + ANY(String.valueOf("ANY")); + + private String value; + + GroupMatchEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static GroupMatchEnum fromValue(String value) { + for (GroupMatchEnum b : GroupMatchEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_GROUP_MATCH = "groupMatch"; + @jakarta.annotation.Nonnull private GroupMatchEnum groupMatch; + + public static final String JSON_PROPERTY_STATUS = "status"; + @jakarta.annotation.Nonnull private QuorumApprovalState status; + + public static final String JSON_PROPERTY_GROUPS = "groups"; + @jakarta.annotation.Nonnull private List groups; + + public QuorumRuleset() {} + + @JsonCreator + public QuorumRuleset( + @JsonProperty(value = JSON_PROPERTY_GROUP_MATCH, required = true) + GroupMatchEnum groupMatch, + @JsonProperty(value = JSON_PROPERTY_STATUS, required = true) QuorumApprovalState status, + @JsonProperty(value = JSON_PROPERTY_GROUPS, required = true) List groups) { + this.groupMatch = groupMatch; + this.status = status; + this.groups = groups; + } + + public QuorumRuleset groupMatch(@jakarta.annotation.Nonnull GroupMatchEnum groupMatch) { + this.groupMatch = groupMatch; + return this; + } + + /** + * Whether every tier in `groups` must be satisfied (`ALL`) or any single + * one of them (`ANY`). + * + * @return groupMatch + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GROUP_MATCH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GroupMatchEnum getGroupMatch() { + return groupMatch; + } + + @JsonProperty(JSON_PROPERTY_GROUP_MATCH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGroupMatch(@jakarta.annotation.Nonnull GroupMatchEnum groupMatch) { + this.groupMatch = groupMatch; + } + + public QuorumRuleset status(@jakarta.annotation.Nonnull QuorumApprovalState status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QuorumApprovalState getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@jakarta.annotation.Nonnull QuorumApprovalState status) { + this.status = status; + } + + public QuorumRuleset groups(@jakarta.annotation.Nonnull List groups) { + this.groups = groups; + return this; + } + + public QuorumRuleset addGroupsItem(QuorumGroup groupsItem) { + if (this.groups == null) { + this.groups = new ArrayList<>(); + } + this.groups.add(groupsItem); + return this; + } + + /** + * The tiers of this sub-request, evaluated according to `groupMatch`. + * + * @return groups + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GROUPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getGroups() { + return groups; + } + + @JsonProperty(JSON_PROPERTY_GROUPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGroups(@jakarta.annotation.Nonnull List groups) { + this.groups = groups; + } + + /** Return true if this QuorumRuleset object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuorumRuleset quorumRuleset = (QuorumRuleset) o; + return Objects.equals(this.groupMatch, quorumRuleset.groupMatch) + && Objects.equals(this.status, quorumRuleset.status) + && Objects.equals(this.groups, quorumRuleset.groups); + } + + @Override + public int hashCode() { + return Objects.hash(groupMatch, status, groups); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuorumRuleset {\n"); + sb.append(" groupMatch: ").append(toIndentedString(groupMatch)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" groups: ").append(toIndentedString(groups)).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 `groupMatch` to the URL query string + if (getGroupMatch() != null) { + joiner.add( + String.format( + "%sgroupMatch%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getGroupMatch())))); + } + + // 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 `groups` to the URL query string + if (getGroups() != null) { + for (int i = 0; i < getGroups().size(); i++) { + if (getGroups().get(i) != null) { + joiner.add( + getGroups() + .get(i) + .toUrlQueryString( + String.format( + "%sgroups%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/QuorumStatus.java b/src/main/java/com/fireblocks/sdk/model/QuorumStatus.java new file mode 100644 index 00000000..24b67a13 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/QuorumStatus.java @@ -0,0 +1,257 @@ +/* + * 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.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** + * The approval quorum's structure and progress for this request. `null` when + * `quorumStatusMode` is omitted or `NONE`. Also `null` on an + * otherwise successful response when the quorum cannot be reported faithfully — a multi-tier + * request in a workspace that does not maintain per-tier approval counts — so absence here does not + * imply the request has no quorum. The object may carry additional backend-defined fields beyond + * those documented. + */ +@JsonPropertyOrder({ + QuorumStatus.JSON_PROPERTY_REQUEST_STATUS, + QuorumStatus.JSON_PROPERTY_USERS, + QuorumStatus.JSON_PROPERTY_QUORUM +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class QuorumStatus { + public static final String JSON_PROPERTY_REQUEST_STATUS = "requestStatus"; + @jakarta.annotation.Nonnull private QuorumRequestState requestStatus; + + public static final String JSON_PROPERTY_USERS = "users"; + @jakarta.annotation.Nullable private List users; + + public static final String JSON_PROPERTY_QUORUM = "quorum"; + @jakarta.annotation.Nonnull private QuorumStatusQuorum quorum; + + public QuorumStatus() {} + + @JsonCreator + public QuorumStatus( + @JsonProperty(value = JSON_PROPERTY_REQUEST_STATUS, required = true) + QuorumRequestState requestStatus, + @JsonProperty(value = JSON_PROPERTY_QUORUM, required = true) + QuorumStatusQuorum quorum) { + this.requestStatus = requestStatus; + this.quorum = quorum; + } + + public QuorumStatus requestStatus( + @jakarta.annotation.Nonnull QuorumRequestState requestStatus) { + this.requestStatus = requestStatus; + return this; + } + + /** + * Get requestStatus + * + * @return requestStatus + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REQUEST_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QuorumRequestState getRequestStatus() { + return requestStatus; + } + + @JsonProperty(JSON_PROPERTY_REQUEST_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRequestStatus(@jakarta.annotation.Nonnull QuorumRequestState requestStatus) { + this.requestStatus = requestStatus; + } + + public QuorumStatus users(@jakarta.annotation.Nullable List users) { + this.users = users; + return this; + } + + public QuorumStatus addUsersItem(QuorumUser usersItem) { + if (this.users == null) { + this.users = new ArrayList<>(); + } + this.users.add(usersItem); + return this; + } + + /** + * Every user participating in this request's quorum. Returned only for + * `quorumStatusMode=FULL`; omitted otherwise. + * + * @return users + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getUsers() { + return users; + } + + @JsonProperty(JSON_PROPERTY_USERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUsers(@jakarta.annotation.Nullable List users) { + this.users = users; + } + + public QuorumStatus quorum(@jakarta.annotation.Nonnull QuorumStatusQuorum quorum) { + this.quorum = quorum; + return this; + } + + /** + * Get quorum + * + * @return quorum + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUORUM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QuorumStatusQuorum getQuorum() { + return quorum; + } + + @JsonProperty(JSON_PROPERTY_QUORUM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuorum(@jakarta.annotation.Nonnull QuorumStatusQuorum quorum) { + this.quorum = quorum; + } + + /** Return true if this QuorumStatus object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuorumStatus quorumStatus = (QuorumStatus) o; + return Objects.equals(this.requestStatus, quorumStatus.requestStatus) + && Objects.equals(this.users, quorumStatus.users) + && Objects.equals(this.quorum, quorumStatus.quorum); + } + + @Override + public int hashCode() { + return Objects.hash(requestStatus, users, quorum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuorumStatus {\n"); + sb.append(" requestStatus: ").append(toIndentedString(requestStatus)).append("\n"); + sb.append(" users: ").append(toIndentedString(users)).append("\n"); + sb.append(" quorum: ").append(toIndentedString(quorum)).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 `requestStatus` to the URL query string + if (getRequestStatus() != null) { + joiner.add( + String.format( + "%srequestStatus%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getRequestStatus())))); + } + + // add `users` to the URL query string + if (getUsers() != null) { + for (int i = 0; i < getUsers().size(); i++) { + if (getUsers().get(i) != null) { + joiner.add( + getUsers() + .get(i) + .toUrlQueryString( + String.format( + "%susers%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `quorum` to the URL query string + if (getQuorum() != null) { + joiner.add(getQuorum().toUrlQueryString(prefix + "quorum" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/QuorumStatusQuorum.java b/src/main/java/com/fireblocks/sdk/model/QuorumStatusQuorum.java new file mode 100644 index 00000000..2f8bd653 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/QuorumStatusQuorum.java @@ -0,0 +1,325 @@ +/* + * 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 = QuorumStatusQuorum.QuorumStatusQuorumDeserializer.class) +@JsonSerialize(using = QuorumStatusQuorum.QuorumStatusQuorumSerializer.class) +public class QuorumStatusQuorum extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(QuorumStatusQuorum.class.getName()); + + public static class QuorumStatusQuorumSerializer extends StdSerializer { + public QuorumStatusQuorumSerializer(Class t) { + super(t); + } + + public QuorumStatusQuorumSerializer() { + this(null); + } + + @Override + public void serialize( + QuorumStatusQuorum value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class QuorumStatusQuorumDeserializer extends StdDeserializer { + public QuorumStatusQuorumDeserializer() { + this(QuorumStatusQuorum.class); + } + + public QuorumStatusQuorumDeserializer(Class vc) { + super(vc); + } + + @Override + public QuorumStatusQuorum 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 RulesetQuorum + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (RulesetQuorum.class.equals(Integer.class) + || RulesetQuorum.class.equals(Long.class) + || RulesetQuorum.class.equals(Float.class) + || RulesetQuorum.class.equals(Double.class) + || RulesetQuorum.class.equals(Boolean.class) + || RulesetQuorum.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((RulesetQuorum.class.equals(Integer.class) + || RulesetQuorum.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((RulesetQuorum.class.equals(Float.class) + || RulesetQuorum.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (RulesetQuorum.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (RulesetQuorum.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(RulesetQuorum.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 'RulesetQuorum'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'RulesetQuorum'", e); + } + + // deserialize SimpleQuorum + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SimpleQuorum.class.equals(Integer.class) + || SimpleQuorum.class.equals(Long.class) + || SimpleQuorum.class.equals(Float.class) + || SimpleQuorum.class.equals(Double.class) + || SimpleQuorum.class.equals(Boolean.class) + || SimpleQuorum.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SimpleQuorum.class.equals(Integer.class) + || SimpleQuorum.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SimpleQuorum.class.equals(Float.class) + || SimpleQuorum.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (SimpleQuorum.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SimpleQuorum.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(SimpleQuorum.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 'SimpleQuorum'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SimpleQuorum'", e); + } + + if (match == 1) { + QuorumStatusQuorum ret = new QuorumStatusQuorum(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for QuorumStatusQuorum: %d classes match" + + " result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public QuorumStatusQuorum getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "QuorumStatusQuorum cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public QuorumStatusQuorum() { + super("oneOf", Boolean.FALSE); + } + + public QuorumStatusQuorum(RulesetQuorum o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public QuorumStatusQuorum(SimpleQuorum o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("RulesetQuorum", RulesetQuorum.class); + schemas.put("SimpleQuorum", SimpleQuorum.class); + JSON.registerDescendants(QuorumStatusQuorum.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RULESET", RulesetQuorum.class); + mappings.put("SIMPLE", SimpleQuorum.class); + mappings.put("RulesetQuorum", RulesetQuorum.class); + mappings.put("SimpleQuorum", SimpleQuorum.class); + mappings.put("QuorumStatus_quorum", QuorumStatusQuorum.class); + JSON.registerDiscriminator(QuorumStatusQuorum.class, "type", mappings); + } + + @Override + public Map> getSchemas() { + return QuorumStatusQuorum.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: RulesetQuorum, SimpleQuorum + * + *

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(RulesetQuorum.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(SimpleQuorum.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be RulesetQuorum, SimpleQuorum"); + } + + /** + * Get the actual instance, which can be the following: RulesetQuorum, SimpleQuorum + * + * @return The actual instance (RulesetQuorum, SimpleQuorum) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `RulesetQuorum`. If the actual instance is not `RulesetQuorum`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `RulesetQuorum` + * @throws ClassCastException if the instance is not `RulesetQuorum` + */ + public RulesetQuorum getRulesetQuorum() throws ClassCastException { + return (RulesetQuorum) super.getActualInstance(); + } + + /** + * Get the actual instance of `SimpleQuorum`. If the actual instance is not `SimpleQuorum`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `SimpleQuorum` + * @throws ClassCastException if the instance is not `SimpleQuorum` + */ + public SimpleQuorum getSimpleQuorum() throws ClassCastException { + return (SimpleQuorum) 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 SimpleQuorum) { + if (getActualInstance() != null) { + joiner.add( + ((SimpleQuorum) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof RulesetQuorum) { + if (getActualInstance() != null) { + joiner.add( + ((RulesetQuorum) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/QuorumUser.java b/src/main/java/com/fireblocks/sdk/model/QuorumUser.java new file mode 100644 index 00000000..79bf45a3 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/QuorumUser.java @@ -0,0 +1,273 @@ +/* + * 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; + +/** A user who participates in this request's approval quorum, and their approval state. */ +@JsonPropertyOrder({ + QuorumUser.JSON_PROPERTY_INDEX, + QuorumUser.JSON_PROPERTY_USER_ID, + QuorumUser.JSON_PROPERTY_STATUS, + QuorumUser.JSON_PROPERTY_IS_MANDATORY_OWNER +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class QuorumUser { + public static final String JSON_PROPERTY_INDEX = "index"; + @jakarta.annotation.Nonnull private Integer index; + + public static final String JSON_PROPERTY_USER_ID = "userId"; + @jakarta.annotation.Nonnull private String userId; + + public static final String JSON_PROPERTY_STATUS = "status"; + @jakarta.annotation.Nonnull private QuorumApprovalState status; + + public static final String JSON_PROPERTY_IS_MANDATORY_OWNER = "isMandatoryOwner"; + @jakarta.annotation.Nullable private Boolean isMandatoryOwner; + + public QuorumUser() {} + + @JsonCreator + public QuorumUser( + @JsonProperty(value = JSON_PROPERTY_INDEX, required = true) Integer index, + @JsonProperty(value = JSON_PROPERTY_USER_ID, required = true) String userId, + @JsonProperty(value = JSON_PROPERTY_STATUS, required = true) + QuorumApprovalState status) { + this.index = index; + this.userId = userId; + this.status = status; + } + + public QuorumUser index(@jakarta.annotation.Nonnull Integer index) { + this.index = index; + return this; + } + + /** + * Zero-based position of this user within the `users` array. The `members` + * arrays elsewhere in the document reference users by this index rather than repeating the user + * ID. + * + * @return index + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INDEX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getIndex() { + return index; + } + + @JsonProperty(JSON_PROPERTY_INDEX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIndex(@jakarta.annotation.Nonnull Integer index) { + this.index = index; + } + + public QuorumUser userId(@jakarta.annotation.Nonnull String userId) { + this.userId = userId; + return this; + } + + /** + * The participating user's ID. + * + * @return userId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUserId() { + return userId; + } + + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserId(@jakarta.annotation.Nonnull String userId) { + this.userId = userId; + } + + public QuorumUser status(@jakarta.annotation.Nonnull QuorumApprovalState status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QuorumApprovalState getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@jakarta.annotation.Nonnull QuorumApprovalState status) { + this.status = status; + } + + public QuorumUser isMandatoryOwner(@jakarta.annotation.Nullable Boolean isMandatoryOwner) { + this.isMandatoryOwner = isMandatoryOwner; + return this; + } + + /** + * Present and `true` only for the workspace owner, when this request additionally + * requires the owner's approval. Absent for every other participant. + * + * @return isMandatoryOwner + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_MANDATORY_OWNER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsMandatoryOwner() { + return isMandatoryOwner; + } + + @JsonProperty(JSON_PROPERTY_IS_MANDATORY_OWNER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsMandatoryOwner(@jakarta.annotation.Nullable Boolean isMandatoryOwner) { + this.isMandatoryOwner = isMandatoryOwner; + } + + /** Return true if this QuorumUser object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuorumUser quorumUser = (QuorumUser) o; + return Objects.equals(this.index, quorumUser.index) + && Objects.equals(this.userId, quorumUser.userId) + && Objects.equals(this.status, quorumUser.status) + && Objects.equals(this.isMandatoryOwner, quorumUser.isMandatoryOwner); + } + + @Override + public int hashCode() { + return Objects.hash(index, userId, status, isMandatoryOwner); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuorumUser {\n"); + sb.append(" index: ").append(toIndentedString(index)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" isMandatoryOwner: ").append(toIndentedString(isMandatoryOwner)).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 `index` to the URL query string + if (getIndex() != null) { + joiner.add( + String.format( + "%sindex%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getIndex())))); + } + + // add `userId` to the URL query string + if (getUserId() != null) { + joiner.add( + String.format( + "%suserId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getUserId())))); + } + + // 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 `isMandatoryOwner` to the URL query string + if (getIsMandatoryOwner() != null) { + joiner.add( + String.format( + "%sisMandatoryOwner%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getIsMandatoryOwner())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/Quote.java b/src/main/java/com/fireblocks/sdk/model/Quote.java index 4758e5da..e698c00e 100644 --- a/src/main/java/com/fireblocks/sdk/model/Quote.java +++ b/src/main/java/com/fireblocks/sdk/model/Quote.java @@ -50,7 +50,7 @@ comments = "Generator version: 7.14.0") public class Quote { public static final String JSON_PROPERTY_VIA = "via"; - @jakarta.annotation.Nonnull private AccessType via; + @jakarta.annotation.Nonnull private AccessTypeResponse via; public static final String JSON_PROPERTY_ID = "id"; @jakarta.annotation.Nonnull private String id; @@ -138,7 +138,7 @@ public Quote() {} @JsonCreator public Quote( - @JsonProperty(value = JSON_PROPERTY_VIA, required = true) AccessType via, + @JsonProperty(value = JSON_PROPERTY_VIA, required = true) AccessTypeResponse via, @JsonProperty(value = JSON_PROPERTY_ID, required = true) String id, @JsonProperty(value = JSON_PROPERTY_QUOTE_ASSET_ID, required = true) String quoteAssetId, @@ -159,7 +159,7 @@ public Quote( this.type = type; } - public Quote via(@jakarta.annotation.Nonnull AccessType via) { + public Quote via(@jakarta.annotation.Nonnull AccessTypeResponse via) { this.via = via; return this; } @@ -172,13 +172,13 @@ public Quote via(@jakarta.annotation.Nonnull AccessType via) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_VIA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AccessType getVia() { + public AccessTypeResponse getVia() { return via; } @JsonProperty(JSON_PROPERTY_VIA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVia(@jakarta.annotation.Nonnull AccessType via) { + public void setVia(@jakarta.annotation.Nonnull AccessTypeResponse via) { this.via = via; } diff --git a/src/main/java/com/fireblocks/sdk/model/QuoteOffer.java b/src/main/java/com/fireblocks/sdk/model/QuoteOffer.java index 381c5a41..918180df 100644 --- a/src/main/java/com/fireblocks/sdk/model/QuoteOffer.java +++ b/src/main/java/com/fireblocks/sdk/model/QuoteOffer.java @@ -51,7 +51,7 @@ comments = "Generator version: 7.14.0") public class QuoteOffer { public static final String JSON_PROPERTY_VIA = "via"; - @jakarta.annotation.Nonnull private AccessType via; + @jakarta.annotation.Nonnull private AccessTypeResponse via; public static final String JSON_PROPERTY_ID = "id"; @jakarta.annotation.Nonnull private String id; @@ -173,7 +173,7 @@ public QuoteOffer() {} @JsonCreator public QuoteOffer( - @JsonProperty(value = JSON_PROPERTY_VIA, required = true) AccessType via, + @JsonProperty(value = JSON_PROPERTY_VIA, required = true) AccessTypeResponse via, @JsonProperty(value = JSON_PROPERTY_ID, required = true) String id, @JsonProperty(value = JSON_PROPERTY_QUOTE_ASSET_ID, required = true) String quoteAssetId, @@ -197,7 +197,7 @@ public QuoteOffer( this.offerType = offerType; } - public QuoteOffer via(@jakarta.annotation.Nonnull AccessType via) { + public QuoteOffer via(@jakarta.annotation.Nonnull AccessTypeResponse via) { this.via = via; return this; } @@ -210,13 +210,13 @@ public QuoteOffer via(@jakarta.annotation.Nonnull AccessType via) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_VIA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AccessType getVia() { + public AccessTypeResponse getVia() { return via; } @JsonProperty(JSON_PROPERTY_VIA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVia(@jakarta.annotation.Nonnull AccessType via) { + public void setVia(@jakarta.annotation.Nonnull AccessTypeResponse via) { this.via = via; } diff --git a/src/main/java/com/fireblocks/sdk/model/Rate.java b/src/main/java/com/fireblocks/sdk/model/Rate.java index 204f738b..e175d9bf 100644 --- a/src/main/java/com/fireblocks/sdk/model/Rate.java +++ b/src/main/java/com/fireblocks/sdk/model/Rate.java @@ -35,7 +35,7 @@ comments = "Generator version: 7.14.0") public class Rate { public static final String JSON_PROPERTY_VIA = "via"; - @jakarta.annotation.Nonnull private AccessType via; + @jakarta.annotation.Nonnull private AccessTypeResponse via; public static final String JSON_PROPERTY_BASE_ASSET_ID = "baseAssetId"; @jakarta.annotation.Nonnull private String baseAssetId; @@ -56,7 +56,7 @@ public Rate() {} @JsonCreator public Rate( - @JsonProperty(value = JSON_PROPERTY_VIA, required = true) AccessType via, + @JsonProperty(value = JSON_PROPERTY_VIA, required = true) AccessTypeResponse via, @JsonProperty(value = JSON_PROPERTY_BASE_ASSET_ID, required = true) String baseAssetId, @JsonProperty(value = JSON_PROPERTY_QUOTE_ASSET_ID, required = true) String quoteAssetId, @@ -67,7 +67,7 @@ public Rate( this.rate = rate; } - public Rate via(@jakarta.annotation.Nonnull AccessType via) { + public Rate via(@jakarta.annotation.Nonnull AccessTypeResponse via) { this.via = via; return this; } @@ -80,13 +80,13 @@ public Rate via(@jakarta.annotation.Nonnull AccessType via) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_VIA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AccessType getVia() { + public AccessTypeResponse getVia() { return via; } @JsonProperty(JSON_PROPERTY_VIA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVia(@jakarta.annotation.Nonnull AccessType via) { + public void setVia(@jakarta.annotation.Nonnull AccessTypeResponse via) { this.via = via; } diff --git a/src/main/java/com/fireblocks/sdk/model/RateOffer.java b/src/main/java/com/fireblocks/sdk/model/RateOffer.java index c436828b..e7c0ffcc 100644 --- a/src/main/java/com/fireblocks/sdk/model/RateOffer.java +++ b/src/main/java/com/fireblocks/sdk/model/RateOffer.java @@ -37,7 +37,7 @@ comments = "Generator version: 7.14.0") public class RateOffer { public static final String JSON_PROPERTY_VIA = "via"; - @jakarta.annotation.Nonnull private AccessType via; + @jakarta.annotation.Nonnull private AccessTypeResponse via; public static final String JSON_PROPERTY_BASE_ASSET_ID = "baseAssetId"; @jakarta.annotation.Nonnull private String baseAssetId; @@ -92,7 +92,7 @@ public RateOffer() {} @JsonCreator public RateOffer( - @JsonProperty(value = JSON_PROPERTY_VIA, required = true) AccessType via, + @JsonProperty(value = JSON_PROPERTY_VIA, required = true) AccessTypeResponse via, @JsonProperty(value = JSON_PROPERTY_BASE_ASSET_ID, required = true) String baseAssetId, @JsonProperty(value = JSON_PROPERTY_QUOTE_ASSET_ID, required = true) String quoteAssetId, @@ -106,7 +106,7 @@ public RateOffer( this.offerType = offerType; } - public RateOffer via(@jakarta.annotation.Nonnull AccessType via) { + public RateOffer via(@jakarta.annotation.Nonnull AccessTypeResponse via) { this.via = via; return this; } @@ -119,13 +119,13 @@ public RateOffer via(@jakarta.annotation.Nonnull AccessType via) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_VIA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AccessType getVia() { + public AccessTypeResponse getVia() { return via; } @JsonProperty(JSON_PROPERTY_VIA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVia(@jakarta.annotation.Nonnull AccessType via) { + public void setVia(@jakarta.annotation.Nonnull AccessTypeResponse via) { this.via = via; } diff --git a/src/main/java/com/fireblocks/sdk/model/RulesetQuorum.java b/src/main/java/com/fireblocks/sdk/model/RulesetQuorum.java new file mode 100644 index 00000000..47edebb1 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/RulesetQuorum.java @@ -0,0 +1,417 @@ +/* + * 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.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** + * The general shape, used when the request has more than one sub-request or a sub-request with more + * than one tier. Each entry in `rulesets` is a sub-request; each of its + * `groups` is a tier. + */ +@JsonPropertyOrder({ + RulesetQuorum.JSON_PROPERTY_TYPE, + RulesetQuorum.JSON_PROPERTY_RULESET_MATCH, + RulesetQuorum.JSON_PROPERTY_STATUS, + RulesetQuorum.JSON_PROPERTY_IS_MANDATORY_OWNER_APPROVED, + RulesetQuorum.JSON_PROPERTY_RULESETS +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class RulesetQuorum { + /** Discriminator identifying the multi-tier shape. */ + public enum TypeEnum { + RULESET(String.valueOf("RULESET")); + + 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; + + /** + * Whether every sub-request in `rulesets` must be satisfied (`ALL`) or any + * single one of them (`ANY`). + */ + public enum RulesetMatchEnum { + ALL(String.valueOf("ALL")), + + ANY(String.valueOf("ANY")); + + private String value; + + RulesetMatchEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RulesetMatchEnum fromValue(String value) { + for (RulesetMatchEnum b : RulesetMatchEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RULESET_MATCH = "rulesetMatch"; + @jakarta.annotation.Nonnull private RulesetMatchEnum rulesetMatch; + + public static final String JSON_PROPERTY_STATUS = "status"; + @jakarta.annotation.Nonnull private QuorumApprovalState status; + + public static final String JSON_PROPERTY_IS_MANDATORY_OWNER_APPROVED = + "isMandatoryOwnerApproved"; + @jakarta.annotation.Nullable private Boolean isMandatoryOwnerApproved; + + public static final String JSON_PROPERTY_RULESETS = "rulesets"; + @jakarta.annotation.Nonnull private List rulesets; + + public RulesetQuorum() {} + + @JsonCreator + public RulesetQuorum( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_RULESET_MATCH, required = true) + RulesetMatchEnum rulesetMatch, + @JsonProperty(value = JSON_PROPERTY_STATUS, required = true) QuorumApprovalState status, + @JsonProperty(value = JSON_PROPERTY_RULESETS, required = true) + List rulesets) { + this.type = type; + this.rulesetMatch = rulesetMatch; + this.status = status; + this.rulesets = rulesets; + } + + public RulesetQuorum type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Discriminator identifying the multi-tier shape. + * + * @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 RulesetQuorum rulesetMatch(@jakarta.annotation.Nonnull RulesetMatchEnum rulesetMatch) { + this.rulesetMatch = rulesetMatch; + return this; + } + + /** + * Whether every sub-request in `rulesets` must be satisfied (`ALL`) or any + * single one of them (`ANY`). + * + * @return rulesetMatch + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RULESET_MATCH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RulesetMatchEnum getRulesetMatch() { + return rulesetMatch; + } + + @JsonProperty(JSON_PROPERTY_RULESET_MATCH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRulesetMatch(@jakarta.annotation.Nonnull RulesetMatchEnum rulesetMatch) { + this.rulesetMatch = rulesetMatch; + } + + public RulesetQuorum status(@jakarta.annotation.Nonnull QuorumApprovalState status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QuorumApprovalState getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@jakarta.annotation.Nonnull QuorumApprovalState status) { + this.status = status; + } + + public RulesetQuorum isMandatoryOwnerApproved( + @jakarta.annotation.Nullable Boolean isMandatoryOwnerApproved) { + this.isMandatoryOwnerApproved = isMandatoryOwnerApproved; + return this; + } + + /** + * Present only when this request additionally requires the workspace owner's approval. + * `false` means the owner has not approved yet. Absent when no owner approval is + * required. + * + * @return isMandatoryOwnerApproved + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_MANDATORY_OWNER_APPROVED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsMandatoryOwnerApproved() { + return isMandatoryOwnerApproved; + } + + @JsonProperty(JSON_PROPERTY_IS_MANDATORY_OWNER_APPROVED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsMandatoryOwnerApproved( + @jakarta.annotation.Nullable Boolean isMandatoryOwnerApproved) { + this.isMandatoryOwnerApproved = isMandatoryOwnerApproved; + } + + public RulesetQuorum rulesets(@jakarta.annotation.Nonnull List rulesets) { + this.rulesets = rulesets; + return this; + } + + public RulesetQuorum addRulesetsItem(QuorumRuleset rulesetsItem) { + if (this.rulesets == null) { + this.rulesets = new ArrayList<>(); + } + this.rulesets.add(rulesetsItem); + return this; + } + + /** + * The sub-requests of the approval criteria, evaluated according to `rulesetMatch`. + * + * @return rulesets + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RULESETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRulesets() { + return rulesets; + } + + @JsonProperty(JSON_PROPERTY_RULESETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRulesets(@jakarta.annotation.Nonnull List rulesets) { + this.rulesets = rulesets; + } + + /** Return true if this RulesetQuorum object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesetQuorum rulesetQuorum = (RulesetQuorum) o; + return Objects.equals(this.type, rulesetQuorum.type) + && Objects.equals(this.rulesetMatch, rulesetQuorum.rulesetMatch) + && Objects.equals(this.status, rulesetQuorum.status) + && Objects.equals( + this.isMandatoryOwnerApproved, rulesetQuorum.isMandatoryOwnerApproved) + && Objects.equals(this.rulesets, rulesetQuorum.rulesets); + } + + @Override + public int hashCode() { + return Objects.hash(type, rulesetMatch, status, isMandatoryOwnerApproved, rulesets); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesetQuorum {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" rulesetMatch: ").append(toIndentedString(rulesetMatch)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" isMandatoryOwnerApproved: ") + .append(toIndentedString(isMandatoryOwnerApproved)) + .append("\n"); + sb.append(" rulesets: ").append(toIndentedString(rulesets)).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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `rulesetMatch` to the URL query string + if (getRulesetMatch() != null) { + joiner.add( + String.format( + "%srulesetMatch%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getRulesetMatch())))); + } + + // 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 `isMandatoryOwnerApproved` to the URL query string + if (getIsMandatoryOwnerApproved() != null) { + joiner.add( + String.format( + "%sisMandatoryOwnerApproved%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getIsMandatoryOwnerApproved())))); + } + + // add `rulesets` to the URL query string + if (getRulesets() != null) { + for (int i = 0; i < getRulesets().size(); i++) { + if (getRulesets().get(i) != null) { + joiner.add( + getRulesets() + .get(i) + .toUrlQueryString( + String.format( + "%srulesets%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SecurityFindingDetailed.java b/src/main/java/com/fireblocks/sdk/model/SecurityFindingDetailed.java index e07eb4fe..8aebee2f 100644 --- a/src/main/java/com/fireblocks/sdk/model/SecurityFindingDetailed.java +++ b/src/main/java/com/fireblocks/sdk/model/SecurityFindingDetailed.java @@ -28,7 +28,7 @@ import java.util.StringJoiner; import java.util.UUID; -/** A single FSPM finding, redacted to the public field set */ +/** SecurityFindingDetailed */ @JsonPropertyOrder({ SecurityFindingDetailed.JSON_PROPERTY_ID, SecurityFindingDetailed.JSON_PROPERTY_STATUS, diff --git a/src/main/java/com/fireblocks/sdk/model/SimpleQuorum.java b/src/main/java/com/fireblocks/sdk/model/SimpleQuorum.java new file mode 100644 index 00000000..f66bdebc --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SimpleQuorum.java @@ -0,0 +1,419 @@ +/* + * 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.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** + * The flattened shape used when the request has a single sub-request with a single tier, which is + * the common case. The threshold and approval count sit directly on the quorum object instead of + * inside `rulesets`. + */ +@JsonPropertyOrder({ + SimpleQuorum.JSON_PROPERTY_TYPE, + SimpleQuorum.JSON_PROPERTY_THRESHOLD, + SimpleQuorum.JSON_PROPERTY_CURRENT_APPROVAL_COUNT, + SimpleQuorum.JSON_PROPERTY_STATUS, + SimpleQuorum.JSON_PROPERTY_IS_MANDATORY_OWNER_APPROVED, + SimpleQuorum.JSON_PROPERTY_MEMBERS +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class SimpleQuorum { + /** Discriminator identifying the flattened single-tier shape. */ + public enum TypeEnum { + SIMPLE(String.valueOf("SIMPLE")); + + 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; + + public static final String JSON_PROPERTY_THRESHOLD = "threshold"; + @jakarta.annotation.Nonnull private Integer threshold; + + public static final String JSON_PROPERTY_CURRENT_APPROVAL_COUNT = "currentApprovalCount"; + @jakarta.annotation.Nonnull private Integer currentApprovalCount; + + public static final String JSON_PROPERTY_STATUS = "status"; + @jakarta.annotation.Nonnull private QuorumApprovalState status; + + public static final String JSON_PROPERTY_IS_MANDATORY_OWNER_APPROVED = + "isMandatoryOwnerApproved"; + @jakarta.annotation.Nullable private Boolean isMandatoryOwnerApproved; + + public static final String JSON_PROPERTY_MEMBERS = "members"; + @jakarta.annotation.Nullable private List members; + + public SimpleQuorum() {} + + @JsonCreator + public SimpleQuorum( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_THRESHOLD, required = true) Integer threshold, + @JsonProperty(value = JSON_PROPERTY_CURRENT_APPROVAL_COUNT, required = true) + Integer currentApprovalCount, + @JsonProperty(value = JSON_PROPERTY_STATUS, required = true) + QuorumApprovalState status) { + this.type = type; + this.threshold = threshold; + this.currentApprovalCount = currentApprovalCount; + this.status = status; + } + + public SimpleQuorum type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Discriminator identifying the flattened single-tier shape. + * + * @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 SimpleQuorum threshold(@jakarta.annotation.Nonnull Integer threshold) { + this.threshold = threshold; + return this; + } + + /** + * Number of approvals this request requires. + * + * @return threshold + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getThreshold() { + return threshold; + } + + @JsonProperty(JSON_PROPERTY_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setThreshold(@jakarta.annotation.Nonnull Integer threshold) { + this.threshold = threshold; + } + + public SimpleQuorum currentApprovalCount( + @jakarta.annotation.Nonnull Integer currentApprovalCount) { + this.currentApprovalCount = currentApprovalCount; + return this; + } + + /** + * Approvals collected so far toward `threshold`. + * + * @return currentApprovalCount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CURRENT_APPROVAL_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCurrentApprovalCount() { + return currentApprovalCount; + } + + @JsonProperty(JSON_PROPERTY_CURRENT_APPROVAL_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCurrentApprovalCount(@jakarta.annotation.Nonnull Integer currentApprovalCount) { + this.currentApprovalCount = currentApprovalCount; + } + + public SimpleQuorum status(@jakarta.annotation.Nonnull QuorumApprovalState status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QuorumApprovalState getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@jakarta.annotation.Nonnull QuorumApprovalState status) { + this.status = status; + } + + public SimpleQuorum isMandatoryOwnerApproved( + @jakarta.annotation.Nullable Boolean isMandatoryOwnerApproved) { + this.isMandatoryOwnerApproved = isMandatoryOwnerApproved; + return this; + } + + /** + * Present only when this request additionally requires the workspace owner's approval. + * `false` means the owner has not approved yet, which is why `status` can + * remain `PENDING` even once `currentApprovalCount` reaches + * `threshold`. Absent when no owner approval is required. + * + * @return isMandatoryOwnerApproved + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_MANDATORY_OWNER_APPROVED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsMandatoryOwnerApproved() { + return isMandatoryOwnerApproved; + } + + @JsonProperty(JSON_PROPERTY_IS_MANDATORY_OWNER_APPROVED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsMandatoryOwnerApproved( + @jakarta.annotation.Nullable Boolean isMandatoryOwnerApproved) { + this.isMandatoryOwnerApproved = isMandatoryOwnerApproved; + } + + public SimpleQuorum members(@jakarta.annotation.Nullable List members) { + this.members = members; + return this; + } + + public SimpleQuorum addMembersItem(Integer membersItem) { + if (this.members == null) { + this.members = new ArrayList<>(); + } + this.members.add(membersItem); + return this; + } + + /** + * Indexes into the top-level `users` array identifying the users who may approve. + * Returned only for `quorumStatusMode=FULL`; omitted otherwise. + * + * @return members + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MEMBERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getMembers() { + return members; + } + + @JsonProperty(JSON_PROPERTY_MEMBERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMembers(@jakarta.annotation.Nullable List members) { + this.members = members; + } + + /** Return true if this SimpleQuorum object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SimpleQuorum simpleQuorum = (SimpleQuorum) o; + return Objects.equals(this.type, simpleQuorum.type) + && Objects.equals(this.threshold, simpleQuorum.threshold) + && Objects.equals(this.currentApprovalCount, simpleQuorum.currentApprovalCount) + && Objects.equals(this.status, simpleQuorum.status) + && Objects.equals( + this.isMandatoryOwnerApproved, simpleQuorum.isMandatoryOwnerApproved) + && Objects.equals(this.members, simpleQuorum.members); + } + + @Override + public int hashCode() { + return Objects.hash( + type, threshold, currentApprovalCount, status, isMandatoryOwnerApproved, members); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SimpleQuorum {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" threshold: ").append(toIndentedString(threshold)).append("\n"); + sb.append(" currentApprovalCount: ") + .append(toIndentedString(currentApprovalCount)) + .append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" isMandatoryOwnerApproved: ") + .append(toIndentedString(isMandatoryOwnerApproved)) + .append("\n"); + sb.append(" members: ").append(toIndentedString(members)).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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `threshold` to the URL query string + if (getThreshold() != null) { + joiner.add( + String.format( + "%sthreshold%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getThreshold())))); + } + + // add `currentApprovalCount` to the URL query string + if (getCurrentApprovalCount() != null) { + joiner.add( + String.format( + "%scurrentApprovalCount%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getCurrentApprovalCount())))); + } + + // 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 `isMandatoryOwnerApproved` to the URL query string + if (getIsMandatoryOwnerApproved() != null) { + joiner.add( + String.format( + "%sisMandatoryOwnerApproved%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getIsMandatoryOwnerApproved())))); + } + + // add `members` to the URL query string + if (getMembers() != null) { + for (int i = 0; i < getMembers().size(); i++) { + joiner.add( + String.format( + "%smembers%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getMembers().get(i))))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java b/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java index e091d6e6..2f828300 100644 --- a/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java @@ -469,7 +469,8 @@ public TransactionRequest forceSweep(@jakarta.annotation.Nullable Boolean forceS * For Polkadot, Kusama and Westend transactions only. When set to true, Fireblocks will empty * the asset wallet. **Note:** If set to true when the source account is exactly 1 DOT, the * transaction will fail. Any amount more or less than 1 DOT succeeds. This is a Polkadot - * blockchain limitation. + * blockchain limitation. **Note:** `forceSweep` and `treatAsGrossAmount` + * can also be used to empty a TON/GRAM wallet. * * @return forceSweep */ diff --git a/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java b/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java index ddc60aca..69ac83ae 100644 --- a/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java @@ -50,6 +50,7 @@ TransactionResponse.JSON_PROPERTY_TREAT_AS_GROSS_AMOUNT, TransactionResponse.JSON_PROPERTY_FEE_INFO, TransactionResponse.JSON_PROPERTY_FEE_CURRENCY, + TransactionResponse.JSON_PROPERTY_REQUESTED_FEE_CURRENCY, TransactionResponse.JSON_PROPERTY_NETWORK_RECORDS, TransactionResponse.JSON_PROPERTY_CREATED_AT, TransactionResponse.JSON_PROPERTY_LAST_UPDATED, @@ -166,6 +167,9 @@ public class TransactionResponse { public static final String JSON_PROPERTY_FEE_CURRENCY = "feeCurrency"; @jakarta.annotation.Nullable private String feeCurrency; + public static final String JSON_PROPERTY_REQUESTED_FEE_CURRENCY = "requestedFeeCurrency"; + @jakarta.annotation.Nullable private String requestedFeeCurrency; + public static final String JSON_PROPERTY_NETWORK_RECORDS = "networkRecords"; @jakarta.annotation.Nullable private List networkRecords; @@ -925,6 +929,31 @@ public void setFeeCurrency(@jakarta.annotation.Nullable String feeCurrency) { this.feeCurrency = feeCurrency; } + public TransactionResponse requestedFeeCurrency( + @jakarta.annotation.Nullable String requestedFeeCurrency) { + this.requestedFeeCurrency = requestedFeeCurrency; + return this; + } + + /** + * The fee-paying asset requested at transaction creation via the `feeCurrency` field, + * if any. + * + * @return requestedFeeCurrency + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUESTED_FEE_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRequestedFeeCurrency() { + return requestedFeeCurrency; + } + + @JsonProperty(JSON_PROPERTY_REQUESTED_FEE_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequestedFeeCurrency(@jakarta.annotation.Nullable String requestedFeeCurrency) { + this.requestedFeeCurrency = requestedFeeCurrency; + } + public TransactionResponse networkRecords( @jakarta.annotation.Nullable List networkRecords) { this.networkRecords = networkRecords; @@ -1943,6 +1972,8 @@ public boolean equals(Object o) { && Objects.equals(this.treatAsGrossAmount, transactionResponse.treatAsGrossAmount) && Objects.equals(this.feeInfo, transactionResponse.feeInfo) && Objects.equals(this.feeCurrency, transactionResponse.feeCurrency) + && Objects.equals( + this.requestedFeeCurrency, transactionResponse.requestedFeeCurrency) && Objects.equals(this.networkRecords, transactionResponse.networkRecords) && Objects.equals(this.createdAt, transactionResponse.createdAt) && Objects.equals(this.lastUpdated, transactionResponse.lastUpdated) @@ -2011,6 +2042,7 @@ public int hashCode() { treatAsGrossAmount, feeInfo, feeCurrency, + requestedFeeCurrency, networkRecords, createdAt, lastUpdated, @@ -2089,6 +2121,9 @@ public String toString() { .append("\n"); sb.append(" feeInfo: ").append(toIndentedString(feeInfo)).append("\n"); sb.append(" feeCurrency: ").append(toIndentedString(feeCurrency)).append("\n"); + sb.append(" requestedFeeCurrency: ") + .append(toIndentedString(requestedFeeCurrency)) + .append("\n"); sb.append(" networkRecords: ").append(toIndentedString(networkRecords)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" lastUpdated: ").append(toIndentedString(lastUpdated)).append("\n"); @@ -2419,6 +2454,17 @@ public String toUrlQueryString(String prefix) { ApiClient.urlEncode(ApiClient.valueToString(getFeeCurrency())))); } + // add `requestedFeeCurrency` to the URL query string + if (getRequestedFeeCurrency() != null) { + joiner.add( + String.format( + "%srequestedFeeCurrency%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getRequestedFeeCurrency())))); + } + // add `networkRecords` to the URL query string if (getNetworkRecords() != null) { for (int i = 0; i < getNetworkRecords().size(); i++) { diff --git a/src/main/java/com/fireblocks/sdk/model/TransferResponse.java b/src/main/java/com/fireblocks/sdk/model/TransferResponse.java new file mode 100644 index 00000000..f9966cc5 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TransferResponse.java @@ -0,0 +1,337 @@ +/* + * 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 = TransferResponse.TransferResponseDeserializer.class) +@JsonSerialize(using = TransferResponse.TransferResponseSerializer.class) +public class TransferResponse extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(TransferResponse.class.getName()); + + public static class TransferResponseSerializer extends StdSerializer { + public TransferResponseSerializer(Class t) { + super(t); + } + + public TransferResponseSerializer() { + this(null); + } + + @Override + public void serialize( + TransferResponse value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class TransferResponseDeserializer extends StdDeserializer { + public TransferResponseDeserializer() { + this(TransferResponse.class); + } + + public TransferResponseDeserializer(Class vc) { + super(vc); + } + + @Override + public TransferResponse 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 TransferResponseAccept + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (TransferResponseAccept.class.equals(Integer.class) + || TransferResponseAccept.class.equals(Long.class) + || TransferResponseAccept.class.equals(Float.class) + || TransferResponseAccept.class.equals(Double.class) + || TransferResponseAccept.class.equals(Boolean.class) + || TransferResponseAccept.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((TransferResponseAccept.class.equals(Integer.class) + || TransferResponseAccept.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((TransferResponseAccept.class.equals(Float.class) + || TransferResponseAccept.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (TransferResponseAccept.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (TransferResponseAccept.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(TransferResponseAccept.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 'TransferResponseAccept'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'TransferResponseAccept'", + e); + } + + // deserialize TransferResponseReject + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (TransferResponseReject.class.equals(Integer.class) + || TransferResponseReject.class.equals(Long.class) + || TransferResponseReject.class.equals(Float.class) + || TransferResponseReject.class.equals(Double.class) + || TransferResponseReject.class.equals(Boolean.class) + || TransferResponseReject.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((TransferResponseReject.class.equals(Integer.class) + || TransferResponseReject.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((TransferResponseReject.class.equals(Float.class) + || TransferResponseReject.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (TransferResponseReject.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (TransferResponseReject.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(TransferResponseReject.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 'TransferResponseReject'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'TransferResponseReject'", + e); + } + + if (match == 1) { + TransferResponse ret = new TransferResponse(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for TransferResponse: %d classes match result," + + " expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public TransferResponse getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "TransferResponse cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public TransferResponse() { + super("oneOf", Boolean.FALSE); + } + + public TransferResponse(TransferResponseAccept o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public TransferResponse(TransferResponseReject o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("TransferResponseAccept", TransferResponseAccept.class); + schemas.put("TransferResponseReject", TransferResponseReject.class); + JSON.registerDescendants(TransferResponse.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("TRANSFER_ACCEPT", TransferResponseAccept.class); + mappings.put("TRANSFER_REJECT", TransferResponseReject.class); + mappings.put("TransferResponseAccept", TransferResponseAccept.class); + mappings.put("TransferResponseReject", TransferResponseReject.class); + mappings.put("TransferResponse", TransferResponse.class); + JSON.registerDiscriminator(TransferResponse.class, "responseType", mappings); + } + + @Override + public Map> getSchemas() { + return TransferResponse.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: TransferResponseAccept, TransferResponseReject + * + *

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(TransferResponseAccept.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(TransferResponseReject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be TransferResponseAccept, TransferResponseReject"); + } + + /** + * Get the actual instance, which can be the following: TransferResponseAccept, + * TransferResponseReject + * + * @return The actual instance (TransferResponseAccept, TransferResponseReject) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `TransferResponseAccept`. If the actual instance is not + * `TransferResponseAccept`, the ClassCastException will be thrown. + * + * @return The actual instance of `TransferResponseAccept` + * @throws ClassCastException if the instance is not `TransferResponseAccept` + */ + public TransferResponseAccept getTransferResponseAccept() throws ClassCastException { + return (TransferResponseAccept) super.getActualInstance(); + } + + /** + * Get the actual instance of `TransferResponseReject`. If the actual instance is not + * `TransferResponseReject`, the ClassCastException will be thrown. + * + * @return The actual instance of `TransferResponseReject` + * @throws ClassCastException if the instance is not `TransferResponseReject` + */ + public TransferResponseReject getTransferResponseReject() throws ClassCastException { + return (TransferResponseReject) 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 TransferResponseAccept) { + if (getActualInstance() != null) { + joiner.add( + ((TransferResponseAccept) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof TransferResponseReject) { + if (getActualInstance() != null) { + joiner.add( + ((TransferResponseReject) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransferResponseAccept.java b/src/main/java/com/fireblocks/sdk/model/TransferResponseAccept.java new file mode 100644 index 00000000..03664033 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TransferResponseAccept.java @@ -0,0 +1,180 @@ +/* + * 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; + +/** Accept an inbound 2-step transfer offer. Carries no arguments. */ +@JsonPropertyOrder({TransferResponseAccept.JSON_PROPERTY_RESPONSE_TYPE}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class TransferResponseAccept { + /** How you are answering the transfer offer. */ + public enum ResponseTypeEnum { + TRANSFER_ACCEPT(String.valueOf("TRANSFER_ACCEPT")); + + private String value; + + ResponseTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResponseTypeEnum fromValue(String value) { + for (ResponseTypeEnum b : ResponseTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RESPONSE_TYPE = "responseType"; + @jakarta.annotation.Nonnull private ResponseTypeEnum responseType; + + public TransferResponseAccept() {} + + @JsonCreator + public TransferResponseAccept( + @JsonProperty(value = JSON_PROPERTY_RESPONSE_TYPE, required = true) + ResponseTypeEnum responseType) { + this.responseType = responseType; + } + + public TransferResponseAccept responseType( + @jakarta.annotation.Nonnull ResponseTypeEnum responseType) { + this.responseType = responseType; + return this; + } + + /** + * How you are answering the transfer offer. + * + * @return responseType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ResponseTypeEnum getResponseType() { + return responseType; + } + + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResponseType(@jakarta.annotation.Nonnull ResponseTypeEnum responseType) { + this.responseType = responseType; + } + + /** Return true if this TransferResponseAccept object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransferResponseAccept transferResponseAccept = (TransferResponseAccept) o; + return Objects.equals(this.responseType, transferResponseAccept.responseType); + } + + @Override + public int hashCode() { + return Objects.hash(responseType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransferResponseAccept {\n"); + sb.append(" responseType: ").append(toIndentedString(responseType)).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 `responseType` to the URL query string + if (getResponseType() != null) { + joiner.add( + String.format( + "%sresponseType%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getResponseType())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransferResponseReject.java b/src/main/java/com/fireblocks/sdk/model/TransferResponseReject.java new file mode 100644 index 00000000..6294be92 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TransferResponseReject.java @@ -0,0 +1,180 @@ +/* + * 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; + +/** Reject an inbound 2-step transfer offer. Carries no arguments. */ +@JsonPropertyOrder({TransferResponseReject.JSON_PROPERTY_RESPONSE_TYPE}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class TransferResponseReject { + /** How you are answering the transfer offer. */ + public enum ResponseTypeEnum { + TRANSFER_REJECT(String.valueOf("TRANSFER_REJECT")); + + private String value; + + ResponseTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResponseTypeEnum fromValue(String value) { + for (ResponseTypeEnum b : ResponseTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RESPONSE_TYPE = "responseType"; + @jakarta.annotation.Nonnull private ResponseTypeEnum responseType; + + public TransferResponseReject() {} + + @JsonCreator + public TransferResponseReject( + @JsonProperty(value = JSON_PROPERTY_RESPONSE_TYPE, required = true) + ResponseTypeEnum responseType) { + this.responseType = responseType; + } + + public TransferResponseReject responseType( + @jakarta.annotation.Nonnull ResponseTypeEnum responseType) { + this.responseType = responseType; + return this; + } + + /** + * How you are answering the transfer offer. + * + * @return responseType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ResponseTypeEnum getResponseType() { + return responseType; + } + + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResponseType(@jakarta.annotation.Nonnull ResponseTypeEnum responseType) { + this.responseType = responseType; + } + + /** Return true if this TransferResponseReject object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransferResponseReject transferResponseReject = (TransferResponseReject) o; + return Objects.equals(this.responseType, transferResponseReject.responseType); + } + + @Override + public int hashCode() { + return Objects.hash(responseType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransferResponseReject {\n"); + sb.append(" responseType: ").append(toIndentedString(responseType)).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 `responseType` to the URL query string + if (getResponseType() != null) { + joiner.add( + String.format( + "%sresponseType%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getResponseType())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransferWithdrawPayload.java b/src/main/java/com/fireblocks/sdk/model/TransferWithdrawPayload.java new file mode 100644 index 00000000..d3d81a06 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TransferWithdrawPayload.java @@ -0,0 +1,271 @@ +/* + * 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; + +/** TransferWithdrawPayload */ +@JsonPropertyOrder({ + TransferWithdrawPayload.JSON_PROPERTY_VAULT_ACCOUNT_ID, + TransferWithdrawPayload.JSON_PROPERTY_ASSET, + TransferWithdrawPayload.JSON_PROPERTY_OFFER_TRANSACTION_ID +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class TransferWithdrawPayload { + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + @jakarta.annotation.Nonnull private String vaultAccountId; + + /** Chain asset — `CANTON` or `CANTON_TEST`. */ + public enum AssetEnum { + CANTON(String.valueOf("CANTON")), + + CANTON_TEST(String.valueOf("CANTON_TEST")); + + private String value; + + AssetEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AssetEnum fromValue(String value) { + for (AssetEnum b : AssetEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ASSET = "asset"; + @jakarta.annotation.Nonnull private AssetEnum asset; + + public static final String JSON_PROPERTY_OFFER_TRANSACTION_ID = "offerTransactionId"; + @jakarta.annotation.Nonnull private String offerTransactionId; + + public TransferWithdrawPayload() {} + + @JsonCreator + public TransferWithdrawPayload( + @JsonProperty(value = JSON_PROPERTY_VAULT_ACCOUNT_ID, required = true) + String vaultAccountId, + @JsonProperty(value = JSON_PROPERTY_ASSET, required = true) AssetEnum asset, + @JsonProperty(value = JSON_PROPERTY_OFFER_TRANSACTION_ID, required = true) + String offerTransactionId) { + this.vaultAccountId = vaultAccountId; + this.asset = asset; + this.offerTransactionId = offerTransactionId; + } + + public TransferWithdrawPayload vaultAccountId( + @jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The vault account whose Canton wallet acts here. + * + * @return vaultAccountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVaultAccountId(@jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + public TransferWithdrawPayload asset(@jakarta.annotation.Nonnull AssetEnum asset) { + this.asset = asset; + return this; + } + + /** + * Chain asset — `CANTON` or `CANTON_TEST`. + * + * @return asset + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ASSET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetEnum getAsset() { + return asset; + } + + @JsonProperty(JSON_PROPERTY_ASSET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAsset(@jakarta.annotation.Nonnull AssetEnum asset) { + this.asset = asset; + } + + public TransferWithdrawPayload offerTransactionId( + @jakarta.annotation.Nonnull String offerTransactionId) { + this.offerTransactionId = offerTransactionId; + return this; + } + + /** + * The Fireblocks transaction id of the OUTGOING transfer offer being withdrawn. + * + * @return offerTransactionId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OFFER_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOfferTransactionId() { + return offerTransactionId; + } + + @JsonProperty(JSON_PROPERTY_OFFER_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOfferTransactionId(@jakarta.annotation.Nonnull String offerTransactionId) { + this.offerTransactionId = offerTransactionId; + } + + /** Return true if this TransferWithdrawPayload object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransferWithdrawPayload transferWithdrawPayload = (TransferWithdrawPayload) o; + return Objects.equals(this.vaultAccountId, transferWithdrawPayload.vaultAccountId) + && Objects.equals(this.asset, transferWithdrawPayload.asset) + && Objects.equals( + this.offerTransactionId, transferWithdrawPayload.offerTransactionId); + } + + @Override + public int hashCode() { + return Objects.hash(vaultAccountId, asset, offerTransactionId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransferWithdrawPayload {\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); + sb.append(" offerTransactionId: ") + .append(toIndentedString(offerTransactionId)) + .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 `vaultAccountId` to the URL query string + if (getVaultAccountId() != null) { + joiner.add( + String.format( + "%svaultAccountId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getVaultAccountId())))); + } + + // add `asset` to the URL query string + if (getAsset() != null) { + joiner.add( + String.format( + "%sasset%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAsset())))); + } + + // add `offerTransactionId` to the URL query string + if (getOfferTransactionId() != null) { + joiner.add( + String.format( + "%sofferTransactionId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getOfferTransactionId())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/UpdateWebhookOAuthRequest.java b/src/main/java/com/fireblocks/sdk/model/UpdateWebhookOAuthRequest.java new file mode 100644 index 00000000..29995bad --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/UpdateWebhookOAuthRequest.java @@ -0,0 +1,569 @@ +/* + * 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.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.StringJoiner; + +/** + * A partial update. Every field is optional and an omitted field is left as it is, so `{ + * \"clientSecret\": \"new-secret\" }` rotates the secret and changes + * nothing else. A rotation applies to every webhook referencing these credentials. The three custom + * maps merge: a key with a value is upserted, a key with `null` is deleted, a key you + * leave out is untouched. Because `null` inside a map means delete, none of the three is + * nullable as a whole — `customJwtClaims: null` and friends are rejected with a + * `400`. Clear a map by naming each key with a `null` value. + * `mtlsClientSignedCert` is a scalar, so `null` there does remove it. + */ +@JsonPropertyOrder({ + UpdateWebhookOAuthRequest.JSON_PROPERTY_NAME, + UpdateWebhookOAuthRequest.JSON_PROPERTY_CLIENT_ID, + UpdateWebhookOAuthRequest.JSON_PROPERTY_CLIENT_SECRET, + UpdateWebhookOAuthRequest.JSON_PROPERTY_URL, + UpdateWebhookOAuthRequest.JSON_PROPERTY_AUTH_METHOD, + UpdateWebhookOAuthRequest.JSON_PROPERTY_CUSTOM_JWT_CLAIMS, + UpdateWebhookOAuthRequest.JSON_PROPERTY_CUSTOM_BODY_PARAMS, + UpdateWebhookOAuthRequest.JSON_PROPERTY_CUSTOM_HEADERS, + UpdateWebhookOAuthRequest.JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class UpdateWebhookOAuthRequest { + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable private String name; + + public static final String JSON_PROPERTY_CLIENT_ID = "clientId"; + @jakarta.annotation.Nullable private String clientId; + + public static final String JSON_PROPERTY_CLIENT_SECRET = "clientSecret"; + @jakarta.annotation.Nullable private String clientSecret; + + public static final String JSON_PROPERTY_URL = "url"; + @jakarta.annotation.Nullable private String url; + + public static final String JSON_PROPERTY_AUTH_METHOD = "authMethod"; + @jakarta.annotation.Nullable private String authMethod; + + public static final String JSON_PROPERTY_CUSTOM_JWT_CLAIMS = "customJwtClaims"; + @jakarta.annotation.Nullable private Map customJwtClaims; + + public static final String JSON_PROPERTY_CUSTOM_BODY_PARAMS = "customBodyParams"; + @jakarta.annotation.Nullable private Map customBodyParams; + + public static final String JSON_PROPERTY_CUSTOM_HEADERS = "customHeaders"; + @jakarta.annotation.Nullable private Map customHeaders; + + public static final String JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT = "mtlsClientSignedCert"; + @jakarta.annotation.Nullable private String mtlsClientSignedCert; + + public UpdateWebhookOAuthRequest() {} + + public UpdateWebhookOAuthRequest name(@jakarta.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * A label for this credential set. Omit to leave it unchanged. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(@jakarta.annotation.Nullable String name) { + this.name = name; + } + + public UpdateWebhookOAuthRequest clientId(@jakarta.annotation.Nullable String clientId) { + this.clientId = clientId; + return this; + } + + /** + * OAuth client ID. Omit to leave it unchanged. + * + * @return clientId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getClientId() { + return clientId; + } + + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setClientId(@jakarta.annotation.Nullable String clientId) { + this.clientId = clientId; + } + + public UpdateWebhookOAuthRequest clientSecret( + @jakarta.annotation.Nullable String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * A new OAuth client secret. Limited to 480 bytes when UTF-8 encoded, so a secret using + * non-ASCII characters fits fewer than 480 of them. Write-only — never returned in any + * response. Send this on its own to rotate the secret without changing anything else. Omit to + * leave it unchanged. + * + * @return clientSecret + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getClientSecret() { + return clientSecret; + } + + @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setClientSecret(@jakarta.annotation.Nullable String clientSecret) { + this.clientSecret = clientSecret; + } + + public UpdateWebhookOAuthRequest url(@jakarta.annotation.Nullable String url) { + this.url = url; + return this; + } + + /** + * Token endpoint URL. HTTPS on port 443 only, and the host must resolve publicly. Omit to leave + * it unchanged. + * + * @return url + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUrl() { + return url; + } + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUrl(@jakarta.annotation.Nullable String url) { + this.url = url; + } + + public UpdateWebhookOAuthRequest authMethod(@jakarta.annotation.Nullable String authMethod) { + this.authMethod = authMethod; + return this; + } + + /** + * `client_secret_basic`, `client_secret_post` or + * `client_secret_jwt`. Omit to leave it unchanged — it does not revert to the + * default. + * + * @return authMethod + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTH_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAuthMethod() { + return authMethod; + } + + @JsonProperty(JSON_PROPERTY_AUTH_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAuthMethod(@jakarta.annotation.Nullable String authMethod) { + this.authMethod = authMethod; + } + + public UpdateWebhookOAuthRequest customJwtClaims( + @jakarta.annotation.Nullable Map customJwtClaims) { + this.customJwtClaims = customJwtClaims; + return this; + } + + public UpdateWebhookOAuthRequest putCustomJwtClaimsItem( + String key, Object customJwtClaimsItem) { + if (this.customJwtClaims == null) { + this.customJwtClaims = new HashMap<>(); + } + this.customJwtClaims.put(key, customJwtClaimsItem); + return this; + } + + /** + * A delta applied to the JWT assertion claims. A claim with a value is added or replaced, a + * claim with `null` is deleted, and a claim you leave out is untouched. So `{ + * \"aud\": \"https://auth.example.com\", \"resource\": null + * }` sets `aud`, drops `resource`, and changes nothing else. Send + * `customJwtClaims: null` to clear every claim in one call. That does not collide + * with a `null` value on a name: one names the claim to delete, the other names the + * whole field. Same rules as on create: any JSON type except `null`, + * `iss`/`sub`/`jti`/`iat`/`exp` reserved, + * names case-sensitive, resulting set under 16 KB, values write-only. + * + * @return customJwtClaims + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_JWT_CLAIMS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCustomJwtClaims() { + return customJwtClaims; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_JWT_CLAIMS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomJwtClaims( + @jakarta.annotation.Nullable Map customJwtClaims) { + this.customJwtClaims = customJwtClaims; + } + + public UpdateWebhookOAuthRequest customBodyParams( + @jakarta.annotation.Nullable Map customBodyParams) { + this.customBodyParams = customBodyParams; + return this; + } + + public UpdateWebhookOAuthRequest putCustomBodyParamsItem( + String key, String customBodyParamsItem) { + if (this.customBodyParams == null) { + this.customBodyParams = new HashMap<>(); + } + this.customBodyParams.put(key, customBodyParamsItem); + return this; + } + + /** + * A delta applied to the token request body parameters. A parameter with a value is added or + * replaced, a parameter with `null` is deleted, and one you leave out is untouched. + * So `{ \"scope\": \"payments.read\", \"audience\": null + * }` sets `scope`, drops `audience`, and changes nothing else. Send + * `customBodyParams: null` to clear every parameter in one call. That does not + * collide with a `null` value on a name: one names the parameter to delete, the other + * names the whole field. Same rules as on create: string values only, + * `grant_type`/`client_id`/`client_secret`/ + * `client_assertion`/`client_assertion_type` reserved, names + * case-sensitive, resulting set under 16 KB, values write-only. + * + * @return customBodyParams + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_BODY_PARAMS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCustomBodyParams() { + return customBodyParams; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_BODY_PARAMS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomBodyParams( + @jakarta.annotation.Nullable Map customBodyParams) { + this.customBodyParams = customBodyParams; + } + + public UpdateWebhookOAuthRequest customHeaders( + @jakarta.annotation.Nullable Map customHeaders) { + this.customHeaders = customHeaders; + return this; + } + + public UpdateWebhookOAuthRequest putCustomHeadersItem(String key, String customHeadersItem) { + if (this.customHeaders == null) { + this.customHeaders = new HashMap<>(); + } + this.customHeaders.put(key, customHeadersItem); + return this; + } + + /** + * A delta applied to the token request headers — not the webhook delivery headers. A header + * with a value is added or replaced, a header with `null` is deleted, and one you + * leave out is untouched. So `{ \"X-Api-Key\": \"new-key\", + * \"X-Tenant\": null }` rotates `X-Api-Key`, drops + * `X-Tenant`, and changes nothing else. Send `customHeaders: null` to clear + * every header in one call. That does not collide with a `null` value on a name: one + * names the header to delete, the other names the whole field. Names are case-insensitive, so a + * `null` under one casing deletes a header stored under another, and names are stored + * and returned lowercased. Same rules as on create: string values only, + * `Content-Type`/`Authorization`/ + * `Content-Length`/`Host` reserved, resulting set under 16 KB, values + * write-only. + * + * @return customHeaders + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_HEADERS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCustomHeaders() { + return customHeaders; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_HEADERS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomHeaders(@jakarta.annotation.Nullable Map customHeaders) { + this.customHeaders = customHeaders; + } + + public UpdateWebhookOAuthRequest mtlsClientSignedCert( + @jakarta.annotation.Nullable String mtlsClientSignedCert) { + this.mtlsClientSignedCert = mtlsClientSignedCert; + return this; + } + + /** + * PEM-encoded client certificate for mTLS. Must be a valid X.509 certificate inside its + * validity window. Omit to leave it unchanged, or send `null` to remove it. + * + * @return mtlsClientSignedCert + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMtlsClientSignedCert() { + return mtlsClientSignedCert; + } + + @JsonProperty(JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMtlsClientSignedCert(@jakarta.annotation.Nullable String mtlsClientSignedCert) { + this.mtlsClientSignedCert = mtlsClientSignedCert; + } + + /** Return true if this UpdateWebhookOAuthRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateWebhookOAuthRequest updateWebhookOAuthRequest = (UpdateWebhookOAuthRequest) o; + return Objects.equals(this.name, updateWebhookOAuthRequest.name) + && Objects.equals(this.clientId, updateWebhookOAuthRequest.clientId) + && Objects.equals(this.clientSecret, updateWebhookOAuthRequest.clientSecret) + && Objects.equals(this.url, updateWebhookOAuthRequest.url) + && Objects.equals(this.authMethod, updateWebhookOAuthRequest.authMethod) + && Objects.equals(this.customJwtClaims, updateWebhookOAuthRequest.customJwtClaims) + && Objects.equals(this.customBodyParams, updateWebhookOAuthRequest.customBodyParams) + && Objects.equals(this.customHeaders, updateWebhookOAuthRequest.customHeaders) + && Objects.equals( + this.mtlsClientSignedCert, updateWebhookOAuthRequest.mtlsClientSignedCert); + } + + @Override + public int hashCode() { + return Objects.hash( + name, + clientId, + clientSecret, + url, + authMethod, + customJwtClaims, + customBodyParams, + customHeaders, + mtlsClientSignedCert); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateWebhookOAuthRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); + sb.append(" clientSecret: ").append(toIndentedString(clientSecret)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" authMethod: ").append(toIndentedString(authMethod)).append("\n"); + sb.append(" customJwtClaims: ").append(toIndentedString(customJwtClaims)).append("\n"); + sb.append(" customBodyParams: ").append(toIndentedString(customBodyParams)).append("\n"); + sb.append(" customHeaders: ").append(toIndentedString(customHeaders)).append("\n"); + sb.append(" mtlsClientSignedCert: ") + .append(toIndentedString(mtlsClientSignedCert)) + .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 `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `clientId` to the URL query string + if (getClientId() != null) { + joiner.add( + String.format( + "%sclientId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getClientId())))); + } + + // add `clientSecret` to the URL query string + if (getClientSecret() != null) { + joiner.add( + String.format( + "%sclientSecret%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getClientSecret())))); + } + + // add `url` to the URL query string + if (getUrl() != null) { + joiner.add( + String.format( + "%surl%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getUrl())))); + } + + // add `authMethod` to the URL query string + if (getAuthMethod() != null) { + joiner.add( + String.format( + "%sauthMethod%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAuthMethod())))); + } + + // add `customJwtClaims` to the URL query string + if (getCustomJwtClaims() != null) { + for (String _key : getCustomJwtClaims().keySet()) { + joiner.add( + String.format( + "%scustomJwtClaims%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, _key, containerSuffix), + getCustomJwtClaims().get(_key), + ApiClient.urlEncode( + ApiClient.valueToString(getCustomJwtClaims().get(_key))))); + } + } + + // add `customBodyParams` to the URL query string + if (getCustomBodyParams() != null) { + for (String _key : getCustomBodyParams().keySet()) { + joiner.add( + String.format( + "%scustomBodyParams%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, _key, containerSuffix), + getCustomBodyParams().get(_key), + ApiClient.urlEncode( + ApiClient.valueToString(getCustomBodyParams().get(_key))))); + } + } + + // add `customHeaders` to the URL query string + if (getCustomHeaders() != null) { + for (String _key : getCustomHeaders().keySet()) { + joiner.add( + String.format( + "%scustomHeaders%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, _key, containerSuffix), + getCustomHeaders().get(_key), + ApiClient.urlEncode( + ApiClient.valueToString(getCustomHeaders().get(_key))))); + } + } + + // add `mtlsClientSignedCert` to the URL query string + if (getMtlsClientSignedCert() != null) { + joiner.add( + String.format( + "%smtlsClientSignedCert%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getMtlsClientSignedCert())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/UpdateWebhookRequest.java b/src/main/java/com/fireblocks/sdk/model/UpdateWebhookRequest.java index dca22514..be9e1773 100644 --- a/src/main/java/com/fireblocks/sdk/model/UpdateWebhookRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/UpdateWebhookRequest.java @@ -57,7 +57,7 @@ public class UpdateWebhookRequest { @jakarta.annotation.Nullable private WebhookOAuth oauth; public static final String JSON_PROPERTY_CUSTOM_HEADERS = "customHeaders"; - @jakarta.annotation.Nullable private Map customHeaders; + @jakarta.annotation.Nullable private Map customHeaders; public UpdateWebhookRequest() {} @@ -208,12 +208,12 @@ public void setOauth(@jakarta.annotation.Nullable WebhookOAuth oauth) { } public UpdateWebhookRequest customHeaders( - @jakarta.annotation.Nullable Map customHeaders) { + @jakarta.annotation.Nullable Map customHeaders) { this.customHeaders = customHeaders; return this; } - public UpdateWebhookRequest putCustomHeadersItem(String key, String customHeadersItem) { + public UpdateWebhookRequest putCustomHeadersItem(String key, Object customHeadersItem) { if (this.customHeaders == null) { this.customHeaders = new HashMap<>(); } @@ -222,25 +222,29 @@ public UpdateWebhookRequest putCustomHeadersItem(String key, String customHeader } /** - * Custom headers delta: entries with a string value are added or updated, entries with a - * `null` value delete that header (no-op if absent), and header names omitted from - * the payload are left untouched. The resulting set is limited to 10 headers. Header names are - * case-insensitive, up to 128 characters, and limited to valid HTTP header name characters. - * Some system header names are reserved and cannot be used. Values are write-only — never - * returned in responses. + * A delta applied to the delivery headers. A header with a value is added or replaced, a header + * with `null` is deleted, and one you leave out is untouched. A value replaces what + * is stored under that name rather than adding to it, so an array is the complete new set of + * lines for that header. Send `customHeaders: null` to clear every header in one + * call. That does not collide with a `null` value on a name: one names the header to + * delete, the other names the whole field. Names are case-insensitive, so a `null` + * under one casing deletes a header stored under another. Same rules as on create: string or + * non-empty array, `Cookie` string-only, 10 lines total in the resulting set, the + * same reserved names, and values write-only. Entries set to `null` do not count + * towards the limit. * * @return customHeaders */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_HEADERS) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getCustomHeaders() { + public Map getCustomHeaders() { return customHeaders; } @JsonProperty(JSON_PROPERTY_CUSTOM_HEADERS) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomHeaders(@jakarta.annotation.Nullable Map customHeaders) { + public void setCustomHeaders(@jakarta.annotation.Nullable Map customHeaders) { this.customHeaders = customHeaders; } diff --git a/src/main/java/com/fireblocks/sdk/model/UtxoOutput.java b/src/main/java/com/fireblocks/sdk/model/UtxoOutput.java index 262e25b8..1dc0bab8 100644 --- a/src/main/java/com/fireblocks/sdk/model/UtxoOutput.java +++ b/src/main/java/com/fireblocks/sdk/model/UtxoOutput.java @@ -41,7 +41,8 @@ UtxoOutput.JSON_PROPERTY_CREATED_BY_HEIGHT, UtxoOutput.JSON_PROPERTY_CREATED_AT, UtxoOutput.JSON_PROPERTY_UPDATED_AT, - UtxoOutput.JSON_PROPERTY_LABELS + UtxoOutput.JSON_PROPERTY_LABELS, + UtxoOutput.JSON_PROPERTY_HAS_NATIVE_ASSETS }) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -129,6 +130,9 @@ public static StatusEnum fromValue(String value) { public static final String JSON_PROPERTY_LABELS = "labels"; @jakarta.annotation.Nullable private List labels; + public static final String JSON_PROPERTY_HAS_NATIVE_ASSETS = "hasNativeAssets"; + @jakarta.annotation.Nullable private Boolean hasNativeAssets; + public UtxoOutput() {} @JsonCreator @@ -506,6 +510,29 @@ public void setLabels(@jakarta.annotation.Nullable List labels) { this.labels = labels; } + public UtxoOutput hasNativeAssets(@jakarta.annotation.Nullable Boolean hasNativeAssets) { + this.hasNativeAssets = hasNativeAssets; + return this; + } + + /** + * Whether this UTXO carries Cardano native assets (tokens) + * + * @return hasNativeAssets + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HAS_NATIVE_ASSETS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHasNativeAssets() { + return hasNativeAssets; + } + + @JsonProperty(JSON_PROPERTY_HAS_NATIVE_ASSETS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHasNativeAssets(@jakarta.annotation.Nullable Boolean hasNativeAssets) { + this.hasNativeAssets = hasNativeAssets; + } + /** Return true if this UtxoOutput object is equal to o. */ @Override public boolean equals(Object o) { @@ -530,7 +557,8 @@ public boolean equals(Object o) { && Objects.equals(this.createdByHeight, utxoOutput.createdByHeight) && Objects.equals(this.createdAt, utxoOutput.createdAt) && Objects.equals(this.updatedAt, utxoOutput.updatedAt) - && Objects.equals(this.labels, utxoOutput.labels); + && Objects.equals(this.labels, utxoOutput.labels) + && Objects.equals(this.hasNativeAssets, utxoOutput.hasNativeAssets); } @Override @@ -550,7 +578,8 @@ public int hashCode() { createdByHeight, createdAt, updatedAt, - labels); + labels, + hasNativeAssets); } @Override @@ -572,6 +601,7 @@ public String toString() { sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" hasNativeAssets: ").append(toIndentedString(hasNativeAssets)).append("\n"); sb.append("}"); return sb.toString(); } @@ -777,6 +807,16 @@ public String toUrlQueryString(String prefix) { } } + // add `hasNativeAssets` to the URL query string + if (getHasNativeAssets() != null) { + joiner.add( + String.format( + "%shasNativeAssets%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getHasNativeAssets())))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/WebhookEvent.java b/src/main/java/com/fireblocks/sdk/model/WebhookEvent.java index ce434034..bc996b5c 100644 --- a/src/main/java/com/fireblocks/sdk/model/WebhookEvent.java +++ b/src/main/java/com/fireblocks/sdk/model/WebhookEvent.java @@ -27,6 +27,8 @@ public enum WebhookEvent { TRANSACTION_NETWORK_RECORDS_PROCESSING_COMPLETED( "transaction.network_records.processing_completed"), + TRANSACTION_ALERT_STUCK("transaction.alert.stuck"), + EXTERNAL_WALLET_ASSET_ADDED("external_wallet.asset.added"), EXTERNAL_WALLET_ASSET_REMOVED("external_wallet.asset.removed"), @@ -47,6 +49,14 @@ public enum WebhookEvent { VAULT_ACCOUNT_NFT_BALANCE_UPDATED("vault_account.nft.balance_updated"), + VAULT_ACCOUNT_BULK_CREATE_JOB_STARTED("vault_account.bulk_create_job_started"), + + VAULT_ACCOUNT_BULK_CREATE_JOB_ENDED("vault_account.bulk_create_job_ended"), + + VAULT_ACCOUNT_ASSET_BULK_ADD_JOB_STARTED("vault_account.asset.bulk_add_job_started"), + + VAULT_ACCOUNT_ASSET_BULK_ADD_JOB_ENDED("vault_account.asset.bulk_add_job_ended"), + EMBEDDED_WALLET_STATUS_UPDATED("embedded_wallet.status.updated"), EMBEDDED_WALLET_CREATED("embedded_wallet.created"), diff --git a/src/main/java/com/fireblocks/sdk/model/WebhookOAuthCredentials.java b/src/main/java/com/fireblocks/sdk/model/WebhookOAuthCredentials.java new file mode 100644 index 00000000..26f854cc --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/WebhookOAuthCredentials.java @@ -0,0 +1,631 @@ +/* + * 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.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** + * A stored OAuth 2.0 client credential set, referenced by webhooks through their + * `webhookOauthId`. When a webhook references one, the dispatcher fetches a bearer token + * from `url` before each delivery and attaches it as `Authorization: Bearer + * {token}`. Secret material is never returned: `clientSecret` is absent from this + * schema entirely, and the `customJwtClaims`, `customBodyParams` and + * `customHeaders` fields are reduced to their names, without the configured values. + */ +@JsonPropertyOrder({ + WebhookOAuthCredentials.JSON_PROPERTY_ID, + WebhookOAuthCredentials.JSON_PROPERTY_NAME, + WebhookOAuthCredentials.JSON_PROPERTY_CLIENT_ID, + WebhookOAuthCredentials.JSON_PROPERTY_URL, + WebhookOAuthCredentials.JSON_PROPERTY_AUTH_METHOD, + WebhookOAuthCredentials.JSON_PROPERTY_CUSTOM_JWT_CLAIMS, + WebhookOAuthCredentials.JSON_PROPERTY_CUSTOM_BODY_PARAMS, + WebhookOAuthCredentials.JSON_PROPERTY_CUSTOM_HEADERS, + WebhookOAuthCredentials.JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT, + WebhookOAuthCredentials.JSON_PROPERTY_CREATED_AT, + WebhookOAuthCredentials.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class WebhookOAuthCredentials { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull private String name; + + public static final String JSON_PROPERTY_CLIENT_ID = "clientId"; + @jakarta.annotation.Nonnull private String clientId; + + public static final String JSON_PROPERTY_URL = "url"; + @jakarta.annotation.Nonnull private String url; + + public static final String JSON_PROPERTY_AUTH_METHOD = "authMethod"; + @jakarta.annotation.Nonnull private String authMethod = "client_secret_basic"; + + public static final String JSON_PROPERTY_CUSTOM_JWT_CLAIMS = "customJwtClaims"; + @jakarta.annotation.Nullable private List customJwtClaims; + + public static final String JSON_PROPERTY_CUSTOM_BODY_PARAMS = "customBodyParams"; + @jakarta.annotation.Nullable private List customBodyParams; + + public static final String JSON_PROPERTY_CUSTOM_HEADERS = "customHeaders"; + @jakarta.annotation.Nullable private List customHeaders; + + public static final String JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT = "mtlsClientSignedCert"; + @jakarta.annotation.Nullable private String mtlsClientSignedCert; + + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + @jakarta.annotation.Nonnull private Long createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + @jakarta.annotation.Nonnull private Long updatedAt; + + public WebhookOAuthCredentials() {} + + @JsonCreator + public WebhookOAuthCredentials( + @JsonProperty(value = JSON_PROPERTY_ID, required = true) UUID id, + @JsonProperty(value = JSON_PROPERTY_NAME, required = true) String name, + @JsonProperty(value = JSON_PROPERTY_CLIENT_ID, required = true) String clientId, + @JsonProperty(value = JSON_PROPERTY_URL, required = true) String url, + @JsonProperty(value = JSON_PROPERTY_AUTH_METHOD, required = true) String authMethod, + @JsonProperty(value = JSON_PROPERTY_CREATED_AT, required = true) Long createdAt, + @JsonProperty(value = JSON_PROPERTY_UPDATED_AT, required = true) Long updatedAt) { + this.id = id; + this.name = name; + this.clientId = clientId; + this.url = url; + this.authMethod = authMethod; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + public WebhookOAuthCredentials id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * The id of the OAuth credentials. Pass this as a webhook's `webhookOauthId` to + * attach them. + * + * @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 WebhookOAuthCredentials name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The label given to this credential set. + * + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + public WebhookOAuthCredentials clientId(@jakarta.annotation.Nonnull String clientId) { + this.clientId = clientId; + return this; + } + + /** + * OAuth client ID used to authenticate with the token endpoint. + * + * @return clientId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getClientId() { + return clientId; + } + + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setClientId(@jakarta.annotation.Nonnull String clientId) { + this.clientId = clientId; + } + + public WebhookOAuthCredentials url(@jakarta.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * Token endpoint URL. + * + * @return url + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUrl() { + return url; + } + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUrl(@jakarta.annotation.Nonnull String url) { + this.url = url; + } + + public WebhookOAuthCredentials authMethod(@jakarta.annotation.Nonnull String authMethod) { + this.authMethod = authMethod; + return this; + } + + /** + * How the client credentials are presented to the token endpoint: + * `client_secret_basic`, `client_secret_post` or + * `client_secret_jwt`. Credentials created without this field report + * `client_secret_basic`, which is what they use. + * + * @return authMethod + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AUTH_METHOD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAuthMethod() { + return authMethod; + } + + @JsonProperty(JSON_PROPERTY_AUTH_METHOD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAuthMethod(@jakarta.annotation.Nonnull String authMethod) { + this.authMethod = authMethod; + } + + public WebhookOAuthCredentials customJwtClaims( + @jakarta.annotation.Nullable List customJwtClaims) { + this.customJwtClaims = customJwtClaims; + return this; + } + + public WebhookOAuthCredentials addCustomJwtClaimsItem(String customJwtClaimsItem) { + if (this.customJwtClaims == null) { + this.customJwtClaims = new ArrayList<>(); + } + this.customJwtClaims.add(customJwtClaimsItem); + return this; + } + + /** + * Names of the additional claims placed in the JWT assertion. Claim values are write-only and + * are never returned. Absent when no custom claims are configured. + * + * @return customJwtClaims + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_JWT_CLAIMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomJwtClaims() { + return customJwtClaims; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_JWT_CLAIMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomJwtClaims(@jakarta.annotation.Nullable List customJwtClaims) { + this.customJwtClaims = customJwtClaims; + } + + public WebhookOAuthCredentials customBodyParams( + @jakarta.annotation.Nullable List customBodyParams) { + this.customBodyParams = customBodyParams; + return this; + } + + public WebhookOAuthCredentials addCustomBodyParamsItem(String customBodyParamsItem) { + if (this.customBodyParams == null) { + this.customBodyParams = new ArrayList<>(); + } + this.customBodyParams.add(customBodyParamsItem); + return this; + } + + /** + * Names of the additional parameters added to the token request body. Parameter values are + * write-only and are never returned. Absent when no custom parameters are configured. + * + * @return customBodyParams + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_BODY_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomBodyParams() { + return customBodyParams; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_BODY_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomBodyParams(@jakarta.annotation.Nullable List customBodyParams) { + this.customBodyParams = customBodyParams; + } + + public WebhookOAuthCredentials customHeaders( + @jakarta.annotation.Nullable List customHeaders) { + this.customHeaders = customHeaders; + return this; + } + + public WebhookOAuthCredentials addCustomHeadersItem(String customHeadersItem) { + if (this.customHeaders == null) { + this.customHeaders = new ArrayList<>(); + } + this.customHeaders.add(customHeadersItem); + return this; + } + + /** + * Names of the additional HTTP headers added to **the token request sent to the authorization + * server** — not to the webhook delivery, which has its own separate `customHeaders`. + * Header values are write-only and are never returned. Absent when no custom headers are + * configured. + * + * @return customHeaders + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_HEADERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomHeaders() { + return customHeaders; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_HEADERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomHeaders(@jakarta.annotation.Nullable List customHeaders) { + this.customHeaders = customHeaders; + } + + public WebhookOAuthCredentials mtlsClientSignedCert( + @jakarta.annotation.Nullable String mtlsClientSignedCert) { + this.mtlsClientSignedCert = mtlsClientSignedCert; + return this; + } + + /** + * PEM-encoded client certificate used for mTLS when fetching OAuth tokens. + * + * @return mtlsClientSignedCert + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMtlsClientSignedCert() { + return mtlsClientSignedCert; + } + + @JsonProperty(JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMtlsClientSignedCert(@jakarta.annotation.Nullable String mtlsClientSignedCert) { + this.mtlsClientSignedCert = mtlsClientSignedCert; + } + + public WebhookOAuthCredentials createdAt(@jakarta.annotation.Nonnull Long createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The date and time the OAuth credentials were created, in milliseconds. + * + * @return createdAt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getCreatedAt() { + return createdAt; + } + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(@jakarta.annotation.Nonnull Long createdAt) { + this.createdAt = createdAt; + } + + public WebhookOAuthCredentials updatedAt(@jakarta.annotation.Nonnull Long updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * The date and time the OAuth credentials were last updated, in milliseconds. + * + * @return updatedAt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getUpdatedAt() { + return updatedAt; + } + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUpdatedAt(@jakarta.annotation.Nonnull Long updatedAt) { + this.updatedAt = updatedAt; + } + + /** Return true if this WebhookOAuthCredentials object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookOAuthCredentials webhookOAuthCredentials = (WebhookOAuthCredentials) o; + return Objects.equals(this.id, webhookOAuthCredentials.id) + && Objects.equals(this.name, webhookOAuthCredentials.name) + && Objects.equals(this.clientId, webhookOAuthCredentials.clientId) + && Objects.equals(this.url, webhookOAuthCredentials.url) + && Objects.equals(this.authMethod, webhookOAuthCredentials.authMethod) + && Objects.equals(this.customJwtClaims, webhookOAuthCredentials.customJwtClaims) + && Objects.equals(this.customBodyParams, webhookOAuthCredentials.customBodyParams) + && Objects.equals(this.customHeaders, webhookOAuthCredentials.customHeaders) + && Objects.equals( + this.mtlsClientSignedCert, webhookOAuthCredentials.mtlsClientSignedCert) + && Objects.equals(this.createdAt, webhookOAuthCredentials.createdAt) + && Objects.equals(this.updatedAt, webhookOAuthCredentials.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + name, + clientId, + url, + authMethod, + customJwtClaims, + customBodyParams, + customHeaders, + mtlsClientSignedCert, + createdAt, + updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookOAuthCredentials {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" authMethod: ").append(toIndentedString(authMethod)).append("\n"); + sb.append(" customJwtClaims: ").append(toIndentedString(customJwtClaims)).append("\n"); + sb.append(" customBodyParams: ").append(toIndentedString(customBodyParams)).append("\n"); + sb.append(" customHeaders: ").append(toIndentedString(customHeaders)).append("\n"); + sb.append(" mtlsClientSignedCert: ") + .append(toIndentedString(mtlsClientSignedCert)) + .append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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 `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `clientId` to the URL query string + if (getClientId() != null) { + joiner.add( + String.format( + "%sclientId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getClientId())))); + } + + // add `url` to the URL query string + if (getUrl() != null) { + joiner.add( + String.format( + "%surl%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getUrl())))); + } + + // add `authMethod` to the URL query string + if (getAuthMethod() != null) { + joiner.add( + String.format( + "%sauthMethod%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAuthMethod())))); + } + + // add `customJwtClaims` to the URL query string + if (getCustomJwtClaims() != null) { + for (int i = 0; i < getCustomJwtClaims().size(); i++) { + joiner.add( + String.format( + "%scustomJwtClaims%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode( + ApiClient.valueToString(getCustomJwtClaims().get(i))))); + } + } + + // add `customBodyParams` to the URL query string + if (getCustomBodyParams() != null) { + for (int i = 0; i < getCustomBodyParams().size(); i++) { + joiner.add( + String.format( + "%scustomBodyParams%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode( + ApiClient.valueToString(getCustomBodyParams().get(i))))); + } + } + + // add `customHeaders` to the URL query string + if (getCustomHeaders() != null) { + for (int i = 0; i < getCustomHeaders().size(); i++) { + joiner.add( + String.format( + "%scustomHeaders%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode( + ApiClient.valueToString(getCustomHeaders().get(i))))); + } + } + + // add `mtlsClientSignedCert` to the URL query string + if (getMtlsClientSignedCert() != null) { + joiner.add( + String.format( + "%smtlsClientSignedCert%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getMtlsClientSignedCert())))); + } + + // 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 `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add( + String.format( + "%supdatedAt%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + return joiner.toString(); + } +} diff --git a/src/test/java/com/fireblocks/sdk/FireblocksTest.java b/src/test/java/com/fireblocks/sdk/FireblocksTest.java index 96774e70..d1baf9ed 100644 --- a/src/test/java/com/fireblocks/sdk/FireblocksTest.java +++ b/src/test/java/com/fireblocks/sdk/FireblocksTest.java @@ -363,6 +363,14 @@ public void testGetApiUserApi() { Assert.assertSame(apiUser, fireblocks.apiUser()); } + @Test + public void testGetApprovalsBetaApi() { + setupFireblocks(true, null, null); + ApprovalsBetaApi approvalsBeta = fireblocks.approvalsBeta(); + Assert.assertNotNull(approvalsBeta); + Assert.assertSame(approvalsBeta, fireblocks.approvalsBeta()); + } + @Test public void testGetAuditLogsApi() { setupFireblocks(true, null, null); diff --git a/src/test/java/com/fireblocks/sdk/api/ApprovalsBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/ApprovalsBetaApiTest.java new file mode 100644 index 00000000..b3911cdf --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/api/ApprovalsBetaApiTest.java @@ -0,0 +1,80 @@ +/* + * 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.api; + + +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.ApprovalRequestItem; +import com.fireblocks.sdk.model.ListApprovalsResponse; +import java.util.concurrent.CompletableFuture; +import org.junit.Ignore; +import org.junit.Test; + +/** API tests for ApprovalsBetaApi */ +@Ignore +public class ApprovalsBetaApiTest { + + private final ApprovalsBetaApi api = new ApprovalsBetaApi(); + + /** + * Get a single approval request + * + *

Retrieve full detail for a single approval request by ID, including the payload to sign + * and, when requested, the request's `quorumStatus`. Because this endpoint + * addresses one request, it accepts `quorumStatusMode=FULL`, which adds the + * participating approvers and their individual approval state. `userStatus` reflects + * the authenticated user by default. Pass `userId` to report it for another user + * instead. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security + * Admin, Security Auditor. + */ + @Test + public void getApprovalByIdTest() { + String requestId = null; + String userId = null; + String quorumStatusMode = null; + CompletableFuture> response = + api.getApprovalById(requestId, userId, quorumStatusMode); + } + + /** + * List approval requests + * + *

Retrieve the pending approval requests the authenticated API user is eligible to act on, + * including requests the user has already approved that are still pending overall. The response + * is scoped to the authenticated user by default. Pass `userId` to read another + * user's queue, or `includeAllUsers=true` to read every pending request in + * the workspace. Both require an Admin, Non-Signing Admin, Security Admin or Security Auditor + * role and are rejected with 403 otherwise. Set `quorumStatusMode=SUMMARY` to + * include each request's approval thresholds and counts. The per-approver breakdown is + * available only when fetching a single request — see `GET /approvals/{requestId}`. + * Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin, + * Security Auditor. + */ + @Test + public void getApprovalsTest() { + Boolean includeUserApproved = null; + String userId = null; + Boolean includeAllUsers = null; + String quorumStatusMode = null; + Integer pageSize = null; + String pageCursor = null; + CompletableFuture> response = + api.getApprovals( + includeUserApproved, + userId, + includeAllUsers, + quorumStatusMode, + pageSize, + pageCursor); + } +} diff --git a/src/test/java/com/fireblocks/sdk/api/SecurityPostureManagementApiTest.java b/src/test/java/com/fireblocks/sdk/api/SecurityPostureManagementApiTest.java index d75d0404..4741252b 100644 --- a/src/test/java/com/fireblocks/sdk/api/SecurityPostureManagementApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/SecurityPostureManagementApiTest.java @@ -32,7 +32,8 @@ public class SecurityPostureManagementApiTest { * 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. + * set. Endpoint Roles: Security Admin, Security Auditor. **Note:** This endpoint is available + * only for the FSPM Pro package. It is not available for FSPM Basic. */ @Test public void getSecurityFindingByIdTest() { @@ -45,7 +46,8 @@ public void getSecurityFindingByIdTest() { * Get FSPM security findings * *

Returns a paginated list of FSPM security findings for the workspace. Endpoint Roles: - * Security Admin, Security Auditor. + * Security Admin, Security Auditor. **Note:** This endpoint is available only for the FSPM Pro + * package. It is not available for FSPM Basic. */ @Test public void getSecurityFindingsTest() { @@ -63,7 +65,8 @@ public void getSecurityFindingsTest() { * *

Accepts or reopens a finding for the workspace. When accepting a finding (`status: * \"ACCEPTED\"`), `statusUpdatedReason` is required. Endpoint Roles: - * Security Admin. + * Security Admin. **Note:** This endpoint is available only for the FSPM Pro package. It is not + * available for FSPM Basic. */ @Test public void updateSecurityFindingByIdTest() { diff --git a/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java b/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java index c4c4a37c..cc59fe8d 100644 --- a/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java @@ -67,8 +67,8 @@ public class VaultsApiTest { * Activate a wallet in a vault account * *

Initiates activation for a wallet in a vault account. Activation is required for tokens - * that need an on-chain transaction for creation (XLM tokens, SOL tokens etc). Endpoint - * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. + * that need an on-chain transaction for creation. Endpoint Permission: Admin, Non-Signing + * Admin, Signer, Approver, Editor. */ @Test public void activateAssetForVaultAccountTest() { diff --git a/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java b/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java index 3f29f02d..3d851e09 100644 --- a/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java @@ -14,7 +14,9 @@ import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.CreateWebhookOAuthRequest; import com.fireblocks.sdk.model.CreateWebhookRequest; +import com.fireblocks.sdk.model.DeleteWebhookOAuthResponse; import com.fireblocks.sdk.model.NotificationAttemptsPaginatedResponse; import com.fireblocks.sdk.model.NotificationPaginatedResponse; import com.fireblocks.sdk.model.NotificationStatus; @@ -25,11 +27,13 @@ import com.fireblocks.sdk.model.ResendFailedNotificationsRequest; import com.fireblocks.sdk.model.ResendFailedNotificationsResponse; import com.fireblocks.sdk.model.ResendNotificationsByResourceIdRequest; +import com.fireblocks.sdk.model.UpdateWebhookOAuthRequest; import com.fireblocks.sdk.model.UpdateWebhookRequest; import com.fireblocks.sdk.model.Webhook; import com.fireblocks.sdk.model.WebhookEvent; import com.fireblocks.sdk.model.WebhookMetric; import com.fireblocks.sdk.model.WebhookMtlsCsrResponse; +import com.fireblocks.sdk.model.WebhookOAuthCredentials; import com.fireblocks.sdk.model.WebhookPaginatedResponse; import java.math.BigDecimal; import java.util.List; @@ -58,6 +62,23 @@ public void createWebhookTest() { api.createWebhook(createWebhookRequest, idempotencyKey); } + /** + * Create OAuth credentials + * + *

Creates a reusable OAuth client credential set. Attach it to a webhook by passing the + * returned id as that webhook's `webhookOauthId`. Several webhooks may share one + * credential set, so rotating its client secret covers all of them at once. The client secret + * is write-only and is never returned. **Endpoint Permissions:** Owner, Admin, Non-Signing + * Admin. + */ + @Test + public void createWebhookOAuthTest() { + CreateWebhookOAuthRequest createWebhookOAuthRequest = null; + String idempotencyKey = null; + CompletableFuture> response = + api.createWebhookOAuth(createWebhookOAuthRequest, idempotencyKey); + } + /** * Delete webhook * @@ -69,6 +90,31 @@ public void deleteWebhookTest() { CompletableFuture> response = api.deleteWebhook(webhookId); } + /** + * Delete OAuth credentials + * + *

Deletes an OAuth credential set. By default the delete is refused while the credentials + * are still in use: if any webhook references them, nothing is deleted and the request fails + * with `409 Conflict`, naming the reason and listing the ids of the referencing + * webhooks. This protects a shared credential set from being removed out from under the + * webhooks that depend on it, since several webhooks may reference the same one. Pass + * `forceDelete=true` to delete anyway. That detaches every referencing webhook — + * it clears each webhook's `webhookOauthId`, it does **not** delete the webhook — + * then deletes the credential set and returns the deleted resource together with + * `detachedWebhookIds`. The detached webhooks keep delivering notifications, but + * without an `Authorization` header, so their endpoints will see unauthenticated + * deliveries from that point on. When nothing references the credentials the delete succeeds + * either way, and `detachedWebhookIds` comes back empty. **Endpoint Permissions:** + * Owner, Admin, Non-Signing Admin. + */ + @Test + public void deleteWebhookOAuthTest() { + UUID webhookOauthId = null; + Boolean forceDelete = null; + CompletableFuture> response = + api.deleteWebhookOAuth(webhookOauthId, forceDelete); + } + /** * Get webhook metrics * @@ -190,6 +236,29 @@ public void getWebhookTest() { CompletableFuture> response = api.getWebhook(webhookId); } + /** + * Get OAuth credentials by id + * + *

Retrieve an OAuth credential set by its id. The client secret is never returned. + */ + @Test + public void getWebhookOAuthTest() { + UUID webhookOauthId = null; + CompletableFuture> response = + api.getWebhookOAuth(webhookOauthId); + } + + /** + * Get all OAuth credentials + * + *

Lists every OAuth credential set for the workspace. Client secrets are never returned. + */ + @Test + public void getWebhookOAuthsTest() { + CompletableFuture>> response = + api.getWebhookOAuths(); + } + /** * Get all webhooks * @@ -280,4 +349,30 @@ public void updateWebhookTest() { CompletableFuture> response = api.updateWebhook(updateWebhookRequest, webhookId); } + + /** + * Update OAuth credentials + * + *

Updates only the fields present in the request; anything omitted is left as it is. Sending + * `clientSecret` on its own rotates the secret for every webhook using these + * credentials. `customJwtClaims`, `customBodyParams` and + * `customHeaders` are all merged key by key rather than replaced, the same way a + * webhook's own `customHeaders` behaves: a key sent with a value is added or + * overwritten, a key sent with a `null` value is deleted, and a key you omit is left + * alone. Since a `null` inside a map is the delete mechanism, none of the three + * accepts `null` for the whole field — `customJwtClaims: null`, + * `customBodyParams: null` or `customHeaders: null` is rejected with a + * `400` rather than ignored. Clear a map by listing each of its keys with a + * `null` value. Because `null` is spent on deletion, a claim cannot be set + * to JSON `null` either, on this endpoint or on create. + * `mtlsClientSignedCert` is a scalar rather than a map, so `null` there + * does remove it. **Endpoint Permissions:** Owner, Admin, Non-Signing Admin. + */ + @Test + public void updateWebhookOAuthTest() { + UpdateWebhookOAuthRequest updateWebhookOAuthRequest = null; + UUID webhookOauthId = null; + CompletableFuture> response = + api.updateWebhookOAuth(updateWebhookOAuthRequest, webhookOauthId); + } } diff --git a/src/test/java/com/fireblocks/sdk/model/AccessTypeResponseTest.java b/src/test/java/com/fireblocks/sdk/model/AccessTypeResponseTest.java new file mode 100644 index 00000000..18f4a7af --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AccessTypeResponseTest.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 AccessTypeResponse */ +class AccessTypeResponseTest { + private final AccessTypeResponse model = new AccessTypeResponse(); + + /** Model tests for AccessTypeResponse */ + @Test + void testAccessTypeResponse() { + // TODO: test AccessTypeResponse + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'providerId' */ + @Test + void providerIdTest() { + // TODO: test providerId + } + + /** Test the property 'accountId' */ + @Test + void accountIdTest() { + // TODO: test accountId + } + + /** Test the property 'subProviders' */ + @Test + void subProvidersTest() { + // TODO: test subProviders + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AccountAccessResponseTest.java b/src/test/java/com/fireblocks/sdk/model/AccountAccessResponseTest.java new file mode 100644 index 00000000..76a02781 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AccountAccessResponseTest.java @@ -0,0 +1,45 @@ +/* + * 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 AccountAccessResponse */ +class AccountAccessResponseTest { + private final AccountAccessResponse model = new AccountAccessResponse(); + + /** Model tests for AccountAccessResponse */ + @Test + void testAccountAccessResponse() { + // TODO: test AccountAccessResponse + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'providerId' */ + @Test + void providerIdTest() { + // TODO: test providerId + } + + /** Test the property 'accountId' */ + @Test + void accountIdTest() { + // TODO: test accountId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AllocationResponseAcceptTest.java b/src/test/java/com/fireblocks/sdk/model/AllocationResponseAcceptTest.java new file mode 100644 index 00000000..d5f90a72 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AllocationResponseAcceptTest.java @@ -0,0 +1,33 @@ +/* + * 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 AllocationResponseAccept */ +class AllocationResponseAcceptTest { + private final AllocationResponseAccept model = new AllocationResponseAccept(); + + /** Model tests for AllocationResponseAccept */ + @Test + void testAllocationResponseAccept() { + // TODO: test AllocationResponseAccept + } + + /** Test the property 'responseType' */ + @Test + void responseTypeTest() { + // TODO: test responseType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AllocationResponseRejectTest.java b/src/test/java/com/fireblocks/sdk/model/AllocationResponseRejectTest.java new file mode 100644 index 00000000..a1810430 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AllocationResponseRejectTest.java @@ -0,0 +1,33 @@ +/* + * 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 AllocationResponseReject */ +class AllocationResponseRejectTest { + private final AllocationResponseReject model = new AllocationResponseReject(); + + /** Model tests for AllocationResponseReject */ + @Test + void testAllocationResponseReject() { + // TODO: test AllocationResponseReject + } + + /** Test the property 'responseType' */ + @Test + void responseTypeTest() { + // TODO: test responseType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AllocationResponseTest.java b/src/test/java/com/fireblocks/sdk/model/AllocationResponseTest.java new file mode 100644 index 00000000..192d7d28 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AllocationResponseTest.java @@ -0,0 +1,33 @@ +/* + * 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 AllocationResponse */ +class AllocationResponseTest { + private final AllocationResponse model = new AllocationResponse(); + + /** Model tests for AllocationResponse */ + @Test + void testAllocationResponse() { + // TODO: test AllocationResponse + } + + /** Test the property 'responseType' */ + @Test + void responseTypeTest() { + // TODO: test responseType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AllocationWithdrawPayloadTest.java b/src/test/java/com/fireblocks/sdk/model/AllocationWithdrawPayloadTest.java new file mode 100644 index 00000000..3aa18155 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AllocationWithdrawPayloadTest.java @@ -0,0 +1,45 @@ +/* + * 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 AllocationWithdrawPayload */ +class AllocationWithdrawPayloadTest { + private final AllocationWithdrawPayload model = new AllocationWithdrawPayload(); + + /** Model tests for AllocationWithdrawPayload */ + @Test + void testAllocationWithdrawPayload() { + // TODO: test AllocationWithdrawPayload + } + + /** Test the property 'vaultAccountId' */ + @Test + void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'asset' */ + @Test + void assetTest() { + // TODO: test asset + } + + /** Test the property 'allocationTransactionId' */ + @Test + void allocationTransactionIdTest() { + // TODO: test allocationTransactionId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AllowListPayloadTest.java b/src/test/java/com/fireblocks/sdk/model/AllowListPayloadTest.java new file mode 100644 index 00000000..342828ae --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AllowListPayloadTest.java @@ -0,0 +1,45 @@ +/* + * 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 AllowListPayload */ +class AllowListPayloadTest { + private final AllowListPayload model = new AllowListPayload(); + + /** Model tests for AllowListPayload */ + @Test + void testAllowListPayload() { + // TODO: test AllowListPayload + } + + /** Test the property 'vaultAccountId' */ + @Test + void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'asset' */ + @Test + void assetTest() { + // TODO: test asset + } + + /** Test the property 'wallets' */ + @Test + void walletsTest() { + // TODO: test wallets + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ApprovalRequestItemTest.java b/src/test/java/com/fireblocks/sdk/model/ApprovalRequestItemTest.java new file mode 100644 index 00000000..b9fc9d19 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ApprovalRequestItemTest.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 ApprovalRequestItem */ +class ApprovalRequestItemTest { + private final ApprovalRequestItem model = new ApprovalRequestItem(); + + /** Model tests for ApprovalRequestItem */ + @Test + void testApprovalRequestItem() { + // TODO: test ApprovalRequestItem + } + + /** Test the property 'requestPayload' */ + @Test + void requestPayloadTest() { + // TODO: test requestPayload + } + + /** Test the property 'requestSignature' */ + @Test + void requestSignatureTest() { + // TODO: test requestSignature + } + + /** Test the property 'userStatus' */ + @Test + void userStatusTest() { + // TODO: test userStatus + } + + /** Test the property 'quorumStatus' */ + @Test + void quorumStatusTest() { + // TODO: test quorumStatus + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CallAcceptedTest.java b/src/test/java/com/fireblocks/sdk/model/CallAcceptedTest.java new file mode 100644 index 00000000..b675fa73 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CallAcceptedTest.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 CallAccepted */ +class CallAcceptedTest { + private final CallAccepted model = new CallAccepted(); + + /** Model tests for CallAccepted */ + @Test + void testCallAccepted() { + // TODO: test CallAccepted + } + + /** Test the property 'transactionId' */ + @Test + void transactionIdTest() { + // TODO: test transactionId + } + + /** Test the property 'status' */ + @Test + void statusTest() { + // TODO: test status + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CantonCallAllocationWithdrawTest.java b/src/test/java/com/fireblocks/sdk/model/CantonCallAllocationWithdrawTest.java new file mode 100644 index 00000000..f0fe61f0 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CantonCallAllocationWithdrawTest.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 CantonCallAllocationWithdraw */ +class CantonCallAllocationWithdrawTest { + private final CantonCallAllocationWithdraw model = new CantonCallAllocationWithdraw(); + + /** Model tests for CantonCallAllocationWithdraw */ + @Test + void testCantonCallAllocationWithdraw() { + // TODO: test CantonCallAllocationWithdraw + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'payload' */ + @Test + void payloadTest() { + // TODO: test payload + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CantonCallAllowListAddTest.java b/src/test/java/com/fireblocks/sdk/model/CantonCallAllowListAddTest.java new file mode 100644 index 00000000..f2e6a0d5 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CantonCallAllowListAddTest.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 CantonCallAllowListAdd */ +class CantonCallAllowListAddTest { + private final CantonCallAllowListAdd model = new CantonCallAllowListAdd(); + + /** Model tests for CantonCallAllowListAdd */ + @Test + void testCantonCallAllowListAdd() { + // TODO: test CantonCallAllowListAdd + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'payload' */ + @Test + void payloadTest() { + // TODO: test payload + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CantonCallAllowListRemoveTest.java b/src/test/java/com/fireblocks/sdk/model/CantonCallAllowListRemoveTest.java new file mode 100644 index 00000000..5efcca30 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CantonCallAllowListRemoveTest.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 CantonCallAllowListRemove */ +class CantonCallAllowListRemoveTest { + private final CantonCallAllowListRemove model = new CantonCallAllowListRemove(); + + /** Model tests for CantonCallAllowListRemove */ + @Test + void testCantonCallAllowListRemove() { + // TODO: test CantonCallAllowListRemove + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'payload' */ + @Test + void payloadTest() { + // TODO: test payload + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CantonCallEndInvestorInviteCancelTest.java b/src/test/java/com/fireblocks/sdk/model/CantonCallEndInvestorInviteCancelTest.java new file mode 100644 index 00000000..629e186e --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CantonCallEndInvestorInviteCancelTest.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 CantonCallEndInvestorInviteCancel */ +class CantonCallEndInvestorInviteCancelTest { + private final CantonCallEndInvestorInviteCancel model = new CantonCallEndInvestorInviteCancel(); + + /** Model tests for CantonCallEndInvestorInviteCancel */ + @Test + void testCantonCallEndInvestorInviteCancel() { + // TODO: test CantonCallEndInvestorInviteCancel + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'payload' */ + @Test + void payloadTest() { + // TODO: test payload + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CantonCallEndInvestorInviteTest.java b/src/test/java/com/fireblocks/sdk/model/CantonCallEndInvestorInviteTest.java new file mode 100644 index 00000000..8a262e96 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CantonCallEndInvestorInviteTest.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 CantonCallEndInvestorInvite */ +class CantonCallEndInvestorInviteTest { + private final CantonCallEndInvestorInvite model = new CantonCallEndInvestorInvite(); + + /** Model tests for CantonCallEndInvestorInvite */ + @Test + void testCantonCallEndInvestorInvite() { + // TODO: test CantonCallEndInvestorInvite + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'payload' */ + @Test + void payloadTest() { + // TODO: test payload + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CantonCallEndInvestorOffboardTest.java b/src/test/java/com/fireblocks/sdk/model/CantonCallEndInvestorOffboardTest.java new file mode 100644 index 00000000..a48aa3af --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CantonCallEndInvestorOffboardTest.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 CantonCallEndInvestorOffboard */ +class CantonCallEndInvestorOffboardTest { + private final CantonCallEndInvestorOffboard model = new CantonCallEndInvestorOffboard(); + + /** Model tests for CantonCallEndInvestorOffboard */ + @Test + void testCantonCallEndInvestorOffboard() { + // TODO: test CantonCallEndInvestorOffboard + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'payload' */ + @Test + void payloadTest() { + // TODO: test payload + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CantonCallParticipantOnboardingTest.java b/src/test/java/com/fireblocks/sdk/model/CantonCallParticipantOnboardingTest.java new file mode 100644 index 00000000..0cb9a4b7 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CantonCallParticipantOnboardingTest.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 CantonCallParticipantOnboarding */ +class CantonCallParticipantOnboardingTest { + private final CantonCallParticipantOnboarding model = new CantonCallParticipantOnboarding(); + + /** Model tests for CantonCallParticipantOnboarding */ + @Test + void testCantonCallParticipantOnboarding() { + // TODO: test CantonCallParticipantOnboarding + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'payload' */ + @Test + void payloadTest() { + // TODO: test payload + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CantonCallTest.java b/src/test/java/com/fireblocks/sdk/model/CantonCallTest.java new file mode 100644 index 00000000..ee6baff4 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CantonCallTest.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 CantonCall */ +class CantonCallTest { + private final CantonCall model = new CantonCall(); + + /** Model tests for CantonCall */ + @Test + void testCantonCall() { + // TODO: test CantonCall + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'payload' */ + @Test + void payloadTest() { + // TODO: test payload + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CantonCallTransferWithdrawTest.java b/src/test/java/com/fireblocks/sdk/model/CantonCallTransferWithdrawTest.java new file mode 100644 index 00000000..a14fca2c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CantonCallTransferWithdrawTest.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 CantonCallTransferWithdraw */ +class CantonCallTransferWithdrawTest { + private final CantonCallTransferWithdraw model = new CantonCallTransferWithdraw(); + + /** Model tests for CantonCallTransferWithdraw */ + @Test + void testCantonCallTransferWithdraw() { + // TODO: test CantonCallTransferWithdraw + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'payload' */ + @Test + void payloadTest() { + // TODO: test payload + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CreateWebhookOAuthRequestTest.java b/src/test/java/com/fireblocks/sdk/model/CreateWebhookOAuthRequestTest.java new file mode 100644 index 00000000..abb8dd19 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CreateWebhookOAuthRequestTest.java @@ -0,0 +1,81 @@ +/* + * 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 CreateWebhookOAuthRequest */ +class CreateWebhookOAuthRequestTest { + private final CreateWebhookOAuthRequest model = new CreateWebhookOAuthRequest(); + + /** Model tests for CreateWebhookOAuthRequest */ + @Test + void testCreateWebhookOAuthRequest() { + // TODO: test CreateWebhookOAuthRequest + } + + /** Test the property 'name' */ + @Test + void nameTest() { + // TODO: test name + } + + /** Test the property 'clientId' */ + @Test + void clientIdTest() { + // TODO: test clientId + } + + /** Test the property 'clientSecret' */ + @Test + void clientSecretTest() { + // TODO: test clientSecret + } + + /** Test the property 'url' */ + @Test + void urlTest() { + // TODO: test url + } + + /** Test the property 'authMethod' */ + @Test + void authMethodTest() { + // TODO: test authMethod + } + + /** Test the property 'customJwtClaims' */ + @Test + void customJwtClaimsTest() { + // TODO: test customJwtClaims + } + + /** Test the property 'customBodyParams' */ + @Test + void customBodyParamsTest() { + // TODO: test customBodyParams + } + + /** Test the property 'customHeaders' */ + @Test + void customHeadersTest() { + // TODO: test customHeaders + } + + /** Test the property 'mtlsClientSignedCert' */ + @Test + void mtlsClientSignedCertTest() { + // TODO: test mtlsClientSignedCert + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DeleteWebhookOAuthResponseTest.java b/src/test/java/com/fireblocks/sdk/model/DeleteWebhookOAuthResponseTest.java new file mode 100644 index 00000000..b8226074 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DeleteWebhookOAuthResponseTest.java @@ -0,0 +1,99 @@ +/* + * 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 DeleteWebhookOAuthResponse */ +class DeleteWebhookOAuthResponseTest { + private final DeleteWebhookOAuthResponse model = new DeleteWebhookOAuthResponse(); + + /** Model tests for DeleteWebhookOAuthResponse */ + @Test + void testDeleteWebhookOAuthResponse() { + // TODO: test DeleteWebhookOAuthResponse + } + + /** Test the property 'id' */ + @Test + void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + void nameTest() { + // TODO: test name + } + + /** Test the property 'clientId' */ + @Test + void clientIdTest() { + // TODO: test clientId + } + + /** Test the property 'url' */ + @Test + void urlTest() { + // TODO: test url + } + + /** Test the property 'authMethod' */ + @Test + void authMethodTest() { + // TODO: test authMethod + } + + /** Test the property 'customJwtClaims' */ + @Test + void customJwtClaimsTest() { + // TODO: test customJwtClaims + } + + /** Test the property 'customBodyParams' */ + @Test + void customBodyParamsTest() { + // TODO: test customBodyParams + } + + /** Test the property 'customHeaders' */ + @Test + void customHeadersTest() { + // TODO: test customHeaders + } + + /** Test the property 'mtlsClientSignedCert' */ + @Test + void mtlsClientSignedCertTest() { + // TODO: test mtlsClientSignedCert + } + + /** Test the property 'createdAt' */ + @Test + void createdAtTest() { + // TODO: test createdAt + } + + /** Test the property 'updatedAt' */ + @Test + void updatedAtTest() { + // TODO: test updatedAt + } + + /** Test the property 'detachedWebhookIds' */ + @Test + void detachedWebhookIdsTest() { + // TODO: test detachedWebhookIds + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DirectAccessResponseInfoTest.java b/src/test/java/com/fireblocks/sdk/model/DirectAccessResponseInfoTest.java new file mode 100644 index 00000000..9b13522c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DirectAccessResponseInfoTest.java @@ -0,0 +1,33 @@ +/* + * 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 DirectAccessResponseInfo */ +class DirectAccessResponseInfoTest { + private final DirectAccessResponseInfo model = new DirectAccessResponseInfo(); + + /** Model tests for DirectAccessResponseInfo */ + @Test + void testDirectAccessResponseInfo() { + // TODO: test DirectAccessResponseInfo + } + + /** Test the property 'subProviders' */ + @Test + void subProvidersTest() { + // TODO: test subProviders + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DirectAccessResponseTest.java b/src/test/java/com/fireblocks/sdk/model/DirectAccessResponseTest.java new file mode 100644 index 00000000..49b6ab8c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DirectAccessResponseTest.java @@ -0,0 +1,45 @@ +/* + * 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 DirectAccessResponse */ +class DirectAccessResponseTest { + private final DirectAccessResponse model = new DirectAccessResponse(); + + /** Model tests for DirectAccessResponse */ + @Test + void testDirectAccessResponse() { + // TODO: test DirectAccessResponse + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'providerId' */ + @Test + void providerIdTest() { + // TODO: test providerId + } + + /** Test the property 'subProviders' */ + @Test + void subProvidersTest() { + // TODO: test subProviders + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/EndInvestorPayloadTest.java b/src/test/java/com/fireblocks/sdk/model/EndInvestorPayloadTest.java new file mode 100644 index 00000000..f5656a89 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/EndInvestorPayloadTest.java @@ -0,0 +1,45 @@ +/* + * 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 EndInvestorPayload */ +class EndInvestorPayloadTest { + private final EndInvestorPayload model = new EndInvestorPayload(); + + /** Model tests for EndInvestorPayload */ + @Test + void testEndInvestorPayload() { + // TODO: test EndInvestorPayload + } + + /** Test the property 'vaultAccountId' */ + @Test + void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'asset' */ + @Test + void assetTest() { + // TODO: test asset + } + + /** Test the property 'endInvestor' */ + @Test + void endInvestorTest() { + // TODO: test endInvestor + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ListApprovalsResponseTest.java b/src/test/java/com/fireblocks/sdk/model/ListApprovalsResponseTest.java new file mode 100644 index 00000000..fabfaf10 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ListApprovalsResponseTest.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 ListApprovalsResponse */ +class ListApprovalsResponseTest { + private final ListApprovalsResponse model = new ListApprovalsResponse(); + + /** Model tests for ListApprovalsResponse */ + @Test + void testListApprovalsResponse() { + // TODO: test ListApprovalsResponse + } + + /** Test the property 'data' */ + @Test + void dataTest() { + // TODO: test data + } + + /** Test the property 'next' */ + @Test + void nextTest() { + // TODO: test next + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/OfferResponseAcceptedTest.java b/src/test/java/com/fireblocks/sdk/model/OfferResponseAcceptedTest.java new file mode 100644 index 00000000..3e2e40fc --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/OfferResponseAcceptedTest.java @@ -0,0 +1,45 @@ +/* + * 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 OfferResponseAccepted */ +class OfferResponseAcceptedTest { + private final OfferResponseAccepted model = new OfferResponseAccepted(); + + /** Model tests for OfferResponseAccepted */ + @Test + void testOfferResponseAccepted() { + // TODO: test OfferResponseAccepted + } + + /** Test the property 'transactionId' */ + @Test + void transactionIdTest() { + // TODO: test transactionId + } + + /** Test the property 'status' */ + @Test + void statusTest() { + // TODO: test status + } + + /** Test the property 'responseType' */ + @Test + void responseTypeTest() { + // TODO: test responseType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/OfferResponseAllocationTest.java b/src/test/java/com/fireblocks/sdk/model/OfferResponseAllocationTest.java new file mode 100644 index 00000000..d44b8f62 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/OfferResponseAllocationTest.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 OfferResponseAllocation */ +class OfferResponseAllocationTest { + private final OfferResponseAllocation model = new OfferResponseAllocation(); + + /** Model tests for OfferResponseAllocation */ + @Test + void testOfferResponseAllocation() { + // TODO: test OfferResponseAllocation + } + + /** Test the property 'domain' */ + @Test + void domainTest() { + // TODO: test domain + } + + /** Test the property 'response' */ + @Test + void responseTest() { + // TODO: test response + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/OfferResponseOnboardingTest.java b/src/test/java/com/fireblocks/sdk/model/OfferResponseOnboardingTest.java new file mode 100644 index 00000000..1c315a3d --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/OfferResponseOnboardingTest.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 OfferResponseOnboarding */ +class OfferResponseOnboardingTest { + private final OfferResponseOnboarding model = new OfferResponseOnboarding(); + + /** Model tests for OfferResponseOnboarding */ + @Test + void testOfferResponseOnboarding() { + // TODO: test OfferResponseOnboarding + } + + /** Test the property 'domain' */ + @Test + void domainTest() { + // TODO: test domain + } + + /** Test the property 'response' */ + @Test + void responseTest() { + // TODO: test response + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/OfferResponseTest.java b/src/test/java/com/fireblocks/sdk/model/OfferResponseTest.java new file mode 100644 index 00000000..64b1679e --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/OfferResponseTest.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 OfferResponse */ +class OfferResponseTest { + private final OfferResponse model = new OfferResponse(); + + /** Model tests for OfferResponse */ + @Test + void testOfferResponse() { + // TODO: test OfferResponse + } + + /** Test the property 'domain' */ + @Test + void domainTest() { + // TODO: test domain + } + + /** Test the property 'response' */ + @Test + void responseTest() { + // TODO: test response + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/OfferResponseTransferTest.java b/src/test/java/com/fireblocks/sdk/model/OfferResponseTransferTest.java new file mode 100644 index 00000000..78440f75 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/OfferResponseTransferTest.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 OfferResponseTransfer */ +class OfferResponseTransferTest { + private final OfferResponseTransfer model = new OfferResponseTransfer(); + + /** Model tests for OfferResponseTransfer */ + @Test + void testOfferResponseTransfer() { + // TODO: test OfferResponseTransfer + } + + /** Test the property 'domain' */ + @Test + void domainTest() { + // TODO: test domain + } + + /** Test the property 'response' */ + @Test + void responseTest() { + // TODO: test response + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/OnboardingResponseDtccAcceptTest.java b/src/test/java/com/fireblocks/sdk/model/OnboardingResponseDtccAcceptTest.java new file mode 100644 index 00000000..e5dd72db --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/OnboardingResponseDtccAcceptTest.java @@ -0,0 +1,33 @@ +/* + * 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 OnboardingResponseDtccAccept */ +class OnboardingResponseDtccAcceptTest { + private final OnboardingResponseDtccAccept model = new OnboardingResponseDtccAccept(); + + /** Model tests for OnboardingResponseDtccAccept */ + @Test + void testOnboardingResponseDtccAccept() { + // TODO: test OnboardingResponseDtccAccept + } + + /** Test the property 'responseType' */ + @Test + void responseTypeTest() { + // TODO: test responseType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/OnboardingResponseDtccRejectTest.java b/src/test/java/com/fireblocks/sdk/model/OnboardingResponseDtccRejectTest.java new file mode 100644 index 00000000..ea752482 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/OnboardingResponseDtccRejectTest.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 OnboardingResponseDtccReject */ +class OnboardingResponseDtccRejectTest { + private final OnboardingResponseDtccReject model = new OnboardingResponseDtccReject(); + + /** Model tests for OnboardingResponseDtccReject */ + @Test + void testOnboardingResponseDtccReject() { + // TODO: test OnboardingResponseDtccReject + } + + /** Test the property 'responseType' */ + @Test + void responseTypeTest() { + // TODO: test responseType + } + + /** Test the property 'reason' */ + @Test + void reasonTest() { + // TODO: test reason + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/OnboardingResponseTest.java b/src/test/java/com/fireblocks/sdk/model/OnboardingResponseTest.java new file mode 100644 index 00000000..bc0b2e4a --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/OnboardingResponseTest.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 OnboardingResponse */ +class OnboardingResponseTest { + private final OnboardingResponse model = new OnboardingResponse(); + + /** Model tests for OnboardingResponse */ + @Test + void testOnboardingResponse() { + // TODO: test OnboardingResponse + } + + /** Test the property 'responseType' */ + @Test + void responseTypeTest() { + // TODO: test responseType + } + + /** Test the property 'reason' */ + @Test + void reasonTest() { + // TODO: test reason + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/OnboardingResponseTradewebAcceptTest.java b/src/test/java/com/fireblocks/sdk/model/OnboardingResponseTradewebAcceptTest.java new file mode 100644 index 00000000..1d177bea --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/OnboardingResponseTradewebAcceptTest.java @@ -0,0 +1,33 @@ +/* + * 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 OnboardingResponseTradewebAccept */ +class OnboardingResponseTradewebAcceptTest { + private final OnboardingResponseTradewebAccept model = new OnboardingResponseTradewebAccept(); + + /** Model tests for OnboardingResponseTradewebAccept */ + @Test + void testOnboardingResponseTradewebAccept() { + // TODO: test OnboardingResponseTradewebAccept + } + + /** Test the property 'responseType' */ + @Test + void responseTypeTest() { + // TODO: test responseType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/OnboardingResponseTradewebRejectTest.java b/src/test/java/com/fireblocks/sdk/model/OnboardingResponseTradewebRejectTest.java new file mode 100644 index 00000000..f2dc32bf --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/OnboardingResponseTradewebRejectTest.java @@ -0,0 +1,33 @@ +/* + * 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 OnboardingResponseTradewebReject */ +class OnboardingResponseTradewebRejectTest { + private final OnboardingResponseTradewebReject model = new OnboardingResponseTradewebReject(); + + /** Model tests for OnboardingResponseTradewebReject */ + @Test + void testOnboardingResponseTradewebReject() { + // TODO: test OnboardingResponseTradewebReject + } + + /** Test the property 'responseType' */ + @Test + void responseTypeTest() { + // TODO: test responseType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ParticipantOnboardingPayloadTest.java b/src/test/java/com/fireblocks/sdk/model/ParticipantOnboardingPayloadTest.java new file mode 100644 index 00000000..abb9439f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ParticipantOnboardingPayloadTest.java @@ -0,0 +1,75 @@ +/* + * 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 ParticipantOnboardingPayload */ +class ParticipantOnboardingPayloadTest { + private final ParticipantOnboardingPayload model = new ParticipantOnboardingPayload(); + + /** Model tests for ParticipantOnboardingPayload */ + @Test + void testParticipantOnboardingPayload() { + // TODO: test ParticipantOnboardingPayload + } + + /** Test the property 'vaultAccountId' */ + @Test + void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'asset' */ + @Test + void assetTest() { + // TODO: test asset + } + + /** Test the property 'expiresAt' */ + @Test + void expiresAtTest() { + // TODO: test expiresAt + } + + /** Test the property 'operator' */ + @Test + void operatorTest() { + // TODO: test operator + } + + /** Test the property 'provider' */ + @Test + void providerTest() { + // TODO: test provider + } + + /** Test the property 'compliance' */ + @Test + void complianceTest() { + // TODO: test compliance + } + + /** Test the property 'registrar' */ + @Test + void registrarTest() { + // TODO: test registrar + } + + /** Test the property 'clientOnboarder' */ + @Test + void clientOnboarderTest() { + // TODO: test clientOnboarder + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/PositionRelatedTransactionTest.java b/src/test/java/com/fireblocks/sdk/model/PositionRelatedTransactionTest.java index f4dd080a..34f4211a 100644 --- a/src/test/java/com/fireblocks/sdk/model/PositionRelatedTransactionTest.java +++ b/src/test/java/com/fireblocks/sdk/model/PositionRelatedTransactionTest.java @@ -66,4 +66,10 @@ void amountTest() { void txNoteTest() { // TODO: test txNote } + + /** Test the property 'completionTime' */ + @Test + void completionTimeTest() { + // TODO: test completionTime + } } diff --git a/src/test/java/com/fireblocks/sdk/model/QuorumApprovalStateTest.java b/src/test/java/com/fireblocks/sdk/model/QuorumApprovalStateTest.java new file mode 100644 index 00000000..e683637b --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/QuorumApprovalStateTest.java @@ -0,0 +1,25 @@ +/* + * 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 QuorumApprovalState */ +class QuorumApprovalStateTest { + /** Model tests for QuorumApprovalState */ + @Test + void testQuorumApprovalState() { + // TODO: test QuorumApprovalState + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/QuorumGroupTest.java b/src/test/java/com/fireblocks/sdk/model/QuorumGroupTest.java new file mode 100644 index 00000000..51ce76f7 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/QuorumGroupTest.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 QuorumGroup */ +class QuorumGroupTest { + private final QuorumGroup model = new QuorumGroup(); + + /** Model tests for QuorumGroup */ + @Test + void testQuorumGroup() { + // TODO: test QuorumGroup + } + + /** Test the property 'threshold' */ + @Test + void thresholdTest() { + // TODO: test threshold + } + + /** Test the property 'currentApprovalCount' */ + @Test + void currentApprovalCountTest() { + // TODO: test currentApprovalCount + } + + /** Test the property 'status' */ + @Test + void statusTest() { + // TODO: test status + } + + /** Test the property 'members' */ + @Test + void membersTest() { + // TODO: test members + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/QuorumRequestStateTest.java b/src/test/java/com/fireblocks/sdk/model/QuorumRequestStateTest.java new file mode 100644 index 00000000..501e8202 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/QuorumRequestStateTest.java @@ -0,0 +1,25 @@ +/* + * 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 QuorumRequestState */ +class QuorumRequestStateTest { + /** Model tests for QuorumRequestState */ + @Test + void testQuorumRequestState() { + // TODO: test QuorumRequestState + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/QuorumRulesetTest.java b/src/test/java/com/fireblocks/sdk/model/QuorumRulesetTest.java new file mode 100644 index 00000000..da51e6d6 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/QuorumRulesetTest.java @@ -0,0 +1,45 @@ +/* + * 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 QuorumRuleset */ +class QuorumRulesetTest { + private final QuorumRuleset model = new QuorumRuleset(); + + /** Model tests for QuorumRuleset */ + @Test + void testQuorumRuleset() { + // TODO: test QuorumRuleset + } + + /** Test the property 'groupMatch' */ + @Test + void groupMatchTest() { + // TODO: test groupMatch + } + + /** Test the property 'status' */ + @Test + void statusTest() { + // TODO: test status + } + + /** Test the property 'groups' */ + @Test + void groupsTest() { + // TODO: test groups + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/QuorumStatusQuorumTest.java b/src/test/java/com/fireblocks/sdk/model/QuorumStatusQuorumTest.java new file mode 100644 index 00000000..2e54e712 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/QuorumStatusQuorumTest.java @@ -0,0 +1,75 @@ +/* + * 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 QuorumStatusQuorum */ +class QuorumStatusQuorumTest { + private final QuorumStatusQuorum model = new QuorumStatusQuorum(); + + /** Model tests for QuorumStatusQuorum */ + @Test + void testQuorumStatusQuorum() { + // TODO: test QuorumStatusQuorum + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'threshold' */ + @Test + void thresholdTest() { + // TODO: test threshold + } + + /** Test the property 'currentApprovalCount' */ + @Test + void currentApprovalCountTest() { + // TODO: test currentApprovalCount + } + + /** Test the property 'status' */ + @Test + void statusTest() { + // TODO: test status + } + + /** Test the property 'isMandatoryOwnerApproved' */ + @Test + void isMandatoryOwnerApprovedTest() { + // TODO: test isMandatoryOwnerApproved + } + + /** Test the property 'members' */ + @Test + void membersTest() { + // TODO: test members + } + + /** Test the property 'rulesetMatch' */ + @Test + void rulesetMatchTest() { + // TODO: test rulesetMatch + } + + /** Test the property 'rulesets' */ + @Test + void rulesetsTest() { + // TODO: test rulesets + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/QuorumStatusTest.java b/src/test/java/com/fireblocks/sdk/model/QuorumStatusTest.java new file mode 100644 index 00000000..231c1592 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/QuorumStatusTest.java @@ -0,0 +1,45 @@ +/* + * 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 QuorumStatus */ +class QuorumStatusTest { + private final QuorumStatus model = new QuorumStatus(); + + /** Model tests for QuorumStatus */ + @Test + void testQuorumStatus() { + // TODO: test QuorumStatus + } + + /** Test the property 'requestStatus' */ + @Test + void requestStatusTest() { + // TODO: test requestStatus + } + + /** Test the property 'users' */ + @Test + void usersTest() { + // TODO: test users + } + + /** Test the property 'quorum' */ + @Test + void quorumTest() { + // TODO: test quorum + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/QuorumUserTest.java b/src/test/java/com/fireblocks/sdk/model/QuorumUserTest.java new file mode 100644 index 00000000..f32697ed --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/QuorumUserTest.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 QuorumUser */ +class QuorumUserTest { + private final QuorumUser model = new QuorumUser(); + + /** Model tests for QuorumUser */ + @Test + void testQuorumUser() { + // TODO: test QuorumUser + } + + /** Test the property 'index' */ + @Test + void indexTest() { + // TODO: test index + } + + /** Test the property 'userId' */ + @Test + void userIdTest() { + // TODO: test userId + } + + /** Test the property 'status' */ + @Test + void statusTest() { + // TODO: test status + } + + /** Test the property 'isMandatoryOwner' */ + @Test + void isMandatoryOwnerTest() { + // TODO: test isMandatoryOwner + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/RulesetQuorumTest.java b/src/test/java/com/fireblocks/sdk/model/RulesetQuorumTest.java new file mode 100644 index 00000000..b0ecbf70 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/RulesetQuorumTest.java @@ -0,0 +1,57 @@ +/* + * 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 RulesetQuorum */ +class RulesetQuorumTest { + private final RulesetQuorum model = new RulesetQuorum(); + + /** Model tests for RulesetQuorum */ + @Test + void testRulesetQuorum() { + // TODO: test RulesetQuorum + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'rulesetMatch' */ + @Test + void rulesetMatchTest() { + // TODO: test rulesetMatch + } + + /** Test the property 'status' */ + @Test + void statusTest() { + // TODO: test status + } + + /** Test the property 'isMandatoryOwnerApproved' */ + @Test + void isMandatoryOwnerApprovedTest() { + // TODO: test isMandatoryOwnerApproved + } + + /** Test the property 'rulesets' */ + @Test + void rulesetsTest() { + // TODO: test rulesets + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SimpleQuorumTest.java b/src/test/java/com/fireblocks/sdk/model/SimpleQuorumTest.java new file mode 100644 index 00000000..edba7ddc --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SimpleQuorumTest.java @@ -0,0 +1,63 @@ +/* + * 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 SimpleQuorum */ +class SimpleQuorumTest { + private final SimpleQuorum model = new SimpleQuorum(); + + /** Model tests for SimpleQuorum */ + @Test + void testSimpleQuorum() { + // TODO: test SimpleQuorum + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'threshold' */ + @Test + void thresholdTest() { + // TODO: test threshold + } + + /** Test the property 'currentApprovalCount' */ + @Test + void currentApprovalCountTest() { + // TODO: test currentApprovalCount + } + + /** Test the property 'status' */ + @Test + void statusTest() { + // TODO: test status + } + + /** Test the property 'isMandatoryOwnerApproved' */ + @Test + void isMandatoryOwnerApprovedTest() { + // TODO: test isMandatoryOwnerApproved + } + + /** Test the property 'members' */ + @Test + void membersTest() { + // TODO: test members + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransactionResponseTest.java b/src/test/java/com/fireblocks/sdk/model/TransactionResponseTest.java index 97420e35..db33cfee 100644 --- a/src/test/java/com/fireblocks/sdk/model/TransactionResponseTest.java +++ b/src/test/java/com/fireblocks/sdk/model/TransactionResponseTest.java @@ -163,6 +163,12 @@ void feeCurrencyTest() { // TODO: test feeCurrency } + /** Test the property 'requestedFeeCurrency' */ + @Test + void requestedFeeCurrencyTest() { + // TODO: test requestedFeeCurrency + } + /** Test the property 'networkRecords' */ @Test void networkRecordsTest() { diff --git a/src/test/java/com/fireblocks/sdk/model/TransferResponseAcceptTest.java b/src/test/java/com/fireblocks/sdk/model/TransferResponseAcceptTest.java new file mode 100644 index 00000000..ba5befb5 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TransferResponseAcceptTest.java @@ -0,0 +1,33 @@ +/* + * 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 TransferResponseAccept */ +class TransferResponseAcceptTest { + private final TransferResponseAccept model = new TransferResponseAccept(); + + /** Model tests for TransferResponseAccept */ + @Test + void testTransferResponseAccept() { + // TODO: test TransferResponseAccept + } + + /** Test the property 'responseType' */ + @Test + void responseTypeTest() { + // TODO: test responseType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransferResponseRejectTest.java b/src/test/java/com/fireblocks/sdk/model/TransferResponseRejectTest.java new file mode 100644 index 00000000..54e5d5aa --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TransferResponseRejectTest.java @@ -0,0 +1,33 @@ +/* + * 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 TransferResponseReject */ +class TransferResponseRejectTest { + private final TransferResponseReject model = new TransferResponseReject(); + + /** Model tests for TransferResponseReject */ + @Test + void testTransferResponseReject() { + // TODO: test TransferResponseReject + } + + /** Test the property 'responseType' */ + @Test + void responseTypeTest() { + // TODO: test responseType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransferResponseTest.java b/src/test/java/com/fireblocks/sdk/model/TransferResponseTest.java new file mode 100644 index 00000000..1cf0bec0 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TransferResponseTest.java @@ -0,0 +1,33 @@ +/* + * 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 TransferResponse */ +class TransferResponseTest { + private final TransferResponse model = new TransferResponse(); + + /** Model tests for TransferResponse */ + @Test + void testTransferResponse() { + // TODO: test TransferResponse + } + + /** Test the property 'responseType' */ + @Test + void responseTypeTest() { + // TODO: test responseType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransferWithdrawPayloadTest.java b/src/test/java/com/fireblocks/sdk/model/TransferWithdrawPayloadTest.java new file mode 100644 index 00000000..2ddc6f46 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TransferWithdrawPayloadTest.java @@ -0,0 +1,45 @@ +/* + * 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 TransferWithdrawPayload */ +class TransferWithdrawPayloadTest { + private final TransferWithdrawPayload model = new TransferWithdrawPayload(); + + /** Model tests for TransferWithdrawPayload */ + @Test + void testTransferWithdrawPayload() { + // TODO: test TransferWithdrawPayload + } + + /** Test the property 'vaultAccountId' */ + @Test + void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'asset' */ + @Test + void assetTest() { + // TODO: test asset + } + + /** Test the property 'offerTransactionId' */ + @Test + void offerTransactionIdTest() { + // TODO: test offerTransactionId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/UpdateWebhookOAuthRequestTest.java b/src/test/java/com/fireblocks/sdk/model/UpdateWebhookOAuthRequestTest.java new file mode 100644 index 00000000..42708fea --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/UpdateWebhookOAuthRequestTest.java @@ -0,0 +1,81 @@ +/* + * 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 UpdateWebhookOAuthRequest */ +class UpdateWebhookOAuthRequestTest { + private final UpdateWebhookOAuthRequest model = new UpdateWebhookOAuthRequest(); + + /** Model tests for UpdateWebhookOAuthRequest */ + @Test + void testUpdateWebhookOAuthRequest() { + // TODO: test UpdateWebhookOAuthRequest + } + + /** Test the property 'name' */ + @Test + void nameTest() { + // TODO: test name + } + + /** Test the property 'clientId' */ + @Test + void clientIdTest() { + // TODO: test clientId + } + + /** Test the property 'clientSecret' */ + @Test + void clientSecretTest() { + // TODO: test clientSecret + } + + /** Test the property 'url' */ + @Test + void urlTest() { + // TODO: test url + } + + /** Test the property 'authMethod' */ + @Test + void authMethodTest() { + // TODO: test authMethod + } + + /** Test the property 'customJwtClaims' */ + @Test + void customJwtClaimsTest() { + // TODO: test customJwtClaims + } + + /** Test the property 'customBodyParams' */ + @Test + void customBodyParamsTest() { + // TODO: test customBodyParams + } + + /** Test the property 'customHeaders' */ + @Test + void customHeadersTest() { + // TODO: test customHeaders + } + + /** Test the property 'mtlsClientSignedCert' */ + @Test + void mtlsClientSignedCertTest() { + // TODO: test mtlsClientSignedCert + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/UtxoOutputTest.java b/src/test/java/com/fireblocks/sdk/model/UtxoOutputTest.java index bebaea45..f2fb2674 100644 --- a/src/test/java/com/fireblocks/sdk/model/UtxoOutputTest.java +++ b/src/test/java/com/fireblocks/sdk/model/UtxoOutputTest.java @@ -114,4 +114,10 @@ void updatedAtTest() { void labelsTest() { // TODO: test labels } + + /** Test the property 'hasNativeAssets' */ + @Test + void hasNativeAssetsTest() { + // TODO: test hasNativeAssets + } } diff --git a/src/test/java/com/fireblocks/sdk/model/WebhookOAuthCredentialsTest.java b/src/test/java/com/fireblocks/sdk/model/WebhookOAuthCredentialsTest.java new file mode 100644 index 00000000..62dcd14e --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/WebhookOAuthCredentialsTest.java @@ -0,0 +1,93 @@ +/* + * 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 WebhookOAuthCredentials */ +class WebhookOAuthCredentialsTest { + private final WebhookOAuthCredentials model = new WebhookOAuthCredentials(); + + /** Model tests for WebhookOAuthCredentials */ + @Test + void testWebhookOAuthCredentials() { + // TODO: test WebhookOAuthCredentials + } + + /** Test the property 'id' */ + @Test + void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + void nameTest() { + // TODO: test name + } + + /** Test the property 'clientId' */ + @Test + void clientIdTest() { + // TODO: test clientId + } + + /** Test the property 'url' */ + @Test + void urlTest() { + // TODO: test url + } + + /** Test the property 'authMethod' */ + @Test + void authMethodTest() { + // TODO: test authMethod + } + + /** Test the property 'customJwtClaims' */ + @Test + void customJwtClaimsTest() { + // TODO: test customJwtClaims + } + + /** Test the property 'customBodyParams' */ + @Test + void customBodyParamsTest() { + // TODO: test customBodyParams + } + + /** Test the property 'customHeaders' */ + @Test + void customHeadersTest() { + // TODO: test customHeaders + } + + /** Test the property 'mtlsClientSignedCert' */ + @Test + void mtlsClientSignedCertTest() { + // TODO: test mtlsClientSignedCert + } + + /** Test the property 'createdAt' */ + @Test + void createdAtTest() { + // TODO: test createdAt + } + + /** Test the property 'updatedAt' */ + @Test + void updatedAtTest() { + // TODO: test updatedAt + } +}