From 1ad53ba0b157d0232426b9ae9e247454539f32f6 Mon Sep 17 00:00:00 2001 From: Asaf Shushan Date: Sun, 7 Apr 2024 13:08:59 +0300 Subject: [PATCH] Generated SDK for version v1.0.0 GA --- README.md | 159 +- api/openapi.yaml | 2378 ++++++++++++++--- build.gradle | 2 +- docs/APIUser.md | 18 + docs/Account.md | 14 + docs/AccountType.md | 19 + docs/AdminQuorumApi.md | 88 - docs/ApiUserApi.md | 43 +- docs/AssetAmount.md | 14 + docs/AssetBadRequestErrorResponse.md | 14 + docs/AssetConflictErrorResponse.md | 14 + docs/AssetInternalServerErrorResponse.md | 14 + docs/AssetNotFoundErrorResponse.md | 14 + docs/AssetResponse.md | 27 + docs/AssetResponseMetadata.md | 23 + docs/AssetResponseOnchain.md | 17 + docs/AssetsApi.md | 19 +- docs/AuditLogData.md | 20 + docs/AuditLogsApi.md | 41 +- docs/BlockchainsAssetsApi.md | 108 +- docs/ComplianceApi.md | 121 +- docs/ComplianceScreeningConfigurationApi.md | 36 +- docs/ConfigConversionOperationSnapshot.md | 15 + docs/ConfigDisbursementOperationSnapshot.md | 15 + docs/ConfigOperation.md | 46 + docs/ConfigOperationSnapshot.md | 46 + docs/ConfigOperationStatus.md | 17 + docs/ConfigTransferOperationSnapshot.md | 15 + docs/ConsoleUser.md | 20 + docs/ConsoleUserApi.md | 43 +- docs/ContractsApi.md | 121 +- docs/ConversionConfigOperation.md | 17 + docs/ConversionOperationConfigParams.md | 17 + docs/ConversionOperationExecution.md | 17 + docs/ConversionOperationExecutionOutput.md | 15 + docs/ConversionOperationExecutionParams.md | 14 + ...OperationExecutionParamsExecutionParams.md | 17 + docs/ConversionOperationFailure.md | 25 + docs/ConversionOperationPreview.md | 15 + docs/ConversionOperationPreviewOutput.md | 16 + docs/ConversionOperationType.md | 11 + docs/ConversionValidationFailure.md | 37 + docs/ConvertAssetsResponse.md | 13 + docs/CreateConfigOperationRequest.md | 46 + .../CreateConversionConfigOperationRequest.md | 14 + ...reateDisbursementConfigOperationRequest.md | 14 + docs/CreateNetworkIdRequest.md | 2 +- docs/CreateTransferConfigOperationRequest.md | 14 + ...eateWorkflowExecutionRequestParamsInner.md | 46 + docs/CustomFiatRoutingDest.md | 31 - ...ptoRoutingDest.md => CustomRoutingDest.md} | 7 +- docs/DepositFundsFromLinkedDDAResponse.md | 13 + docs/Destination.md | 37 + docs/DisbursementAmountInstruction.md | 15 + docs/DisbursementConfigOperation.md | 17 + docs/DisbursementInstruction.md | 37 + docs/DisbursementInstructionOutput.md | 15 + docs/DisbursementOperationConfigParams.md | 14 + docs/DisbursementOperationExecution.md | 18 + docs/DisbursementOperationExecutionOutput.md | 13 + docs/DisbursementOperationExecutionParams.md | 14 + ...OperationExecutionParamsExecutionParams.md | 15 + docs/DisbursementOperationInput.md | 15 + docs/DisbursementOperationPreview.md | 15 + docs/DisbursementOperationPreviewOutput.md | 13 + ...erationPreviewOutputInstructionSetInner.md | 16 + docs/DisbursementOperationType.md | 11 + docs/DisbursementPercentageInstruction.md | 15 + docs/DisbursementValidationFailure.md | 36 + docs/EditGasStationConfigurationResponse.md | 13 + docs/ExchangeAccountsApi.md | 97 +- docs/ExecutionConversionOperation.md | 18 + docs/ExecutionDisbursementOperation.md | 18 + docs/ExecutionOperationStatus.md | 33 + docs/ExecutionScreeningOperation.md | 17 + docs/ExecutionTransferOperation.md | 18 + docs/ExternalWalletsApi.md | 138 +- docs/FiatAccountsApi.md | 80 +- docs/GasStationsApi.md | 80 +- docs/GetAPIUsersResponse.md | 13 + docs/GetAuditLogsResponse.md | 15 + docs/GetConsoleUsersResponse.md | 13 + docs/GetMaxSpendableAmountResponse.md | 13 + docs/GetWhitelistIpAddressesResponse.md | 14 + docs/InternalTransferResponse.md | 13 + docs/InternalWalletsApi.md | 138 +- docs/JobManagementApi.md | 104 +- docs/NetworkConnection.md | 2 +- docs/NetworkConnectionResponse.md | 2 +- docs/NetworkConnectionRoutingPolicy.md | 17 - docs/NetworkConnectionRoutingPolicyCrypto.md | 46 - docs/NetworkConnectionRoutingPolicySen.md | 46 - docs/NetworkConnectionRoutingPolicySenTest.md | 46 - docs/NetworkConnectionRoutingPolicySignet.md | 46 - ...etworkConnectionRoutingPolicySignetTest.md | 46 - docs/NetworkConnectionRoutingPolicyValue.md | 46 + docs/NetworkConnectionsApi.md | 227 +- docs/NetworkIdResponse.md | 2 +- docs/NetworkIdRoutingPolicy.md | 17 - docs/NetworkIdRoutingPolicyCrypto.md | 37 - docs/NetworkIdRoutingPolicySen.md | 37 - docs/NetworkIdRoutingPolicySenTest.md | 37 - docs/NetworkIdRoutingPolicyValue.md | 37 + docs/NftsApi.md | 172 +- docs/OffExchangesApi.md | 87 +- docs/OneTimeAddressAccount.md | 14 + docs/OperationExecutionFailure.md | 14 + docs/OtaBetaApi.md | 45 +- docs/PaymentsPayoutApi.md | 53 +- docs/PolicyEditorBetaApi.md | 87 +- docs/PreScreening.md | 13 + docs/RedeemFundsToLinkedDDAResponse.md | 13 + docs/RegisterNewAssetRequest.md | 15 + docs/RenameVaultAccountResponse.md | 14 + docs/ResendWebhooksByTransactionIdResponse.md | 13 + docs/ResetDeviceApi.md | 21 +- docs/ScreeningOperationExecution.md | 16 + docs/ScreeningOperationExecutionOutput.md | 13 + docs/ScreeningOperationFailure.md | 23 + docs/ScreeningOperationType.md | 11 + docs/ScreeningValidationFailure.md | 22 + docs/ScreeningVerdict.md | 30 + docs/ScreeningVerdictMatchedRule.md | 14 + docs/SetAdminQuorumThresholdResponse.md | 13 + docs/SetNetworkIdRoutingPolicyRequest.md | 2 +- docs/SetOtaStatusResponse.md | 37 + docs/SetOtaStatusResponseOneOf.md | 13 + docs/SetRoutingPolicyRequest.md | 2 +- docs/SmartTransferApi.md | 274 +- docs/StakingBetaApi.md | 155 +- docs/TransactionsApi.md | 223 +- docs/TransferConfigOperation.md | 17 + docs/TransferOperationConfigParams.md | 16 + docs/TransferOperationExecution.md | 18 + docs/TransferOperationExecutionOutput.md | 14 + docs/TransferOperationExecutionParams.md | 14 + ...OperationExecutionParamsExecutionParams.md | 16 + docs/TransferOperationFailure.md | 24 + docs/TransferOperationFailureData.md | 15 + docs/TransferOperationPreview.md | 15 + docs/TransferOperationPreviewOutput.md | 16 + docs/TransferOperationType.md | 11 + docs/TransferValidationFailure.md | 34 + docs/TravelRuleBetaApi.md | 87 +- docs/UserGroupsBetaApi.md | 87 +- docs/UserRole.md | 31 + docs/UserStatus.md | 17 + docs/UserType.md | 13 + docs/UsersApi.md | 19 +- docs/VaultsApi.md | 437 +-- docs/Web3ConnectionsApi.md | 70 +- docs/WebhooksApi.md | 41 +- docs/WhitelistIpAddressesApi.md | 24 +- docs/WorkflowConfigStatus.md | 17 + docs/WorkflowConfigurationId.md | 13 + docs/WorkflowExecutionOperation.md | 55 + docs/WorkspaceApi.md | 86 - docs/WorkspaceStatusBetaApi.md | 19 +- pom.xml | 2 +- .../com/fireblocks/sdk/Configuration.java | 2 +- .../java/com/fireblocks/sdk/Fireblocks.java | 16 - .../fireblocks/sdk/api/AdminQuorumApi.java | 148 - .../com/fireblocks/sdk/api/ApiUserApi.java | 26 +- .../com/fireblocks/sdk/api/AuditLogsApi.java | 27 +- .../sdk/api/BlockchainsAssetsApi.java | 83 + .../fireblocks/sdk/api/ConsoleUserApi.java | 27 +- .../sdk/api/ExchangeAccountsApi.java | 50 +- .../fireblocks/sdk/api/FiatAccountsApi.java | 53 +- .../fireblocks/sdk/api/GasStationsApi.java | 61 +- .../com/fireblocks/sdk/api/OtaBetaApi.java | 25 +- .../com/fireblocks/sdk/api/VaultsApi.java | 50 +- .../com/fireblocks/sdk/api/WebhooksApi.java | 34 +- .../sdk/api/WhitelistIpAddressesApi.java | 29 +- .../com/fireblocks/sdk/api/WorkspaceApi.java | 130 - .../com/fireblocks/sdk/model/APIUser.java | 341 +++ .../com/fireblocks/sdk/model/Account.java | 181 ++ .../com/fireblocks/sdk/model/AccountType.java | 70 + .../com/fireblocks/sdk/model/AssetAmount.java | 178 ++ .../model/AssetBadRequestErrorResponse.java | 182 ++ .../sdk/model/AssetConflictErrorResponse.java | 181 ++ .../AssetInternalServerErrorResponse.java | 182 ++ .../sdk/model/AssetNotFoundErrorResponse.java | 181 ++ .../fireblocks/sdk/model/AssetResponse.java | 289 ++ .../sdk/model/AssetResponseMetadata.java | 217 ++ .../sdk/model/AssetResponseOnchain.java | 302 +++ .../fireblocks/sdk/model/AuditLogData.java | 423 +++ .../ConfigConversionOperationSnapshot.java | 218 ++ .../ConfigDisbursementOperationSnapshot.java | 218 ++ ...PolicyCrypto.java => ConfigOperation.java} | 241 +- .../sdk/model/ConfigOperationSnapshot.java | 430 +++ .../sdk/model/ConfigOperationStatus.java | 68 + .../ConfigTransferOperationSnapshot.java | 218 ++ .../com/fireblocks/sdk/model/ConsoleUser.java | 422 +++ .../sdk/model/ConversionConfigOperation.java | 296 ++ .../ConversionOperationConfigParams.java | 312 +++ .../model/ConversionOperationExecution.java | 287 ++ .../ConversionOperationExecutionOutput.java | 213 ++ .../ConversionOperationExecutionParams.java | 185 ++ ...erationExecutionParamsExecutionParams.java | 321 +++ .../sdk/model/ConversionOperationFailure.java | 239 ++ .../sdk/model/ConversionOperationPreview.java | 201 ++ .../ConversionOperationPreviewOutput.java | 256 ++ .../sdk/model/ConversionOperationType.java | 62 + .../model/ConversionValidationFailure.java | 263 ++ .../sdk/model/ConvertAssetsResponse.java | 139 + .../model/CreateConfigOperationRequest.java | 442 +++ ...reateConversionConfigOperationRequest.java | 176 ++ ...ateDisbursementConfigOperationRequest.java | 177 ++ .../sdk/model/CreateNetworkIdRequest.java | 40 +- .../CreateTransferConfigOperationRequest.java | 176 ++ ...teWorkflowExecutionRequestParamsInner.java | 306 +++ .../sdk/model/CustomCryptoRoutingDest.java | 287 -- ...outingDest.java => CustomRoutingDest.java} | 42 +- .../DepositFundsFromLinkedDDAResponse.java | 140 + ...ingPolicySenTest.java => Destination.java} | 175 +- .../model/DisbursementAmountInstruction.java | 216 ++ .../model/DisbursementConfigOperation.java | 296 ++ .../sdk/model/DisbursementInstruction.java | 346 +++ .../model/DisbursementInstructionOutput.java | 202 ++ .../DisbursementOperationConfigParams.java | 199 ++ .../model/DisbursementOperationExecution.java | 327 +++ .../DisbursementOperationExecutionOutput.java | 163 ++ .../DisbursementOperationExecutionParams.java | 185 ++ ...erationExecutionParamsExecutionParams.java | 250 ++ .../sdk/model/DisbursementOperationInput.java | 238 ++ .../model/DisbursementOperationPreview.java | 202 ++ .../DisbursementOperationPreviewOutput.java | 165 ++ ...ationPreviewOutputInstructionSetInner.java | 259 ++ .../sdk/model/DisbursementOperationType.java | 62 + .../DisbursementPercentageInstruction.java | 217 ++ .../model/DisbursementValidationFailure.java | 262 ++ .../EditGasStationConfigurationResponse.java | 140 + .../model/ExecutionConversionOperation.java | 334 +++ .../model/ExecutionDisbursementOperation.java | 334 +++ .../sdk/model/ExecutionOperationStatus.java | 84 + .../model/ExecutionScreeningOperation.java | 298 +++ .../sdk/model/ExecutionTransferOperation.java | 333 +++ .../sdk/model/GetAPIUsersResponse.java | 159 ++ .../sdk/model/GetAuditLogsResponse.java | 244 ++ .../sdk/model/GetConsoleUsersResponse.java | 159 ++ .../model/GetMaxSpendableAmountResponse.java | 145 + .../GetWhitelistIpAddressesResponse.java | 201 ++ .../sdk/model/InternalTransferResponse.java | 139 + .../sdk/model/NetworkConnection.java | 40 +- .../sdk/model/NetworkConnectionResponse.java | 40 +- .../model/NetworkConnectionRoutingPolicy.java | 271 -- ...NetworkConnectionRoutingPolicySenTest.java | 421 --- .../NetworkConnectionRoutingPolicySignet.java | 421 --- ...workConnectionRoutingPolicySignetTest.java | 422 --- ... NetworkConnectionRoutingPolicyValue.java} | 114 +- .../sdk/model/NetworkIdResponse.java | 39 +- .../sdk/model/NetworkIdRoutingPolicy.java | 269 -- ....java => NetworkIdRoutingPolicyValue.java} | 110 +- .../sdk/model/OneTimeAddressAccount.java | 183 ++ .../sdk/model/OperationExecutionFailure.java | 200 ++ .../fireblocks/sdk/model/PreScreening.java | 139 + .../model/RedeemFundsToLinkedDDAResponse.java | 140 + .../sdk/model/RegisterNewAssetRequest.java | 223 ++ .../sdk/model/RenameVaultAccountResponse.java | 181 ++ ...ResendWebhooksByTransactionIdResponse.java | 140 + .../model/ScreeningOperationExecution.java | 252 ++ .../ScreeningOperationExecutionOutput.java | 160 ++ .../sdk/model/ScreeningOperationFailure.java | 210 ++ .../sdk/model/ScreeningOperationType.java | 62 + .../sdk/model/ScreeningValidationFailure.java | 233 ++ .../sdk/model/ScreeningVerdict.java | 374 +++ .../model/ScreeningVerdictMatchedRule.java | 199 ++ .../SetAdminQuorumThresholdResponse.java | 140 + .../SetNetworkIdRoutingPolicyRequest.java | 40 +- ...yCrypto.java => SetOtaStatusResponse.java} | 183 +- .../sdk/model/SetOtaStatusResponseOneOf.java | 139 + .../sdk/model/SetRoutingPolicyRequest.java | 40 +- .../sdk/model/TransferConfigOperation.java | 295 ++ .../model/TransferOperationConfigParams.java | 250 ++ .../sdk/model/TransferOperationExecution.java | 326 +++ .../TransferOperationExecutionOutput.java | 168 ++ .../TransferOperationExecutionParams.java | 184 ++ ...erationExecutionParamsExecutionParams.java | 257 ++ .../sdk/model/TransferOperationFailure.java | 212 ++ .../model/TransferOperationFailureData.java | 224 ++ .../sdk/model/TransferOperationPreview.java | 201 ++ .../model/TransferOperationPreviewOutput.java | 256 ++ .../sdk/model/TransferOperationType.java | 62 + .../sdk/model/TransferValidationFailure.java | 257 ++ .../com/fireblocks/sdk/model/UserRole.java | 82 + .../com/fireblocks/sdk/model/UserStatus.java | 68 + .../com/fireblocks/sdk/model/UserType.java | 64 + .../sdk/model/WorkflowConfigStatus.java | 68 + .../sdk/model/WorkflowConfigurationId.java | 139 + .../sdk/model/WorkflowExecutionOperation.java | 507 ++++ .../com/fireblocks/sdk/FireblocksTest.java | 16 - .../sdk/api/AdminQuorumApiTest.java | 44 - .../fireblocks/sdk/api/ApiUserApiTest.java | 4 +- .../fireblocks/sdk/api/AuditLogsApiTest.java | 5 +- .../sdk/api/BlockchainsAssetsApiTest.java | 18 + .../sdk/api/ConsoleUserApiTest.java | 4 +- .../sdk/api/ExchangeAccountsApiTest.java | 8 +- .../sdk/api/FiatAccountsApiTest.java | 8 +- .../sdk/api/GasStationsApiTest.java | 7 +- .../fireblocks/sdk/api/OtaBetaApiTest.java | 4 +- .../com/fireblocks/sdk/api/VaultsApiTest.java | 8 +- .../fireblocks/sdk/api/WebhooksApiTest.java | 4 +- .../sdk/api/WhitelistIpAddressesApiTest.java | 5 +- .../fireblocks/sdk/api/WorkspaceApiTest.java | 45 - .../com/fireblocks/sdk/model/APIUserTest.java | 63 + .../com/fireblocks/sdk/model/AccountTest.java | 39 + .../fireblocks/sdk/model/AccountTypeTest.java | 25 + .../fireblocks/sdk/model/AssetAmountTest.java | 39 + .../AssetBadRequestErrorResponseTest.java | 39 + .../model/AssetConflictErrorResponseTest.java | 39 + .../AssetInternalServerErrorResponseTest.java | 39 + .../model/AssetNotFoundErrorResponseTest.java | 39 + .../sdk/model/AssetResponseMetadataTest.java | 39 + .../sdk/model/AssetResponseOnchainTest.java | 57 + .../sdk/model/AssetResponseTest.java | 51 + .../sdk/model/AuditLogDataTest.java | 75 + ...ConfigConversionOperationSnapshotTest.java | 45 + ...nfigDisbursementOperationSnapshotTest.java | 46 + .../model/ConfigOperationSnapshotTest.java | 45 + .../sdk/model/ConfigOperationStatusTest.java | 25 + .../sdk/model/ConfigOperationTest.java | 57 + .../ConfigTransferOperationSnapshotTest.java | 45 + .../fireblocks/sdk/model/ConsoleUserTest.java | 75 + .../model/ConversionConfigOperationTest.java | 57 + .../ConversionOperationConfigParamsTest.java | 57 + ...onversionOperationExecutionOutputTest.java | 46 + ...ionExecutionParamsExecutionParamsTest.java | 58 + ...onversionOperationExecutionParamsTest.java | 40 + .../ConversionOperationExecutionTest.java | 57 + .../model/ConversionOperationFailureTest.java | 39 + .../ConversionOperationPreviewOutputTest.java | 51 + .../model/ConversionOperationPreviewTest.java | 45 + .../model/ConversionOperationTypeTest.java | 25 + .../ConversionValidationFailureTest.java | 39 + .../sdk/model/ConvertAssetsResponseTest.java | 33 + .../CreateConfigOperationRequestTest.java | 39 + ...eConversionConfigOperationRequestTest.java | 40 + ...isbursementConfigOperationRequestTest.java | 40 + ...ateTransferConfigOperationRequestTest.java | 40 + ...rkflowExecutionRequestParamsInnerTest.java | 40 + .../model/CustomCryptoRoutingDestTest.java | 45 - ...stTest.java => CustomRoutingDestTest.java} | 12 +- ...DepositFundsFromLinkedDDAResponseTest.java | 33 + .../fireblocks/sdk/model/DestinationTest.java | 51 + .../DisbursementAmountInstructionTest.java | 45 + .../DisbursementConfigOperationTest.java | 57 + .../DisbursementInstructionOutputTest.java | 45 + .../model/DisbursementInstructionTest.java | 51 + ...DisbursementOperationConfigParamsTest.java | 39 + ...bursementOperationExecutionOutputTest.java | 34 + ...ionExecutionParamsExecutionParamsTest.java | 46 + ...bursementOperationExecutionParamsTest.java | 40 + .../DisbursementOperationExecutionTest.java | 63 + .../model/DisbursementOperationInputTest.java | 45 + ...nPreviewOutputInstructionSetInnerTest.java | 52 + ...isbursementOperationPreviewOutputTest.java | 34 + .../DisbursementOperationPreviewTest.java | 45 + .../model/DisbursementOperationTypeTest.java | 25 + ...DisbursementPercentageInstructionTest.java | 45 + .../DisbursementValidationFailureTest.java | 39 + ...itGasStationConfigurationResponseTest.java | 34 + .../ExecutionConversionOperationTest.java | 63 + .../ExecutionDisbursementOperationTest.java | 63 + .../model/ExecutionOperationStatusTest.java | 25 + .../ExecutionScreeningOperationTest.java | 57 + .../model/ExecutionTransferOperationTest.java | 63 + .../sdk/model/GetAPIUsersResponseTest.java | 33 + .../sdk/model/GetAuditLogsResponseTest.java | 45 + .../model/GetConsoleUsersResponseTest.java | 33 + .../GetMaxSpendableAmountResponseTest.java | 33 + .../GetWhitelistIpAddressesResponseTest.java | 39 + .../model/InternalTransferResponseTest.java | 33 + ...workConnectionRoutingPolicyCryptoTest.java | 46 - ...NetworkConnectionRoutingPolicySenTest.java | 45 - ...orkConnectionRoutingPolicySenTestTest.java | 46 - ...workConnectionRoutingPolicySignetTest.java | 46 - ...ConnectionRoutingPolicySignetTestTest.java | 46 - .../NetworkConnectionRoutingPolicyTest.java | 57 - ...workConnectionRoutingPolicyValueTest.java} | 13 +- .../NetworkIdRoutingPolicySenTestTest.java | 45 - .../sdk/model/NetworkIdRoutingPolicyTest.java | 57 - ...a => NetworkIdRoutingPolicyValueTest.java} | 12 +- .../sdk/model/OneTimeAddressAccountTest.java | 39 + .../model/OperationExecutionFailureTest.java | 39 + .../sdk/model/PreScreeningTest.java | 33 + .../RedeemFundsToLinkedDDAResponseTest.java | 33 + .../model/RegisterNewAssetRequestTest.java | 45 + .../model/RenameVaultAccountResponseTest.java | 39 + ...ndWebhooksByTransactionIdResponseTest.java | 34 + ...ScreeningOperationExecutionOutputTest.java | 33 + .../ScreeningOperationExecutionTest.java | 51 + .../model/ScreeningOperationFailureTest.java | 39 + .../sdk/model/ScreeningOperationTypeTest.java | 25 + .../model/ScreeningValidationFailureTest.java | 39 + .../ScreeningVerdictMatchedRuleTest.java | 39 + .../sdk/model/ScreeningVerdictTest.java | 63 + .../SetAdminQuorumThresholdResponseTest.java | 33 + .../model/SetOtaStatusResponseOneOfTest.java | 33 + .../sdk/model/SetOtaStatusResponseTest.java | 33 + .../model/TransferConfigOperationTest.java | 57 + .../TransferOperationConfigParamsTest.java | 51 + .../TransferOperationExecutionOutputTest.java | 39 + ...ionExecutionParamsExecutionParamsTest.java | 52 + .../TransferOperationExecutionParamsTest.java | 39 + .../model/TransferOperationExecutionTest.java | 63 + .../TransferOperationFailureDataTest.java | 45 + .../model/TransferOperationFailureTest.java | 39 + .../TransferOperationPreviewOutputTest.java | 51 + .../model/TransferOperationPreviewTest.java | 45 + .../sdk/model/TransferOperationTypeTest.java | 25 + .../model/TransferValidationFailureTest.java | 39 + .../fireblocks/sdk/model/UserRoleTest.java | 25 + .../fireblocks/sdk/model/UserStatusTest.java | 25 + .../fireblocks/sdk/model/UserTypeTest.java | 25 + .../sdk/model/WorkflowConfigStatusTest.java | 25 + .../model/WorkflowConfigurationIdTest.java | 33 + .../model/WorkflowExecutionOperationTest.java | 63 + 417 files changed, 32991 insertions(+), 5611 deletions(-) create mode 100644 docs/APIUser.md create mode 100644 docs/Account.md create mode 100644 docs/AccountType.md delete mode 100644 docs/AdminQuorumApi.md create mode 100644 docs/AssetAmount.md create mode 100644 docs/AssetBadRequestErrorResponse.md create mode 100644 docs/AssetConflictErrorResponse.md create mode 100644 docs/AssetInternalServerErrorResponse.md create mode 100644 docs/AssetNotFoundErrorResponse.md create mode 100644 docs/AssetResponse.md create mode 100644 docs/AssetResponseMetadata.md create mode 100644 docs/AssetResponseOnchain.md create mode 100644 docs/AuditLogData.md create mode 100644 docs/ConfigConversionOperationSnapshot.md create mode 100644 docs/ConfigDisbursementOperationSnapshot.md create mode 100644 docs/ConfigOperation.md create mode 100644 docs/ConfigOperationSnapshot.md create mode 100644 docs/ConfigOperationStatus.md create mode 100644 docs/ConfigTransferOperationSnapshot.md create mode 100644 docs/ConsoleUser.md create mode 100644 docs/ConversionConfigOperation.md create mode 100644 docs/ConversionOperationConfigParams.md create mode 100644 docs/ConversionOperationExecution.md create mode 100644 docs/ConversionOperationExecutionOutput.md create mode 100644 docs/ConversionOperationExecutionParams.md create mode 100644 docs/ConversionOperationExecutionParamsExecutionParams.md create mode 100644 docs/ConversionOperationFailure.md create mode 100644 docs/ConversionOperationPreview.md create mode 100644 docs/ConversionOperationPreviewOutput.md create mode 100644 docs/ConversionOperationType.md create mode 100644 docs/ConversionValidationFailure.md create mode 100644 docs/ConvertAssetsResponse.md create mode 100644 docs/CreateConfigOperationRequest.md create mode 100644 docs/CreateConversionConfigOperationRequest.md create mode 100644 docs/CreateDisbursementConfigOperationRequest.md create mode 100644 docs/CreateTransferConfigOperationRequest.md create mode 100644 docs/CreateWorkflowExecutionRequestParamsInner.md delete mode 100644 docs/CustomFiatRoutingDest.md rename docs/{CustomCryptoRoutingDest.md => CustomRoutingDest.md} (63%) create mode 100644 docs/DepositFundsFromLinkedDDAResponse.md create mode 100644 docs/Destination.md create mode 100644 docs/DisbursementAmountInstruction.md create mode 100644 docs/DisbursementConfigOperation.md create mode 100644 docs/DisbursementInstruction.md create mode 100644 docs/DisbursementInstructionOutput.md create mode 100644 docs/DisbursementOperationConfigParams.md create mode 100644 docs/DisbursementOperationExecution.md create mode 100644 docs/DisbursementOperationExecutionOutput.md create mode 100644 docs/DisbursementOperationExecutionParams.md create mode 100644 docs/DisbursementOperationExecutionParamsExecutionParams.md create mode 100644 docs/DisbursementOperationInput.md create mode 100644 docs/DisbursementOperationPreview.md create mode 100644 docs/DisbursementOperationPreviewOutput.md create mode 100644 docs/DisbursementOperationPreviewOutputInstructionSetInner.md create mode 100644 docs/DisbursementOperationType.md create mode 100644 docs/DisbursementPercentageInstruction.md create mode 100644 docs/DisbursementValidationFailure.md create mode 100644 docs/EditGasStationConfigurationResponse.md create mode 100644 docs/ExecutionConversionOperation.md create mode 100644 docs/ExecutionDisbursementOperation.md create mode 100644 docs/ExecutionOperationStatus.md create mode 100644 docs/ExecutionScreeningOperation.md create mode 100644 docs/ExecutionTransferOperation.md create mode 100644 docs/GetAPIUsersResponse.md create mode 100644 docs/GetAuditLogsResponse.md create mode 100644 docs/GetConsoleUsersResponse.md create mode 100644 docs/GetMaxSpendableAmountResponse.md create mode 100644 docs/GetWhitelistIpAddressesResponse.md create mode 100644 docs/InternalTransferResponse.md delete mode 100644 docs/NetworkConnectionRoutingPolicy.md delete mode 100644 docs/NetworkConnectionRoutingPolicyCrypto.md delete mode 100644 docs/NetworkConnectionRoutingPolicySen.md delete mode 100644 docs/NetworkConnectionRoutingPolicySenTest.md delete mode 100644 docs/NetworkConnectionRoutingPolicySignet.md delete mode 100644 docs/NetworkConnectionRoutingPolicySignetTest.md create mode 100644 docs/NetworkConnectionRoutingPolicyValue.md delete mode 100644 docs/NetworkIdRoutingPolicy.md delete mode 100644 docs/NetworkIdRoutingPolicyCrypto.md delete mode 100644 docs/NetworkIdRoutingPolicySen.md delete mode 100644 docs/NetworkIdRoutingPolicySenTest.md create mode 100644 docs/NetworkIdRoutingPolicyValue.md create mode 100644 docs/OneTimeAddressAccount.md create mode 100644 docs/OperationExecutionFailure.md create mode 100644 docs/PreScreening.md create mode 100644 docs/RedeemFundsToLinkedDDAResponse.md create mode 100644 docs/RegisterNewAssetRequest.md create mode 100644 docs/RenameVaultAccountResponse.md create mode 100644 docs/ResendWebhooksByTransactionIdResponse.md create mode 100644 docs/ScreeningOperationExecution.md create mode 100644 docs/ScreeningOperationExecutionOutput.md create mode 100644 docs/ScreeningOperationFailure.md create mode 100644 docs/ScreeningOperationType.md create mode 100644 docs/ScreeningValidationFailure.md create mode 100644 docs/ScreeningVerdict.md create mode 100644 docs/ScreeningVerdictMatchedRule.md create mode 100644 docs/SetAdminQuorumThresholdResponse.md create mode 100644 docs/SetOtaStatusResponse.md create mode 100644 docs/SetOtaStatusResponseOneOf.md create mode 100644 docs/TransferConfigOperation.md create mode 100644 docs/TransferOperationConfigParams.md create mode 100644 docs/TransferOperationExecution.md create mode 100644 docs/TransferOperationExecutionOutput.md create mode 100644 docs/TransferOperationExecutionParams.md create mode 100644 docs/TransferOperationExecutionParamsExecutionParams.md create mode 100644 docs/TransferOperationFailure.md create mode 100644 docs/TransferOperationFailureData.md create mode 100644 docs/TransferOperationPreview.md create mode 100644 docs/TransferOperationPreviewOutput.md create mode 100644 docs/TransferOperationType.md create mode 100644 docs/TransferValidationFailure.md create mode 100644 docs/UserRole.md create mode 100644 docs/UserStatus.md create mode 100644 docs/UserType.md create mode 100644 docs/WorkflowConfigStatus.md create mode 100644 docs/WorkflowConfigurationId.md create mode 100644 docs/WorkflowExecutionOperation.md delete mode 100644 docs/WorkspaceApi.md delete mode 100644 src/main/java/com/fireblocks/sdk/api/AdminQuorumApi.java delete mode 100644 src/main/java/com/fireblocks/sdk/api/WorkspaceApi.java create mode 100644 src/main/java/com/fireblocks/sdk/model/APIUser.java create mode 100644 src/main/java/com/fireblocks/sdk/model/Account.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AccountType.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AssetAmount.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AssetBadRequestErrorResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AssetConflictErrorResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AssetInternalServerErrorResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AssetNotFoundErrorResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AssetResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AssetResponseMetadata.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AssetResponseOnchain.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AuditLogData.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ConfigConversionOperationSnapshot.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ConfigDisbursementOperationSnapshot.java rename src/main/java/com/fireblocks/sdk/model/{NetworkConnectionRoutingPolicyCrypto.java => ConfigOperation.java} (56%) create mode 100644 src/main/java/com/fireblocks/sdk/model/ConfigOperationSnapshot.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ConfigOperationStatus.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ConfigTransferOperationSnapshot.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ConsoleUser.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ConversionConfigOperation.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ConversionOperationConfigParams.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ConversionOperationExecution.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ConversionOperationExecutionOutput.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ConversionOperationExecutionParams.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ConversionOperationExecutionParamsExecutionParams.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ConversionOperationFailure.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ConversionOperationPreview.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ConversionOperationPreviewOutput.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ConversionOperationType.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ConversionValidationFailure.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ConvertAssetsResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CreateConfigOperationRequest.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CreateConversionConfigOperationRequest.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CreateDisbursementConfigOperationRequest.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CreateTransferConfigOperationRequest.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CreateWorkflowExecutionRequestParamsInner.java delete mode 100644 src/main/java/com/fireblocks/sdk/model/CustomCryptoRoutingDest.java rename src/main/java/com/fireblocks/sdk/model/{CustomFiatRoutingDest.java => CustomRoutingDest.java} (87%) create mode 100644 src/main/java/com/fireblocks/sdk/model/DepositFundsFromLinkedDDAResponse.java rename src/main/java/com/fireblocks/sdk/model/{NetworkIdRoutingPolicySenTest.java => Destination.java} (55%) create mode 100644 src/main/java/com/fireblocks/sdk/model/DisbursementAmountInstruction.java create mode 100644 src/main/java/com/fireblocks/sdk/model/DisbursementConfigOperation.java create mode 100644 src/main/java/com/fireblocks/sdk/model/DisbursementInstruction.java create mode 100644 src/main/java/com/fireblocks/sdk/model/DisbursementInstructionOutput.java create mode 100644 src/main/java/com/fireblocks/sdk/model/DisbursementOperationConfigParams.java create mode 100644 src/main/java/com/fireblocks/sdk/model/DisbursementOperationExecution.java create mode 100644 src/main/java/com/fireblocks/sdk/model/DisbursementOperationExecutionOutput.java create mode 100644 src/main/java/com/fireblocks/sdk/model/DisbursementOperationExecutionParams.java create mode 100644 src/main/java/com/fireblocks/sdk/model/DisbursementOperationExecutionParamsExecutionParams.java create mode 100644 src/main/java/com/fireblocks/sdk/model/DisbursementOperationInput.java create mode 100644 src/main/java/com/fireblocks/sdk/model/DisbursementOperationPreview.java create mode 100644 src/main/java/com/fireblocks/sdk/model/DisbursementOperationPreviewOutput.java create mode 100644 src/main/java/com/fireblocks/sdk/model/DisbursementOperationPreviewOutputInstructionSetInner.java create mode 100644 src/main/java/com/fireblocks/sdk/model/DisbursementOperationType.java create mode 100644 src/main/java/com/fireblocks/sdk/model/DisbursementPercentageInstruction.java create mode 100644 src/main/java/com/fireblocks/sdk/model/DisbursementValidationFailure.java create mode 100644 src/main/java/com/fireblocks/sdk/model/EditGasStationConfigurationResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ExecutionConversionOperation.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ExecutionDisbursementOperation.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ExecutionOperationStatus.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ExecutionScreeningOperation.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ExecutionTransferOperation.java create mode 100644 src/main/java/com/fireblocks/sdk/model/GetAPIUsersResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/GetAuditLogsResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/GetConsoleUsersResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/GetMaxSpendableAmountResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/GetWhitelistIpAddressesResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/InternalTransferResponse.java delete mode 100644 src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicy.java delete mode 100644 src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySenTest.java delete mode 100644 src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySignet.java delete mode 100644 src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySignetTest.java rename src/main/java/com/fireblocks/sdk/model/{NetworkConnectionRoutingPolicySen.java => NetworkConnectionRoutingPolicyValue.java} (80%) delete mode 100644 src/main/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicy.java rename src/main/java/com/fireblocks/sdk/model/{NetworkIdRoutingPolicySen.java => NetworkIdRoutingPolicyValue.java} (73%) create mode 100644 src/main/java/com/fireblocks/sdk/model/OneTimeAddressAccount.java create mode 100644 src/main/java/com/fireblocks/sdk/model/OperationExecutionFailure.java create mode 100644 src/main/java/com/fireblocks/sdk/model/PreScreening.java create mode 100644 src/main/java/com/fireblocks/sdk/model/RedeemFundsToLinkedDDAResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/RegisterNewAssetRequest.java create mode 100644 src/main/java/com/fireblocks/sdk/model/RenameVaultAccountResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ResendWebhooksByTransactionIdResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ScreeningOperationExecution.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ScreeningOperationExecutionOutput.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ScreeningOperationFailure.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ScreeningOperationType.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ScreeningValidationFailure.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ScreeningVerdict.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ScreeningVerdictMatchedRule.java create mode 100644 src/main/java/com/fireblocks/sdk/model/SetAdminQuorumThresholdResponse.java rename src/main/java/com/fireblocks/sdk/model/{NetworkIdRoutingPolicyCrypto.java => SetOtaStatusResponse.java} (53%) create mode 100644 src/main/java/com/fireblocks/sdk/model/SetOtaStatusResponseOneOf.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TransferConfigOperation.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TransferOperationConfigParams.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TransferOperationExecution.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TransferOperationExecutionOutput.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TransferOperationExecutionParams.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TransferOperationExecutionParamsExecutionParams.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TransferOperationFailure.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TransferOperationFailureData.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TransferOperationPreview.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TransferOperationPreviewOutput.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TransferOperationType.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TransferValidationFailure.java create mode 100644 src/main/java/com/fireblocks/sdk/model/UserRole.java create mode 100644 src/main/java/com/fireblocks/sdk/model/UserStatus.java create mode 100644 src/main/java/com/fireblocks/sdk/model/UserType.java create mode 100644 src/main/java/com/fireblocks/sdk/model/WorkflowConfigStatus.java create mode 100644 src/main/java/com/fireblocks/sdk/model/WorkflowConfigurationId.java create mode 100644 src/main/java/com/fireblocks/sdk/model/WorkflowExecutionOperation.java delete mode 100644 src/test/java/com/fireblocks/sdk/api/AdminQuorumApiTest.java delete mode 100644 src/test/java/com/fireblocks/sdk/api/WorkspaceApiTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/APIUserTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AccountTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AccountTypeTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AssetAmountTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AssetBadRequestErrorResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AssetConflictErrorResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AssetInternalServerErrorResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AssetNotFoundErrorResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AssetResponseMetadataTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AssetResponseOnchainTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AssetResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AuditLogDataTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ConfigConversionOperationSnapshotTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ConfigDisbursementOperationSnapshotTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ConfigOperationSnapshotTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ConfigOperationStatusTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ConfigOperationTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ConfigTransferOperationSnapshotTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ConsoleUserTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ConversionConfigOperationTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ConversionOperationConfigParamsTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ConversionOperationExecutionOutputTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ConversionOperationExecutionParamsExecutionParamsTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ConversionOperationExecutionParamsTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ConversionOperationExecutionTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ConversionOperationFailureTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ConversionOperationPreviewOutputTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ConversionOperationPreviewTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ConversionOperationTypeTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ConversionValidationFailureTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ConvertAssetsResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CreateConfigOperationRequestTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CreateConversionConfigOperationRequestTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CreateDisbursementConfigOperationRequestTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CreateTransferConfigOperationRequestTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CreateWorkflowExecutionRequestParamsInnerTest.java delete mode 100644 src/test/java/com/fireblocks/sdk/model/CustomCryptoRoutingDestTest.java rename src/test/java/com/fireblocks/sdk/model/{CustomFiatRoutingDestTest.java => CustomRoutingDestTest.java} (72%) create mode 100644 src/test/java/com/fireblocks/sdk/model/DepositFundsFromLinkedDDAResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DestinationTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DisbursementAmountInstructionTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DisbursementConfigOperationTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DisbursementInstructionOutputTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DisbursementInstructionTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DisbursementOperationConfigParamsTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DisbursementOperationExecutionOutputTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DisbursementOperationExecutionParamsExecutionParamsTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DisbursementOperationExecutionParamsTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DisbursementOperationExecutionTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DisbursementOperationInputTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DisbursementOperationPreviewOutputInstructionSetInnerTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DisbursementOperationPreviewOutputTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DisbursementOperationPreviewTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DisbursementOperationTypeTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DisbursementPercentageInstructionTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DisbursementValidationFailureTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/EditGasStationConfigurationResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ExecutionConversionOperationTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ExecutionDisbursementOperationTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ExecutionOperationStatusTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ExecutionScreeningOperationTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ExecutionTransferOperationTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/GetAPIUsersResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/GetAuditLogsResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/GetConsoleUsersResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/GetMaxSpendableAmountResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/GetWhitelistIpAddressesResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/InternalTransferResponseTest.java delete mode 100644 src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicyCryptoTest.java delete mode 100644 src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySenTest.java delete mode 100644 src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySenTestTest.java delete mode 100644 src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySignetTest.java delete mode 100644 src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySignetTestTest.java delete mode 100644 src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicyTest.java rename src/test/java/com/fireblocks/sdk/model/{NetworkIdRoutingPolicyCryptoTest.java => NetworkConnectionRoutingPolicyValueTest.java} (66%) delete mode 100644 src/test/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicySenTestTest.java delete mode 100644 src/test/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicyTest.java rename src/test/java/com/fireblocks/sdk/model/{NetworkIdRoutingPolicySenTest.java => NetworkIdRoutingPolicyValueTest.java} (70%) create mode 100644 src/test/java/com/fireblocks/sdk/model/OneTimeAddressAccountTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/OperationExecutionFailureTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/PreScreeningTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/RedeemFundsToLinkedDDAResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/RegisterNewAssetRequestTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/RenameVaultAccountResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ResendWebhooksByTransactionIdResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ScreeningOperationExecutionOutputTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ScreeningOperationExecutionTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ScreeningOperationFailureTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ScreeningOperationTypeTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ScreeningValidationFailureTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ScreeningVerdictMatchedRuleTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ScreeningVerdictTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/SetAdminQuorumThresholdResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/SetOtaStatusResponseOneOfTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/SetOtaStatusResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TransferConfigOperationTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TransferOperationConfigParamsTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TransferOperationExecutionOutputTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TransferOperationExecutionParamsExecutionParamsTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TransferOperationExecutionParamsTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TransferOperationExecutionTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TransferOperationFailureDataTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TransferOperationFailureTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TransferOperationPreviewOutputTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TransferOperationPreviewTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TransferOperationTypeTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TransferValidationFailureTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/UserRoleTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/UserStatusTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/UserTypeTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/WorkflowConfigStatusTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/WorkflowConfigurationIdTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/WorkflowExecutionOperationTest.java diff --git a/README.md b/README.md index e7c95dd..690bb93 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Add this dependency to your project's POM: com.fireblocks.sdk fireblocks-sdk - 0.0.1-beta + 1.0.0 compile ``` @@ -45,7 +45,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:0.0.1-beta" +compile "com.fireblocks.sdk:fireblocks-sdk:1.0.0" ``` ### Others @@ -58,17 +58,45 @@ mvn clean package Then manually install the following JARs: -- `target/fireblocks-sdk-0.0.1-beta.jar` +- `target/fireblocks-sdk-1.0.0.jar` - `target/lib/*.jar` ## Getting Started ### Initiate Fireblocks Client +You can initialize the Fireblocks SDK in two ways, either by setting environment variables or providing the parameters directly: + +

Using Environment Variables
+ You can initialize the SDK using environment variables from your .env file or by setting them programmatically:

+ +use bash commands to set environment variables: +```bash +export FIREBLOCKS_BASE_PATH="https://sandbox-api.fireblocks.io/v1" +export FIREBLOCKS_API_KEY="my-api-key" +export FIREBLOCKS_SECRET_KEY="my-secret-key" +``` + +execute the following java code: ```java +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; + +ConfigurationOptions configurationOptions = new ConfigurationOptions(); +Fireblocks fireblocks = new Fireblocks(configurationOptions); +``` + +

Providing Local Variables
+ Alternatively, you can directly pass the required parameters when initializing the Fireblocks API instance:

+ +```java +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; + ConfigurationOptions configurationOptions = new ConfigurationOptions() - .basePath(BASE_PATH) - .apiKey(API_KEY) - .secretKey(SECRET_KEY); + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); ``` @@ -116,13 +144,13 @@ All URIs are relative to *https://api.fireblocks.io/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AdminQuorumApi* | [**setAdminQuorumThreshold**](docs/AdminQuorumApi.md#setAdminQuorumThreshold) | **PUT** /admin_quorum | Update admin quorum threshold *ApiUserApi* | [**createApiUser**](docs/ApiUserApi.md#createApiUser) | **POST** /management/api_users | create api user *ApiUserApi* | [**getApiUsers**](docs/ApiUserApi.md#getApiUsers) | **GET** /management/api_users | get api users *AssetsApi* | [**createAssetsBulk**](docs/AssetsApi.md#createAssetsBulk) | **POST** /vault/assets/bulk | Bulk creation of wallets *AuditLogsApi* | [**getAuditLogs**](docs/AuditLogsApi.md#getAuditLogs) | **GET** /management/audit_logs | Get audit logs *AuditLogsApi* | [**getAudits**](docs/AuditLogsApi.md#getAudits) | **GET** /audits | Get audit logs *BlockchainsAssetsApi* | [**getSupportedAssets**](docs/BlockchainsAssetsApi.md#getSupportedAssets) | **GET** /supported_assets | List all asset types supported by Fireblocks +*BlockchainsAssetsApi* | [**registerNewAsset**](docs/BlockchainsAssetsApi.md#registerNewAsset) | **POST** /assets | Register an asset *ComplianceApi* | [**getAmlPostScreeningPolicy**](docs/ComplianceApi.md#getAmlPostScreeningPolicy) | **GET** /screening/aml/post_screening_policy | AML - View Post-Screening Policy *ComplianceApi* | [**getAmlScreeningPolicy**](docs/ComplianceApi.md#getAmlScreeningPolicy) | **GET** /screening/aml/screening_policy | AML - View Screening Policy *ComplianceApi* | [**getPostScreeningPolicy**](docs/ComplianceApi.md#getPostScreeningPolicy) | **GET** /screening/travel_rule/post_screening_policy | Travel Rule - View Post-Screening Policy @@ -296,12 +324,14 @@ Class | Method | HTTP request | Description *WebhooksApi* | [**resendTransactionWebhooks**](docs/WebhooksApi.md#resendTransactionWebhooks) | **POST** /webhooks/resend/{txId} | Resend failed webhooks for a transaction by ID *WebhooksApi* | [**resendWebhooks**](docs/WebhooksApi.md#resendWebhooks) | **POST** /webhooks/resend | Resend failed webhooks *WhitelistIpAddressesApi* | [**getWhitelistIpAddresses**](docs/WhitelistIpAddressesApi.md#getWhitelistIpAddresses) | **GET** /management/api_users/{userId}/whitelist_ip_addresses | gets ip addresses -*WorkspaceApi* | [**freezeWorkspace**](docs/WorkspaceApi.md#freezeWorkspace) | **POST** /workspace/freeze | Freeze Workspace *WorkspaceStatusBetaApi* | [**getWorkspaceStatus**](docs/WorkspaceStatusBetaApi.md#getWorkspaceStatus) | **GET** /management/workspace_status | Returns current workspace status ## Documentation for Models + - [APIUser](docs/APIUser.md) + - [Account](docs/Account.md) + - [AccountType](docs/AccountType.md) - [AddAssetToExternalWalletRequest](docs/AddAssetToExternalWalletRequest.md) - [AddAssetToExternalWalletRequestOneOf](docs/AddAssetToExternalWalletRequestOneOf.md) - [AddAssetToExternalWalletRequestOneOf1](docs/AddAssetToExternalWalletRequestOneOf1.md) @@ -317,8 +347,17 @@ Class | Method | HTTP request | Description - [AmountAggregationTimePeriodMethod](docs/AmountAggregationTimePeriodMethod.md) - [AmountAndChainDescriptor](docs/AmountAndChainDescriptor.md) - [AmountInfo](docs/AmountInfo.md) + - [AssetAmount](docs/AssetAmount.md) + - [AssetBadRequestErrorResponse](docs/AssetBadRequestErrorResponse.md) + - [AssetConflictErrorResponse](docs/AssetConflictErrorResponse.md) + - [AssetInternalServerErrorResponse](docs/AssetInternalServerErrorResponse.md) + - [AssetNotFoundErrorResponse](docs/AssetNotFoundErrorResponse.md) + - [AssetResponse](docs/AssetResponse.md) + - [AssetResponseMetadata](docs/AssetResponseMetadata.md) + - [AssetResponseOnchain](docs/AssetResponseOnchain.md) - [AssetTypeResponse](docs/AssetTypeResponse.md) - [AssetWallet](docs/AssetWallet.md) + - [AuditLogData](docs/AuditLogData.md) - [AuthorizationGroups](docs/AuthorizationGroups.md) - [AuthorizationInfo](docs/AuthorizationInfo.md) - [BlockInfo](docs/BlockInfo.md) @@ -328,16 +367,38 @@ Class | Method | HTTP request | Description - [ComplianceResult](docs/ComplianceResult.md) - [ComplianceScreeningResult](docs/ComplianceScreeningResult.md) - [ConfigChangeRequestStatus](docs/ConfigChangeRequestStatus.md) + - [ConfigConversionOperationSnapshot](docs/ConfigConversionOperationSnapshot.md) + - [ConfigDisbursementOperationSnapshot](docs/ConfigDisbursementOperationSnapshot.md) + - [ConfigOperation](docs/ConfigOperation.md) + - [ConfigOperationSnapshot](docs/ConfigOperationSnapshot.md) + - [ConfigOperationStatus](docs/ConfigOperationStatus.md) + - [ConfigTransferOperationSnapshot](docs/ConfigTransferOperationSnapshot.md) + - [ConsoleUser](docs/ConsoleUser.md) + - [ConversionConfigOperation](docs/ConversionConfigOperation.md) + - [ConversionOperationConfigParams](docs/ConversionOperationConfigParams.md) + - [ConversionOperationExecution](docs/ConversionOperationExecution.md) + - [ConversionOperationExecutionOutput](docs/ConversionOperationExecutionOutput.md) + - [ConversionOperationExecutionParams](docs/ConversionOperationExecutionParams.md) + - [ConversionOperationExecutionParamsExecutionParams](docs/ConversionOperationExecutionParamsExecutionParams.md) + - [ConversionOperationFailure](docs/ConversionOperationFailure.md) + - [ConversionOperationPreview](docs/ConversionOperationPreview.md) + - [ConversionOperationPreviewOutput](docs/ConversionOperationPreviewOutput.md) + - [ConversionOperationType](docs/ConversionOperationType.md) + - [ConversionValidationFailure](docs/ConversionValidationFailure.md) - [ConvertAssetsRequest](docs/ConvertAssetsRequest.md) + - [ConvertAssetsResponse](docs/ConvertAssetsResponse.md) - [CreateAPIUser](docs/CreateAPIUser.md) - [CreateAddressRequest](docs/CreateAddressRequest.md) - [CreateAddressResponse](docs/CreateAddressResponse.md) - [CreateAssetsBulkRequest](docs/CreateAssetsBulkRequest.md) - [CreateAssetsRequest](docs/CreateAssetsRequest.md) + - [CreateConfigOperationRequest](docs/CreateConfigOperationRequest.md) - [CreateConnectionRequest](docs/CreateConnectionRequest.md) - [CreateConnectionResponse](docs/CreateConnectionResponse.md) - [CreateConsoleUser](docs/CreateConsoleUser.md) - [CreateContractRequest](docs/CreateContractRequest.md) + - [CreateConversionConfigOperationRequest](docs/CreateConversionConfigOperationRequest.md) + - [CreateDisbursementConfigOperationRequest](docs/CreateDisbursementConfigOperationRequest.md) - [CreateInternalTransferRequest](docs/CreateInternalTransferRequest.md) - [CreateInternalWalletAssetRequest](docs/CreateInternalWalletAssetRequest.md) - [CreateMultipleAccountsRequest](docs/CreateMultipleAccountsRequest.md) @@ -346,22 +407,42 @@ Class | Method | HTTP request | Description - [CreatePayoutRequest](docs/CreatePayoutRequest.md) - [CreateRequest](docs/CreateRequest.md) - [CreateTransactionResponse](docs/CreateTransactionResponse.md) + - [CreateTransferConfigOperationRequest](docs/CreateTransferConfigOperationRequest.md) - [CreateUserGroupResponse](docs/CreateUserGroupResponse.md) - [CreateVaultAccountRequest](docs/CreateVaultAccountRequest.md) - [CreateVaultAssetResponse](docs/CreateVaultAssetResponse.md) - [CreateWalletRequest](docs/CreateWalletRequest.md) - - [CustomCryptoRoutingDest](docs/CustomCryptoRoutingDest.md) - - [CustomFiatRoutingDest](docs/CustomFiatRoutingDest.md) + - [CreateWorkflowExecutionRequestParamsInner](docs/CreateWorkflowExecutionRequestParamsInner.md) + - [CustomRoutingDest](docs/CustomRoutingDest.md) - [DefaultNetworkRoutingDest](docs/DefaultNetworkRoutingDest.md) - [DelegationDto](docs/DelegationDto.md) - [DelegationSummaryDto](docs/DelegationSummaryDto.md) + - [DepositFundsFromLinkedDDAResponse](docs/DepositFundsFromLinkedDDAResponse.md) + - [Destination](docs/Destination.md) - [DestinationTransferPeerPath](docs/DestinationTransferPeerPath.md) - [DestinationTransferPeerPathResponse](docs/DestinationTransferPeerPathResponse.md) + - [DisbursementAmountInstruction](docs/DisbursementAmountInstruction.md) + - [DisbursementConfigOperation](docs/DisbursementConfigOperation.md) + - [DisbursementInstruction](docs/DisbursementInstruction.md) + - [DisbursementInstructionOutput](docs/DisbursementInstructionOutput.md) + - [DisbursementOperationConfigParams](docs/DisbursementOperationConfigParams.md) + - [DisbursementOperationExecution](docs/DisbursementOperationExecution.md) + - [DisbursementOperationExecutionOutput](docs/DisbursementOperationExecutionOutput.md) + - [DisbursementOperationExecutionParams](docs/DisbursementOperationExecutionParams.md) + - [DisbursementOperationExecutionParamsExecutionParams](docs/DisbursementOperationExecutionParamsExecutionParams.md) + - [DisbursementOperationInput](docs/DisbursementOperationInput.md) + - [DisbursementOperationPreview](docs/DisbursementOperationPreview.md) + - [DisbursementOperationPreviewOutput](docs/DisbursementOperationPreviewOutput.md) + - [DisbursementOperationPreviewOutputInstructionSetInner](docs/DisbursementOperationPreviewOutputInstructionSetInner.md) + - [DisbursementOperationType](docs/DisbursementOperationType.md) + - [DisbursementPercentageInstruction](docs/DisbursementPercentageInstruction.md) + - [DisbursementValidationFailure](docs/DisbursementValidationFailure.md) - [DispatchPayoutResponse](docs/DispatchPayoutResponse.md) - [DraftResponse](docs/DraftResponse.md) - [DraftReviewAndValidationResponse](docs/DraftReviewAndValidationResponse.md) - [DropTransactionRequest](docs/DropTransactionRequest.md) - [DropTransactionResponse](docs/DropTransactionResponse.md) + - [EditGasStationConfigurationResponse](docs/EditGasStationConfigurationResponse.md) - [ErrorResponse](docs/ErrorResponse.md) - [ErrorResponseError](docs/ErrorResponseError.md) - [ErrorSchema](docs/ErrorSchema.md) @@ -376,6 +457,11 @@ Class | Method | HTTP request | Description - [ExchangeType](docs/ExchangeType.md) - [ExecuteActionRequest](docs/ExecuteActionRequest.md) - [ExecuteActionResponse](docs/ExecuteActionResponse.md) + - [ExecutionConversionOperation](docs/ExecutionConversionOperation.md) + - [ExecutionDisbursementOperation](docs/ExecutionDisbursementOperation.md) + - [ExecutionOperationStatus](docs/ExecutionOperationStatus.md) + - [ExecutionScreeningOperation](docs/ExecutionScreeningOperation.md) + - [ExecutionTransferOperation](docs/ExecutionTransferOperation.md) - [ExternalWalletAsset](docs/ExternalWalletAsset.md) - [FeeInfo](docs/FeeInfo.md) - [FiatAccount](docs/FiatAccount.md) @@ -386,14 +472,20 @@ Class | Method | HTTP request | Description - [GasStationConfiguration](docs/GasStationConfiguration.md) - [GasStationConfigurationResponse](docs/GasStationConfigurationResponse.md) - [GasStationPropertiesResponse](docs/GasStationPropertiesResponse.md) + - [GetAPIUsersResponse](docs/GetAPIUsersResponse.md) + - [GetAuditLogsResponse](docs/GetAuditLogsResponse.md) - [GetAuditLogsResponseDTO](docs/GetAuditLogsResponseDTO.md) - [GetConnectionsResponse](docs/GetConnectionsResponse.md) + - [GetConsoleUsersResponse](docs/GetConsoleUsersResponse.md) - [GetFilterParameter](docs/GetFilterParameter.md) + - [GetMaxSpendableAmountResponse](docs/GetMaxSpendableAmountResponse.md) - [GetOtaStatus200Response](docs/GetOtaStatus200Response.md) - [GetOwnershipTokens200Response](docs/GetOwnershipTokens200Response.md) - [GetTransactionOperation](docs/GetTransactionOperation.md) + - [GetWhitelistIpAddressesResponse](docs/GetWhitelistIpAddressesResponse.md) - [GetWorkspaceStatus200Response](docs/GetWorkspaceStatus200Response.md) - [InstructionAmount](docs/InstructionAmount.md) + - [InternalTransferResponse](docs/InternalTransferResponse.md) - [Job](docs/Job.md) - [JobCreated](docs/JobCreated.md) - [ListOwnedCollections200Response](docs/ListOwnedCollections200Response.md) @@ -402,23 +494,17 @@ Class | Method | HTTP request | Description - [NetworkChannel](docs/NetworkChannel.md) - [NetworkConnection](docs/NetworkConnection.md) - [NetworkConnectionResponse](docs/NetworkConnectionResponse.md) - - [NetworkConnectionRoutingPolicy](docs/NetworkConnectionRoutingPolicy.md) - - [NetworkConnectionRoutingPolicyCrypto](docs/NetworkConnectionRoutingPolicyCrypto.md) - - [NetworkConnectionRoutingPolicySen](docs/NetworkConnectionRoutingPolicySen.md) - - [NetworkConnectionRoutingPolicySenTest](docs/NetworkConnectionRoutingPolicySenTest.md) - - [NetworkConnectionRoutingPolicySignet](docs/NetworkConnectionRoutingPolicySignet.md) - - [NetworkConnectionRoutingPolicySignetTest](docs/NetworkConnectionRoutingPolicySignetTest.md) + - [NetworkConnectionRoutingPolicyValue](docs/NetworkConnectionRoutingPolicyValue.md) - [NetworkConnectionStatus](docs/NetworkConnectionStatus.md) - [NetworkFee](docs/NetworkFee.md) - [NetworkId](docs/NetworkId.md) - [NetworkIdResponse](docs/NetworkIdResponse.md) - - [NetworkIdRoutingPolicy](docs/NetworkIdRoutingPolicy.md) - - [NetworkIdRoutingPolicyCrypto](docs/NetworkIdRoutingPolicyCrypto.md) - - [NetworkIdRoutingPolicySen](docs/NetworkIdRoutingPolicySen.md) - - [NetworkIdRoutingPolicySenTest](docs/NetworkIdRoutingPolicySenTest.md) + - [NetworkIdRoutingPolicyValue](docs/NetworkIdRoutingPolicyValue.md) - [NetworkRecord](docs/NetworkRecord.md) - [NoneNetworkRoutingDest](docs/NoneNetworkRoutingDest.md) - [OneTimeAddress](docs/OneTimeAddress.md) + - [OneTimeAddressAccount](docs/OneTimeAddressAccount.md) + - [OperationExecutionFailure](docs/OperationExecutionFailure.md) - [PaginatedAddressResponse](docs/PaginatedAddressResponse.md) - [PaginatedAddressResponsePaging](docs/PaginatedAddressResponsePaging.md) - [PaginatedAssetWalletResponse](docs/PaginatedAssetWalletResponse.md) @@ -459,24 +545,37 @@ Class | Method | HTTP request | Description - [PolicySrcOrDestType](docs/PolicySrcOrDestType.md) - [PolicyStatus](docs/PolicyStatus.md) - [PolicyValidation](docs/PolicyValidation.md) + - [PreScreening](docs/PreScreening.md) - [ProviderDto](docs/ProviderDto.md) - [PublicKeyInformation](docs/PublicKeyInformation.md) - [PublishDraftRequest](docs/PublishDraftRequest.md) - [PublishResult](docs/PublishResult.md) + - [RedeemFundsToLinkedDDAResponse](docs/RedeemFundsToLinkedDDAResponse.md) + - [RegisterNewAssetRequest](docs/RegisterNewAssetRequest.md) - [RelatedTransactionDto](docs/RelatedTransactionDto.md) - [RemoveCollateralRequestBody](docs/RemoveCollateralRequestBody.md) + - [RenameVaultAccountResponse](docs/RenameVaultAccountResponse.md) - [ResendTransactionWebhooksRequest](docs/ResendTransactionWebhooksRequest.md) + - [ResendWebhooksByTransactionIdResponse](docs/ResendWebhooksByTransactionIdResponse.md) - [ResendWebhooksResponse](docs/ResendWebhooksResponse.md) - [RespondToConnectionRequest](docs/RespondToConnectionRequest.md) - [RewardInfo](docs/RewardInfo.md) - [RewardsInfo](docs/RewardsInfo.md) - [ScreeningConfigurationsRequest](docs/ScreeningConfigurationsRequest.md) + - [ScreeningOperationExecution](docs/ScreeningOperationExecution.md) + - [ScreeningOperationExecutionOutput](docs/ScreeningOperationExecutionOutput.md) + - [ScreeningOperationFailure](docs/ScreeningOperationFailure.md) + - [ScreeningOperationType](docs/ScreeningOperationType.md) - [ScreeningPolicyResponse](docs/ScreeningPolicyResponse.md) - [ScreeningProviderRulesConfigurationResponse](docs/ScreeningProviderRulesConfigurationResponse.md) - [ScreeningUpdateConfigurationsRequest](docs/ScreeningUpdateConfigurationsRequest.md) + - [ScreeningValidationFailure](docs/ScreeningValidationFailure.md) + - [ScreeningVerdict](docs/ScreeningVerdict.md) + - [ScreeningVerdictMatchedRule](docs/ScreeningVerdictMatchedRule.md) - [SessionDTO](docs/SessionDTO.md) - [SessionMetadata](docs/SessionMetadata.md) - [SetAdminQuorumThresholdRequest](docs/SetAdminQuorumThresholdRequest.md) + - [SetAdminQuorumThresholdResponse](docs/SetAdminQuorumThresholdResponse.md) - [SetAutoFuelRequest](docs/SetAutoFuelRequest.md) - [SetConfirmationsThresholdRequest](docs/SetConfirmationsThresholdRequest.md) - [SetConfirmationsThresholdResponse](docs/SetConfirmationsThresholdResponse.md) @@ -487,6 +586,8 @@ Class | Method | HTTP request | Description - [SetNetworkIdResponse](docs/SetNetworkIdResponse.md) - [SetNetworkIdRoutingPolicyRequest](docs/SetNetworkIdRoutingPolicyRequest.md) - [SetOtaStatusRequest](docs/SetOtaStatusRequest.md) + - [SetOtaStatusResponse](docs/SetOtaStatusResponse.md) + - [SetOtaStatusResponseOneOf](docs/SetOtaStatusResponseOneOf.md) - [SetRoutingPolicy200Response](docs/SetRoutingPolicy200Response.md) - [SetRoutingPolicyRequest](docs/SetRoutingPolicyRequest.md) - [SettlementRequestBody](docs/SettlementRequestBody.md) @@ -546,8 +647,20 @@ Class | Method | HTTP request | Description - [TransactionResponse](docs/TransactionResponse.md) - [TransactionResponseContractCallDecodedData](docs/TransactionResponseContractCallDecodedData.md) - [TransactionResponseDestination](docs/TransactionResponseDestination.md) + - [TransferConfigOperation](docs/TransferConfigOperation.md) + - [TransferOperationConfigParams](docs/TransferOperationConfigParams.md) + - [TransferOperationExecution](docs/TransferOperationExecution.md) + - [TransferOperationExecutionOutput](docs/TransferOperationExecutionOutput.md) + - [TransferOperationExecutionParams](docs/TransferOperationExecutionParams.md) + - [TransferOperationExecutionParamsExecutionParams](docs/TransferOperationExecutionParamsExecutionParams.md) + - [TransferOperationFailure](docs/TransferOperationFailure.md) + - [TransferOperationFailureData](docs/TransferOperationFailureData.md) + - [TransferOperationPreview](docs/TransferOperationPreview.md) + - [TransferOperationPreviewOutput](docs/TransferOperationPreviewOutput.md) + - [TransferOperationType](docs/TransferOperationType.md) - [TransferPeerPathSubType](docs/TransferPeerPathSubType.md) - [TransferPeerPathType](docs/TransferPeerPathType.md) + - [TransferValidationFailure](docs/TransferValidationFailure.md) - [TravelRuleAddress](docs/TravelRuleAddress.md) - [TravelRuleCreateTransactionRequest](docs/TravelRuleCreateTransactionRequest.md) - [TravelRuleGetAllVASPsResponse](docs/TravelRuleGetAllVASPsResponse.md) @@ -575,6 +688,9 @@ Class | Method | HTTP request | Description - [UserGroupResponse](docs/UserGroupResponse.md) - [UserGroupUpdateRequest](docs/UserGroupUpdateRequest.md) - [UserResponse](docs/UserResponse.md) + - [UserRole](docs/UserRole.md) + - [UserStatus](docs/UserStatus.md) + - [UserType](docs/UserType.md) - [ValidateAddressResponse](docs/ValidateAddressResponse.md) - [ValidatorDto](docs/ValidatorDto.md) - [VaultAccount](docs/VaultAccount.md) @@ -586,6 +702,9 @@ Class | Method | HTTP request | Description - [WalletAsset](docs/WalletAsset.md) - [WalletAssetAdditionalInfo](docs/WalletAssetAdditionalInfo.md) - [WithdrawRequestDto](docs/WithdrawRequestDto.md) + - [WorkflowConfigStatus](docs/WorkflowConfigStatus.md) + - [WorkflowConfigurationId](docs/WorkflowConfigurationId.md) + - [WorkflowExecutionOperation](docs/WorkflowExecutionOperation.md) ## Author diff --git a/api/openapi.yaml b/api/openapi.yaml index 99b8e18..8e97804 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -353,6 +353,10 @@ paths: required: true responses: "201": + content: + application/json: + schema: + $ref: '#/components/schemas/RenameVaultAccountResponse' description: OK headers: X-Request-ID: @@ -1220,6 +1224,10 @@ paths: style: form responses: "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetMaxSpendableAmountResponse' description: OK headers: X-Request-ID: @@ -1847,7 +1855,7 @@ paths: type: string style: simple responses: - "200": + "204": description: indicates that the workspace is now frozen headers: X-Request-ID: @@ -1864,6 +1872,7 @@ paths: summary: Freeze Workspace tags: - Workspace + x-internal: true x-accepts: application/json /exchange_accounts: get: @@ -2043,6 +2052,10 @@ paths: $ref: '#/components/schemas/CreateInternalTransferRequest' responses: "201": + content: + application/json: + schema: + $ref: '#/components/schemas/InternalTransferResponse' description: Transfer succeeded headers: X-Request-ID: @@ -2095,6 +2108,10 @@ paths: $ref: '#/components/schemas/ConvertAssetsRequest' responses: "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ConvertAssetsResponse' description: Conversion successful headers: X-Request-ID: @@ -2280,6 +2297,10 @@ paths: $ref: '#/components/schemas/Funds' responses: "201": + content: + application/json: + schema: + $ref: '#/components/schemas/RedeemFundsToLinkedDDAResponse' description: Transfer succeeded headers: X-Request-ID: @@ -2338,6 +2359,10 @@ paths: $ref: '#/components/schemas/Funds' responses: "201": + content: + application/json: + schema: + $ref: '#/components/schemas/DepositFundsFromLinkedDDAResponse' description: Transfer succeeded headers: X-Request-ID: @@ -2561,12 +2586,6 @@ paths: name: assetType required: true schema: - enum: - - CRYPTO - - SIGNET - - SEN - - SIGNET_TEST - - SEN_TEST type: string style: simple responses: @@ -4230,6 +4249,81 @@ paths: code: const supportedAssets = await fireblocks.getSupportedAssets(); name: Fireblocks SDK Javascript example x-accepts: application/json + /assets: + post: + description: Register a new asset to a workspace and return the newly created + asset's details. Currently supported for EVM based chains only. + operationId: registerNewAsset + 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/RegisterNewAssetRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AssetResponse' + description: A new asset has been created successfully + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AssetBadRequestErrorResponse' + description: | + - Listing an asset on the requested blockchain is not supported. Error code: 1000 + + - The asset address is invalid. Error code: 1004 + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AssetNotFoundErrorResponse' + description: | + - Invalid address, could not get asset information. Error code 1004 + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/AssetConflictErrorResponse' + description: | + - The asset is already supported globally. Error code: 1002 + + - The asset has already been added to this workspace. Error code: 1003 + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AssetInternalServerErrorResponse' + description: Failed to create asset + summary: Register an asset + tags: + - Blockchains & assets + x-readme: + code-samples: + - language: python + code: "supportedAssets = fireblocks.register_new_asset(blockchainId, address,\ + \ symbol)" + name: Fireblocks SDK Python example + - language: javascript + code: "const supportedAssets = await fireblocks.registerNewAsset(blockchainId,\ + \ address, symbol);" + name: Fireblocks SDK Javascript example + x-content-type: application/json + x-accepts: application/json /transactions: get: description: Lists the transaction history for your workspace. @@ -5383,90 +5477,146 @@ paths: tags: - Payments - Payout x-accepts: application/json - /gas_station: - get: - description: Returns gas station settings and ETH balance. - operationId: getGasStationInfo + /payments/workflow_config: + post: + description: "Generate a new configuration ID to be used for initiating executions\ + \ in subsequent phases. This configuration should include the operations you\ + \ intend to incorporate into the workflow, such as TRANSFER, CONVERT, and\ + \ DISBURSE, in addition to your pre-screening preferences, which are disabled\ + \ by default." + operationId: createFlowConfiguration + 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/CreateWorkflowConfigurationRequest' + responses: + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/WorkflowConfiguration' + description: Configuration is being generated + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized. Missing / invalid JWT token in Authorization + header. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Not found + security: + - bearerAuth: [] + summary: Create payment flow configuration + tags: + - Payments - Flows + x-internal: true + x-content-type: application/json + x-accepts: application/json + /payments/workflow_config/{configId}: + delete: + description: Delete a configuration using the specified "configId". + operationId: deleteFlowConfiguration + parameters: + - explode: false + in: path + name: configId + required: true + schema: + type: string + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/GasStationPropertiesResponse' - description: Gas Station properties - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - default: + $ref: '#/components/schemas/WorkflowConfigurationId' + description: The specified configuration has been deleted successfully. + "401": content: application/json: schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - summary: Get gas station settings + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized. Missing / invalid JWT token in Authorization + header. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Not found + summary: Delete workflow configuration tags: - - Gas stations - x-readme: - code-samples: - - language: python - code: gas_station_info = fireblocks.get_gas_station_info() - name: Fireblocks SDK Python example - - language: javascript - code: const gasStationInfo = await fireblocks.gasStationInfo(); - name: Fireblocks SDK Javascript example + - Payments - Flows + x-internal: true x-accepts: application/json - /gas_station/{assetId}: get: - description: Returns gas station settings and balances for a requested asset. - operationId: getGasStationByAssetId + description: Retrieve a previously created workflow configuration using the + specified "configId". + operationId: getFlowConfiguration parameters: - - description: The ID of the asset - explode: false + - explode: false in: path - name: assetId + name: configId required: true schema: type: string - x-fb-entity: asset style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/GasStationPropertiesResponse' - description: Gas Station properties - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - default: + $ref: '#/components/schemas/WorkflowConfiguration' + description: Returns a workflow configuration + "401": content: application/json: schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - summary: Get gas station settings by asset + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized. Missing / invalid JWT token in Authorization + header. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Not found + security: + - bearerAuth: [] + summary: Retrieve workflow configuration tags: - - Gas stations - x-readme: - code-samples: - - language: python - code: gas_station_info = fireblocks.get_gas_station_info(asset_id) - name: Fireblocks SDK Python example - - language: javascript - code: const gasStationInfo = await fireblocks.gasStationInfo(assetId); - name: Fireblocks SDK Javascript example + - Payments - Flows + x-internal: true x-accepts: application/json - /gas_station/configuration: - put: - description: Configures gas station settings for ETH. - operationId: updateGasStationConfiguration + /payments/workflow_execution: + post: + description: "Validate the \"workflow-config\" previously created by utilizing\ + \ the unique \"configId\". This step requires the mandatory field amount,\ + \ and allows for modifications to other fields defined via the \"workflow-config\"\ + \ endpoint, including pre-screening preferences. A response containing the\ + \ \"workflowExecutionId\" and detailing the validation status will be provided.\ + \ Execution is ready when the \"workflow-execution\" status is READY_FOR_LAUNCH,\ + \ at which point it can be initiated with \"POST /workflow-execution/{workflowExecutionId}/actions/execute\"\ + ." + operationId: createFlowExecution 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\ @@ -5483,55 +5633,282 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/GasStationConfiguration' - required: true + $ref: '#/components/schemas/CreateWorkflowExecutionRequest' responses: - "201": - description: OK - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - default: + "200": content: application/json: schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - summary: Edit gas station settings + $ref: '#/components/schemas/WorkflowExecution' + description: Workflow execution entity has been created successfully. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized. Missing / invalid JWT token in Authorization + header. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Not found + security: + - bearerAuth: [] + summary: Create workflow execution tags: - - Gas stations - x-readme: - code-samples: - - language: python - code: "gas_station = fireblocks.set_gas_station_configuration(gas_threshold,\ - \ gas_cap, max_gas_price, asset_id)" - name: Fireblocks SDK Python example - - language: javascript - code: "const gasStation = await fireblocks.setGasStationConfiguration(gasThreshold,\ - \ gasCap, maxGasPrice)" - name: Fireblocks SDK Javascript example + - Payments - Flows + x-internal: true x-content-type: application/json x-accepts: application/json - /gas_station/configuration/{assetId}: - put: - description: Configures gas station settings for a requested asset. - operationId: updateGasStationConfigurationByAssetId + /payments/workflow_execution/{workflowExecutionId}: + get: + description: Retrieve details of a previously initiated workflow execution by + specifying the "workflowExecutionId" + operationId: getFlowExecution parameters: - - description: The ID of the asset - explode: false + - explode: false in: path - name: assetId + name: workflowExecutionId required: true schema: type: string - x-fb-entity: asset 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\ + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/WorkflowExecution' + description: Returns workflow execution by id with preview info + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized. Missing / invalid JWT token in Authorization + header. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Not found + security: + - bearerAuth: [] + summary: Get workflow execution details + tags: + - Payments - Flows + x-internal: true + x-accepts: application/json + /payments/workflow_execution/{workflowExecutionId}/actions/execute: + post: + description: "Launch the execution of a pre-configured workflow, identified\ + \ by \"workflowExecutionId\", once it reaches the READY_FOR_LAUNCH state.\ + \ The workflow undergoes several phases during execution - EXECUTION_IN_PROGRESS\ + \ - Marks the start of the workflow execution. EXECUTION_COMPLETED or EXECUTION_FAILED\ + \ - Indicates the execution has reached a final state." + operationId: launchFlowExecution + parameters: + - explode: false + in: path + name: workflowExecutionId + required: true + schema: + 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 + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/WorkflowExecution' + description: Workflow execution has been executed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized. Missing / invalid JWT token in Authorization + header. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Not found + security: + - bearerAuth: [] + summary: Execute the payments workflow + tags: + - Payments - Flows + x-internal: true + x-accepts: application/json + /gas_station: + get: + description: Returns gas station settings and ETH balance. + operationId: getGasStationInfo + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GasStationPropertiesResponse' + description: Gas Station properties + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get gas station settings + tags: + - Gas stations + x-readme: + code-samples: + - language: python + code: gas_station_info = fireblocks.get_gas_station_info() + name: Fireblocks SDK Python example + - language: javascript + code: const gasStationInfo = await fireblocks.gasStationInfo(); + name: Fireblocks SDK Javascript example + x-accepts: application/json + /gas_station/{assetId}: + get: + description: Returns gas station settings and balances for a requested asset. + operationId: getGasStationByAssetId + parameters: + - description: The ID of the asset + explode: false + in: path + name: assetId + required: true + schema: + type: string + x-fb-entity: asset + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GasStationPropertiesResponse' + description: Gas Station properties + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get gas station settings by asset + tags: + - Gas stations + x-readme: + code-samples: + - language: python + code: gas_station_info = fireblocks.get_gas_station_info(asset_id) + name: Fireblocks SDK Python example + - language: javascript + code: const gasStationInfo = await fireblocks.gasStationInfo(assetId); + name: Fireblocks SDK Javascript example + x-accepts: application/json + /gas_station/configuration: + put: + description: Configures gas station settings for ETH. + operationId: updateGasStationConfiguration + 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/GasStationConfiguration' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/EditGasStationConfigurationResponse' + description: OK + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Edit gas station settings + tags: + - Gas stations + x-readme: + code-samples: + - language: python + code: "gas_station = fireblocks.set_gas_station_configuration(gas_threshold,\ + \ gas_cap, max_gas_price, asset_id)" + name: Fireblocks SDK Python example + - language: javascript + code: "const gasStation = await fireblocks.setGasStationConfiguration(gasThreshold,\ + \ gasCap, maxGasPrice)" + name: Fireblocks SDK Javascript example + x-content-type: application/json + x-accepts: application/json + /gas_station/configuration/{assetId}: + put: + description: Configures gas station settings for a requested asset. + operationId: updateGasStationConfigurationByAssetId + parameters: + - description: The ID of the asset + explode: false + in: path + name: assetId + required: true + schema: + type: string + x-fb-entity: asset + 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 @@ -5548,6 +5925,10 @@ paths: required: true responses: "201": + content: + application/json: + schema: + $ref: '#/components/schemas/EditGasStationConfigurationResponse' description: OK headers: X-Request-ID: @@ -5886,6 +6267,10 @@ paths: style: form responses: "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetAuditLogsResponse' description: Audit logs from requested time period headers: X-Request-ID: @@ -6177,6 +6562,10 @@ paths: required: true responses: "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResendWebhooksByTransactionIdResponse' description: OK headers: X-Request-ID: @@ -6575,7 +6964,11 @@ paths: $ref: '#/components/schemas/SetAdminQuorumThresholdRequest' required: true responses: - "200": + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/SetAdminQuorumThresholdResponse' description: OK headers: X-Request-ID: @@ -6592,6 +6985,7 @@ paths: summary: Update admin quorum threshold tags: - Admin Quorum + x-internal: true x-readme: code-samples: - language: python @@ -8020,7 +8414,14 @@ paths: required: true responses: "202": + content: + application/json: + schema: + $ref: '#/components/schemas/SetOtaStatusResponse' description: Successfully updated OTA status + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' "400": description: Bad request "409": @@ -8300,6 +8701,10 @@ paths: operationId: getConsoleUsers responses: "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetConsoleUsersResponse' description: got console users headers: X-Request-ID: @@ -8366,7 +8771,7 @@ paths: schema: $ref: '#/components/schemas/CreateConsoleUser' responses: - "204": + "200": description: Users sent for creation headers: X-Request-ID: @@ -8424,6 +8829,10 @@ paths: operationId: getApiUsers responses: "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetAPIUsersResponse' description: got api users headers: X-Request-ID: @@ -8490,7 +8899,7 @@ paths: schema: $ref: '#/components/schemas/CreateAPIUser' responses: - "204": + "200": description: User sent for creation headers: X-Request-ID: @@ -8562,7 +8971,7 @@ paths: type: string style: simple responses: - "204": + "200": description: User sent for creation headers: X-Request-ID: @@ -8623,6 +9032,10 @@ paths: style: simple responses: "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetWhitelistIpAddressesResponse' description: successfully whitelisted headers: X-Request-ID: @@ -10160,14 +10573,26 @@ components: description: Account Name type: string type: object - AssetWallet: + RenameVaultAccountResponse: example: - blockHash: blockHash - total: total - lockedAmount: lockedAmount - blockHeight: blockHeight - vaultId: vaultId - assetId: assetId + name: name + id: id + properties: + name: + description: The new name of the vault account + type: string + id: + description: The ID of the vault account + type: string + type: object + AssetWallet: + example: + blockHash: blockHash + total: total + lockedAmount: lockedAmount + blockHeight: blockHeight + vaultId: vaultId + assetId: assetId pending: pending staked: staked available: available @@ -10419,6 +10844,14 @@ components: paging: $ref: '#/components/schemas/PaginatedAddressResponse_paging' type: object + GetMaxSpendableAmountResponse: + example: + maxSpendableAmount: maxSpendableAmount + properties: + maxSpendableAmount: + description: The maximum amount that can be spent from the vault account + type: string + type: object UnspentInput: example: index: 0.8008281904610115 @@ -10774,6 +11207,16 @@ components: destType: $ref: '#/components/schemas/TradingAccountType' type: object + InternalTransferResponse: + example: + success: true + properties: + success: + description: Indicates whether the transfer was successful + type: boolean + required: + - success + type: object ConvertAssetsRequest: example: amount: 0.8008281904610115 @@ -10798,6 +11241,16 @@ components: - destAsset - srcAsset type: object + ConvertAssetsResponse: + example: + success: true + properties: + success: + description: Indicates whether the conversion was successful + type: boolean + required: + - success + type: object FiatAccountType: enum: - BLINC @@ -10846,6 +11299,28 @@ components: amount: type: number type: object + RedeemFundsToLinkedDDAResponse: + example: + success: true + properties: + success: + description: Indicates whether the funds were successfully redeemed to the + linked DDA + type: boolean + required: + - success + type: object + DepositFundsFromLinkedDDAResponse: + example: + success: true + properties: + success: + description: Indicates whether the funds were successfully deposited from + the linked DDA + type: boolean + required: + - success + type: object NetworkChannel: deprecated: true description: Deprecated in the only used reference - NetworkConnectionResponse @@ -10880,11 +11355,11 @@ components: - id - name type: object - CustomCryptoRoutingDest: + CustomRoutingDest: example: scheme: CUSTOM dstId: dstId - dstType: VAULT + dstType: FIAT_ACCOUNT properties: scheme: description: The network routing logic. @@ -10892,14 +11367,14 @@ components: - CUSTOM type: string dstType: - description: The type of destination account the funds are being sent to. + description: The account the funds are being sent to. enum: + - FIAT_ACCOUNT - VAULT - EXCHANGE type: string dstId: - description: The ID of the destination account the funds are being sent - to. + description: The ID of the account the funds are being sent to. type: string required: - dstId @@ -10907,8 +11382,6 @@ components: - scheme type: object DefaultNetworkRoutingDest: - example: - scheme: DEFAULT properties: scheme: description: The network routing logic. @@ -10919,8 +11392,6 @@ components: - scheme type: object NoneNetworkRoutingDest: - example: - scheme: NONE properties: scheme: description: No network routing logic. @@ -10930,57 +11401,9 @@ components: required: - scheme type: object - CustomFiatRoutingDest: - example: - scheme: CUSTOM - dstId: dstId - dstType: FIAT_ACCOUNT - properties: - scheme: - description: The network routing logic. - enum: - - CUSTOM - type: string - dstType: - description: The fiat account the funds are being sent to. - enum: - - FIAT_ACCOUNT - type: string - dstId: - description: The ID of the fiat account the funds are being sent to. - type: string - required: - - dstId - - dstType - - scheme - type: object NetworkConnectionRoutingPolicy: - example: - sen_test: - scheme: DEFAULT - signet: - scheme: DEFAULT - signet_test: - scheme: NONE - sen: - scheme: CUSTOM - dstId: dstId - dstType: FIAT_ACCOUNT - crypto: - scheme: CUSTOM - dstId: dstId - dstType: VAULT - properties: - crypto: - $ref: '#/components/schemas/NetworkConnectionRoutingPolicy_crypto' - sen: - $ref: '#/components/schemas/NetworkConnectionRoutingPolicy_sen' - signet: - $ref: '#/components/schemas/NetworkConnectionRoutingPolicy_signet' - sen_test: - $ref: '#/components/schemas/NetworkConnectionRoutingPolicy_sen_test' - signet_test: - $ref: '#/components/schemas/NetworkConnectionRoutingPolicy_signet_test' + additionalProperties: + $ref: '#/components/schemas/NetworkConnectionRoutingPolicy_value' type: object NetworkConnectionResponse: example: @@ -10994,20 +11417,10 @@ components: id: id localChannel: "" routingPolicy: - sen_test: - scheme: DEFAULT - signet: - scheme: DEFAULT - signet_test: - scheme: NONE - sen: + key: scheme: CUSTOM dstId: dstId dstType: FIAT_ACCOUNT - crypto: - scheme: CUSTOM - dstId: dstId - dstType: VAULT status: null properties: id: @@ -11029,7 +11442,9 @@ components: remoteNetworkId: $ref: '#/components/schemas/NetworkId' routingPolicy: - $ref: '#/components/schemas/NetworkConnectionRoutingPolicy' + additionalProperties: + $ref: '#/components/schemas/NetworkConnectionRoutingPolicy_value' + type: object required: - id - localNetworkId @@ -11042,20 +11457,10 @@ components: localNetworkId: localNetworkId remoteNetworkId: remoteNetworkId routingPolicy: - sen_test: - scheme: DEFAULT - signet: - scheme: DEFAULT - signet_test: - scheme: NONE - sen: + key: scheme: CUSTOM dstId: dstId dstType: FIAT_ACCOUNT - crypto: - scheme: CUSTOM - dstId: dstId - dstType: VAULT properties: localNetworkId: description: The network ID of the profile trying to create the connection. @@ -11064,7 +11469,9 @@ components: description: The network ID the profile is attempting to connect to. type: string routingPolicy: - $ref: '#/components/schemas/NetworkConnectionRoutingPolicy' + additionalProperties: + $ref: '#/components/schemas/NetworkConnectionRoutingPolicy_value' + type: object required: - localNetworkId - remoteNetworkId @@ -11072,23 +11479,15 @@ components: SetRoutingPolicyRequest: example: routingPolicy: - sen_test: - scheme: DEFAULT - signet: - scheme: DEFAULT - signet_test: - scheme: NONE - sen: + key: scheme: CUSTOM dstId: dstId dstType: FIAT_ACCOUNT - crypto: - scheme: CUSTOM - dstId: dstId - dstType: VAULT properties: routingPolicy: - $ref: '#/components/schemas/NetworkConnectionRoutingPolicy' + additionalProperties: + $ref: '#/components/schemas/NetworkConnectionRoutingPolicy_value' + type: object required: - routingPolicy type: object @@ -11103,30 +11502,8 @@ components: type: string type: object NetworkIdRoutingPolicy: - example: - sen_test: - scheme: NONE - signet: null - signet_test: null - sen: - scheme: CUSTOM - dstId: dstId - dstType: FIAT_ACCOUNT - crypto: - scheme: CUSTOM - dstId: dstId - dstType: VAULT - properties: - crypto: - $ref: '#/components/schemas/NetworkIdRoutingPolicy_crypto' - sen: - $ref: '#/components/schemas/NetworkIdRoutingPolicy_sen' - signet: - $ref: '#/components/schemas/NetworkIdRoutingPolicy_sen' - sen_test: - $ref: '#/components/schemas/NetworkIdRoutingPolicy_sen_test' - signet_test: - $ref: '#/components/schemas/NetworkIdRoutingPolicy_sen_test' + additionalProperties: + $ref: '#/components/schemas/NetworkIdRoutingPolicy_value' type: object NetworkIdResponse: allOf: @@ -11142,61 +11519,37 @@ components: name: name isDiscoverable: true id: id - routingPolicy: - sen_test: - scheme: NONE - signet: null - signet_test: null - sen: - scheme: CUSTOM - dstId: dstId - dstType: FIAT_ACCOUNT - crypto: - scheme: CUSTOM - dstId: dstId - dstType: VAULT + routingPolicy: null CreateNetworkIdRequest: example: name: name routingPolicy: - sen_test: - scheme: NONE - signet: null - signet_test: null - sen: + key: scheme: CUSTOM dstId: dstId dstType: FIAT_ACCOUNT - crypto: - scheme: CUSTOM - dstId: dstId - dstType: VAULT properties: name: type: string routingPolicy: - $ref: '#/components/schemas/NetworkIdRoutingPolicy' + additionalProperties: + $ref: '#/components/schemas/NetworkIdRoutingPolicy_value' + type: object required: - name type: object SetNetworkIdRoutingPolicyRequest: example: routingPolicy: - sen_test: - scheme: NONE - signet: null - signet_test: null - sen: + key: scheme: CUSTOM dstId: dstId dstType: FIAT_ACCOUNT - crypto: - scheme: CUSTOM - dstId: dstId - dstType: VAULT properties: routingPolicy: - $ref: '#/components/schemas/NetworkIdRoutingPolicy' + additionalProperties: + $ref: '#/components/schemas/NetworkIdRoutingPolicy_value' + type: object required: - routingPolicy type: object @@ -11489,6 +11842,131 @@ components: - name - type type: object + RegisterNewAssetRequest: + example: + symbol: TST3 + address: 0xe7A9as1oa38bc4da0248s179E30aa94CcF453991 + blockchainId: "(ETH, ETH_TEST5, MATIC_POLYGON)" + properties: + blockchainId: + description: Native asset of blockchain + example: "(ETH, ETH_TEST5, MATIC_POLYGON)" + type: string + address: + description: Asset address + example: 0xe7A9as1oa38bc4da0248s179E30aa94CcF453991 + type: string + symbol: + description: Asset symbol + example: TST3 + type: string + required: + - address + - blockchainId + type: object + AssetResponse: + example: + metadata: + scope: Global + deprecated: false + legacyId: TST3_ETH + assetClass: FT + onchain: + standard: ERC20 + symbol: TST3 + address: 0xe7A9as1oa38bc4da0248s179E30aa94CcF453991 + decimals: 18 + name: Test 3 + properties: + legacyId: + example: TST3_ETH + type: string + assetClass: + enum: + - NATIVE + - FT + - NFT + - SFT + example: FT + type: string + onchain: + $ref: '#/components/schemas/AssetResponse_onchain' + metadata: + $ref: '#/components/schemas/AssetResponse_metadata' + required: + - assetClass + - legacyId + - metadata + - onchain + type: object + AssetBadRequestErrorResponse: + example: + code: "3001" + message: Listing an asset on the requested blockchain is not supported + properties: + message: + description: Bad request error code + example: Listing an asset on the requested blockchain is not supported + type: string + code: + description: Error code + example: "3001" + type: string + required: + - code + - message + type: object + AssetNotFoundErrorResponse: + example: + code: "3009" + message: "Invalid address, could not get asset information" + properties: + message: + description: Not found error code + example: "Invalid address, could not get asset information" + type: string + code: + description: Error code + example: "3009" + type: string + required: + - code + - message + type: object + AssetConflictErrorResponse: + example: + code: "3002" + message: Asset already listed + properties: + message: + description: Conflict error code + example: Asset already listed + type: string + code: + description: Error code + example: "3002" + type: string + required: + - code + - message + type: object + AssetInternalServerErrorResponse: + example: + code: "3005" + message: Internal server error + properties: + message: + description: Internal server error code + example: Internal server error + type: string + code: + description: Error code + example: "3005" + type: string + required: + - code + - message + type: object GetTransactionOperation: description: | * `TRANSFER` - Transfers funds from one account to another. UTXO blockchains allow multi-input and multi-output transfers. All other blockchains allow transfers with one source address and one destination address. @@ -13505,11 +13983,928 @@ components: example: payoutId: payoutId properties: - payoutId: + payoutId: + type: string + required: + - payoutId + type: object + PreScreening: + properties: + enabled: + type: boolean + required: + - enabled + type: object + ConversionOperationType: + enum: + - CONVERSION + type: string + ConversionOperationConfigParams: + properties: + amount: + type: string + accountId: + type: string + srcAssetId: + type: string + destAssetId: + type: string + slippageBasisPoints: + maximum: 10000 + minimum: 0 + type: integer + required: + - destAssetId + type: object + CreateConversionConfigOperationRequest: + properties: + type: + $ref: '#/components/schemas/ConversionOperationType' + params: + $ref: '#/components/schemas/ConversionOperationConfigParams' + required: + - params + - type + type: object + TransferOperationType: + enum: + - TRANSFER + type: string + AccountType: + enum: + - EXCHANGE_ACCOUNT + - UNMANAGED_WALLET + - VAULT_ACCOUNT + - NETWORK_CONNECTION + - FIAT_ACCOUNT + type: string + Account: + properties: + accountId: + type: string + accountType: + $ref: '#/components/schemas/AccountType' + required: + - accountId + - accountType + type: object + OneTimeAddressAccount: + properties: + oneTimeAddress: + type: string + tag: + type: string + required: + - oneTimeAddress + type: object + Destination: + oneOf: + - $ref: '#/components/schemas/Account' + - $ref: '#/components/schemas/OneTimeAddressAccount' + TransferOperationConfigParams: + properties: + amount: + type: string + assetId: + type: string + source: + $ref: '#/components/schemas/Account' + destination: + $ref: '#/components/schemas/Destination' + required: + - destination + type: object + CreateTransferConfigOperationRequest: + properties: + type: + $ref: '#/components/schemas/TransferOperationType' + params: + $ref: '#/components/schemas/TransferOperationConfigParams' + required: + - params + - type + type: object + DisbursementOperationType: + enum: + - DISBURSEMENT + type: string + DisbursementAmountInstruction: + properties: + payeeAccount: + $ref: '#/components/schemas/Destination' + assetId: + type: string + amount: + type: string + required: + - amount + - assetId + - payeeAccount + type: object + DisbursementPercentageInstruction: + properties: + payeeAccount: + $ref: '#/components/schemas/Destination' + assetId: + type: string + percentage: + type: string + required: + - assetId + - payeeAccount + - percentage + type: object + DisbursementInstruction: + oneOf: + - $ref: '#/components/schemas/DisbursementAmountInstruction' + - $ref: '#/components/schemas/DisbursementPercentageInstruction' + DisbursementOperationConfigParams: + properties: + paymentAccount: + $ref: '#/components/schemas/Account' + instructionSet: + items: + $ref: '#/components/schemas/DisbursementInstruction' + type: array + required: + - instructionSet + type: object + CreateDisbursementConfigOperationRequest: + properties: + type: + $ref: '#/components/schemas/DisbursementOperationType' + params: + $ref: '#/components/schemas/DisbursementOperationConfigParams' + required: + - params + - type + type: object + CreateConfigOperationRequest: + oneOf: + - $ref: '#/components/schemas/CreateConversionConfigOperationRequest' + - $ref: '#/components/schemas/CreateTransferConfigOperationRequest' + - $ref: '#/components/schemas/CreateDisbursementConfigOperationRequest' + CorrelationData: + oneOf: + - additionalProperties: + type: string + type: object + - type: string + x-internal: true + CreateWorkflowConfigurationRequest: + properties: + configName: + type: string + preScreening: + $ref: '#/components/schemas/PreScreening' + configOperations: + items: + $ref: '#/components/schemas/CreateConfigOperationRequest' + type: array + externalCorrelationData: + $ref: '#/components/schemas/CorrelationData' + required: + - configName + - configOperations + type: object + x-internal: true + WorkflowConfigStatus: + enum: + - PENDING + - VALIDATION_IN_PROGRESS + - VALIDATION_FAILED + - READY_FOR_EXECUTION + type: string + ConfigOperationStatus: + enum: + - PENDING + - VALIDATION_IN_PROGRESS + - READY_FOR_EXECUTION + - VALIDATION_FAILED + type: string + ConversionValidationFailure: + properties: + reason: + enum: + - ACCOUNT_NOT_FOUND + - ACCOUNT_TYPE_NOT_SUPPORTED + - INSUFFICIENT_BALANCE + - ASSET_NOT_FOUND + - ASSETS_CONTINUITY_MISMATCH + - EXCHANGE_BASKETS_MISMATCH + - ACCOUNTS_CONTINUITY_MISMATCH + - ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED + - EQUAL_ACCOUNTS_NOT_ALLOWED + - EQUAL_ASSETS_NOT_ALLOWED + - INVALID_AMOUNT + - UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED + - MANAGED_OPERATION_PARAMS_INVALID_SCHEMA + - ACCOUNT_IS_NOT_EXCHANGE + - UNSUPPORTED_TRADING_METHOD + - ASSETS_CAN_NOT_CONVERTED + type: string + data: + additionalProperties: {} + type: object + required: + - reason + type: object + ConversionConfigOperation: + properties: + operationId: + type: string + type: + $ref: '#/components/schemas/ConversionOperationType' + params: + $ref: '#/components/schemas/ConversionOperationConfigParams' + status: + $ref: '#/components/schemas/ConfigOperationStatus' + validationFailure: + $ref: '#/components/schemas/ConversionValidationFailure' + required: + - operationId + - params + - status + - type + type: object + TransferValidationFailure: + properties: + reason: + enum: + - ACCOUNT_NOT_FOUND + - ACCOUNT_TYPE_NOT_SUPPORTED + - INSUFFICIENT_BALANCE + - ASSET_NOT_FOUND + - ASSETS_CONTINUITY_MISMATCH + - EXCHANGE_BASKETS_MISMATCH + - ACCOUNTS_CONTINUITY_MISMATCH + - ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED + - EQUAL_ACCOUNTS_NOT_ALLOWED + - EQUAL_ASSETS_NOT_ALLOWED + - INVALID_AMOUNT + - UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED + - MANAGED_OPERATION_PARAMS_INVALID_SCHEMA + type: string + data: + additionalProperties: true + type: object + required: + - reason + type: object + TransferConfigOperation: + properties: + operationId: + type: string + type: + $ref: '#/components/schemas/TransferOperationType' + params: + $ref: '#/components/schemas/TransferOperationConfigParams' + status: + $ref: '#/components/schemas/ConfigOperationStatus' + validationFailure: + $ref: '#/components/schemas/TransferValidationFailure' + required: + - operationId + - params + - status + - type + type: object + DisbursementValidationFailure: + properties: + reason: + enum: + - ACCOUNT_NOT_FOUND + - ACCOUNT_TYPE_NOT_SUPPORTED + - INSUFFICIENT_BALANCE + - ASSET_NOT_FOUND + - ASSETS_CONTINUITY_MISMATCH + - EXCHANGE_BASKETS_MISMATCH + - ACCOUNTS_CONTINUITY_MISMATCH + - ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED + - EQUAL_ACCOUNTS_NOT_ALLOWED + - EQUAL_ASSETS_NOT_ALLOWED + - INVALID_AMOUNT + - UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED + - MANAGED_OPERATION_PARAMS_INVALID_SCHEMA + - INSTRUCTIONS_EXCEED_HUNDRED_PERCENT + - INSTRUCTIONS_ARRAY_EMPTY + type: string + data: + additionalProperties: {} + type: object + required: + - reason + type: object + DisbursementConfigOperation: + properties: + operationId: + type: string + type: + $ref: '#/components/schemas/DisbursementOperationType' + params: + $ref: '#/components/schemas/DisbursementOperationConfigParams' + status: + $ref: '#/components/schemas/ConfigOperationStatus' + validationFailure: + $ref: '#/components/schemas/DisbursementValidationFailure' + required: + - operationId + - params + - status + - type + type: object + ConfigOperation: + oneOf: + - $ref: '#/components/schemas/ConversionConfigOperation' + - $ref: '#/components/schemas/TransferConfigOperation' + - $ref: '#/components/schemas/DisbursementConfigOperation' + WorkflowConfiguration: + properties: + configId: + type: string + configName: + type: string + preScreening: + $ref: '#/components/schemas/PreScreening' + status: + $ref: '#/components/schemas/WorkflowConfigStatus' + createdAt: + type: number + configOperations: + items: + $ref: '#/components/schemas/ConfigOperation' + type: array + externalCorrelationData: + $ref: '#/components/schemas/CorrelationData' + required: + - configId + - configName + - configOperations + - createdAt + - status + type: object + x-internal: true + WorkflowConfigurationId: + properties: + configId: + type: string + required: + - configId + type: object + ConversionOperationExecutionParams: + properties: + configOperationId: + type: string + executionParams: + $ref: '#/components/schemas/ConversionOperationExecutionParams_executionParams' + required: + - configOperationId + type: object + TransferOperationExecutionParams: + properties: + configOperationId: + type: string + executionParams: + $ref: '#/components/schemas/TransferOperationExecutionParams_executionParams' + required: + - configOperationId + type: object + DisbursementOperationExecutionParams: + properties: + configOperationId: + type: string + executionParams: + $ref: '#/components/schemas/DisbursementOperationExecutionParams_executionParams' + required: + - configOperationId + type: object + CreateWorkflowExecutionRequest: + properties: + configId: + type: string + preScreening: + $ref: '#/components/schemas/PreScreening' + params: + items: + $ref: '#/components/schemas/CreateWorkflowExecutionRequest_params_inner' + type: array + externalCorrelationData: + $ref: '#/components/schemas/CorrelationData' + required: + - configId + - params + type: object + x-internal: true + ConfigConversionOperationSnapshot: + properties: + operationId: + type: string + type: + $ref: '#/components/schemas/ConversionOperationType' + params: + $ref: '#/components/schemas/ConversionOperationConfigParams' + required: + - operationId + - params + - type + type: object + ConfigTransferOperationSnapshot: + properties: + operationId: + type: string + type: + $ref: '#/components/schemas/TransferOperationType' + params: + $ref: '#/components/schemas/TransferOperationConfigParams' + required: + - operationId + - params + - type + type: object + ConfigDisbursementOperationSnapshot: + properties: + operationId: + type: string + type: + $ref: '#/components/schemas/DisbursementOperationType' + params: + $ref: '#/components/schemas/DisbursementOperationConfigParams' + required: + - operationId + - params + - type + type: object + ConfigOperationSnapshot: + oneOf: + - $ref: '#/components/schemas/ConfigConversionOperationSnapshot' + - $ref: '#/components/schemas/ConfigTransferOperationSnapshot' + - $ref: '#/components/schemas/ConfigDisbursementOperationSnapshot' + WorkflowConfigurationSnapshot: + properties: + configId: + type: string + configName: + type: string + createdAt: + type: number + configOperations: + items: + $ref: '#/components/schemas/ConfigOperationSnapshot' + type: array + externalCorrelationData: + $ref: '#/components/schemas/CorrelationData' + required: + - configId + - configName + - configOperations + - createdAt + type: object + x-internal: true + ExecutionOperationStatus: + enum: + - PENDING + - VALIDATION_IN_PROGRESS + - VALIDATION_FAILED + - VALIDATION_COMPLETED + - PREVIEW_REQUESTED + - PREVIEW_IN_PROGRESS + - PREVIEW_FAILED + - READY_FOR_LAUNCH + - EXECUTION_REQUESTED + - EXECUTION_IN_PROGRESS + - EXECUTION_COMPLETED + - EXECUTION_FAILED + type: string + ScreeningOperationType: + enum: + - SCREENING + type: string + ScreeningValidationFailure: + properties: + reason: + enum: + - SCREENING_DISABLED_IN_TENANT + type: string + data: + additionalProperties: {} + type: object + required: + - reason + type: object + ScreeningVerdict: + properties: + verdict: + enum: + - PASSED + - PASSED_WITH_ALERT + - REJECTED + - FAILED + - BYPASSED + type: string + executionOperationId: + type: string + account: + $ref: '#/components/schemas/Destination' + assetId: + type: string + amount: + type: string + matchedRule: + $ref: '#/components/schemas/ScreeningVerdict_matchedRule' + required: + - account + - amount + - assetId + - executionOperationId + - verdict + type: object + ScreeningOperationExecutionOutput: + properties: + verdicts: + items: + $ref: '#/components/schemas/ScreeningVerdict' + type: array + required: + - verdicts + type: object + ScreeningOperationFailure: + properties: + reason: + enum: + - AML_PROCESS_FAILED + - SCREENING_REJECTED + type: string + data: + $ref: '#/components/schemas/ScreeningOperationExecutionOutput' + required: + - reason + type: object + ScreeningOperationExecution: + properties: + output: + $ref: '#/components/schemas/ScreeningOperationExecutionOutput' + startedAt: + type: number + finishedAt: + type: number + failure: + $ref: '#/components/schemas/ScreeningOperationFailure' + required: + - startedAt + type: object + ExecutionScreeningOperation: + properties: + operationId: + type: string + status: + $ref: '#/components/schemas/ExecutionOperationStatus' + operationType: + $ref: '#/components/schemas/ScreeningOperationType' + validationFailure: + $ref: '#/components/schemas/ScreeningValidationFailure' + execution: + $ref: '#/components/schemas/ScreeningOperationExecution' + required: + - operationId + - operationType + - status + type: object + AssetAmount: + properties: + amount: + type: string + assetId: + type: string + required: + - amount + - assetId + type: object + ConversionOperationPreviewOutput: + properties: + amount: + $ref: '#/components/schemas/AssetAmount' + fee: + $ref: '#/components/schemas/AssetAmount' + conversionRate: + type: string + timeSeconds: + type: number + required: + - amount + - conversionRate + - fee + - timeSeconds + type: object + ConversionOperationFailure: + properties: + reason: + enum: + - INVALID_AMOUNT + - SLIPPAGE_EXCEEDED + - AMOUNT_TOO_SMALL + - INSUFFICIENT_FUNDS + type: string + data: + additionalProperties: {} + type: object + required: + - reason + type: object + ConversionOperationPreview: + properties: + input: + $ref: '#/components/schemas/ConversionOperationConfigParams' + output: + $ref: '#/components/schemas/ConversionOperationPreviewOutput' + failure: + $ref: '#/components/schemas/ConversionOperationFailure' + required: + - input + type: object + ConversionOperationExecutionOutput: + properties: + amount: + $ref: '#/components/schemas/AssetAmount' + fee: + $ref: '#/components/schemas/AssetAmount' + conversionRate: + type: string + required: + - amount + - conversionRate + - fee + type: object + ConversionOperationExecution: + properties: + input: + $ref: '#/components/schemas/ConversionOperationConfigParams' + output: + $ref: '#/components/schemas/ConversionOperationExecutionOutput' + startedAt: + type: number + finishedAt: + type: number + failure: + $ref: '#/components/schemas/ConversionOperationFailure' + required: + - input + - startedAt + type: object + ExecutionConversionOperation: + properties: + operationId: + type: string + status: + $ref: '#/components/schemas/ExecutionOperationStatus' + validationFailure: + $ref: '#/components/schemas/ConversionValidationFailure' + operationType: + $ref: '#/components/schemas/ConversionOperationType' + preview: + $ref: '#/components/schemas/ConversionOperationPreview' + execution: + $ref: '#/components/schemas/ConversionOperationExecution' + required: + - operationId + - operationType + - status + type: object + TransferOperationPreviewOutput: + properties: + amount: + $ref: '#/components/schemas/AssetAmount' + fee: + $ref: '#/components/schemas/AssetAmount' + isSignRequired: + type: boolean + timeSeconds: + type: number + required: + - amount + - fee + - isSignRequired + - timeSeconds + type: object + TransferOperationFailure: + properties: + reason: + enum: + - INVALID_AMOUNT + - SUBMISSION_FAILED + - TRANSACTION_FAILED + type: string + data: + $ref: '#/components/schemas/TransferOperationFailure_data' + required: + - reason + type: object + TransferOperationPreview: + properties: + input: + $ref: '#/components/schemas/TransferOperationConfigParams' + output: + $ref: '#/components/schemas/TransferOperationPreviewOutput' + failure: + $ref: '#/components/schemas/TransferOperationFailure' + required: + - input + type: object + TransferOperationExecutionOutput: + properties: + amount: + $ref: '#/components/schemas/AssetAmount' + fee: + $ref: '#/components/schemas/AssetAmount' + required: + - amount + - fee + type: object + TransferOperationExecution: + properties: + input: + $ref: '#/components/schemas/TransferOperationConfigParams' + output: + $ref: '#/components/schemas/TransferOperationExecutionOutput' + txId: + type: string + startedAt: + type: number + finishedAt: + type: number + failure: + $ref: '#/components/schemas/TransferOperationFailure' + required: + - input + - startedAt + type: object + ExecutionTransferOperation: + properties: + operationId: + type: string + status: + $ref: '#/components/schemas/ExecutionOperationStatus' + validationFailure: + $ref: '#/components/schemas/TransferValidationFailure' + operationType: + $ref: '#/components/schemas/TransferOperationType' + preview: + $ref: '#/components/schemas/TransferOperationPreview' + execution: + $ref: '#/components/schemas/TransferOperationExecution' + required: + - operationId + - operationType + - status + type: object + DisbursementOperationInput: + properties: + amount: + type: string + paymentAccount: + $ref: '#/components/schemas/Account' + instructionSet: + items: + $ref: '#/components/schemas/DisbursementInstruction' + type: array + required: + - instructionSet + - paymentAccount + type: object + DisbursementInstructionOutput: + properties: + amount: + $ref: '#/components/schemas/AssetAmount' + fee: + $ref: '#/components/schemas/AssetAmount' + payeeAccount: + $ref: '#/components/schemas/Destination' + required: + - amount + - fee + - payeeAccount + type: object + DisbursementOperationPreviewOutput: + properties: + instructionSet: + items: + $ref: '#/components/schemas/DisbursementOperationPreviewOutput_instructionSet_inner' + type: array + required: + - instructionSet + type: object + OperationExecutionFailure: + properties: + reason: + type: string + data: + additionalProperties: {} + type: object + required: + - reason + type: object + DisbursementOperationPreview: + properties: + input: + $ref: '#/components/schemas/DisbursementOperationInput' + output: + $ref: '#/components/schemas/DisbursementOperationPreviewOutput' + failure: + $ref: '#/components/schemas/OperationExecutionFailure' + required: + - input + type: object + DisbursementOperationExecutionOutput: + properties: + instructionSet: + items: + $ref: '#/components/schemas/DisbursementInstructionOutput' + type: array + required: + - instructionSet + type: object + DisbursementOperationExecution: + properties: + input: + $ref: '#/components/schemas/DisbursementOperationInput' + output: + $ref: '#/components/schemas/DisbursementOperationExecutionOutput' + payoutId: + type: string + startedAt: + type: number + finishedAt: + type: number + failure: + $ref: '#/components/schemas/OperationExecutionFailure' + required: + - input + - startedAt + type: object + ExecutionDisbursementOperation: + properties: + operationId: + type: string + status: + $ref: '#/components/schemas/ExecutionOperationStatus' + validationFailure: + $ref: '#/components/schemas/DisbursementValidationFailure' + operationType: + $ref: '#/components/schemas/DisbursementOperationType' + preview: + $ref: '#/components/schemas/DisbursementOperationPreview' + execution: + $ref: '#/components/schemas/DisbursementOperationExecution' + required: + - operationId + - operationType + - status + type: object + WorkflowExecutionOperation: + oneOf: + - $ref: '#/components/schemas/ExecutionScreeningOperation' + - $ref: '#/components/schemas/ExecutionConversionOperation' + - $ref: '#/components/schemas/ExecutionTransferOperation' + - $ref: '#/components/schemas/ExecutionDisbursementOperation' + WorkflowExecution: + properties: + executionId: type: string + preScreening: + $ref: '#/components/schemas/PreScreening' + configSnapshot: + $ref: '#/components/schemas/WorkflowConfigurationSnapshot' + executionOperations: + items: + $ref: '#/components/schemas/WorkflowExecutionOperation' + type: array + status: + enum: + - PENDING + - VALIDATION_IN_PROGRESS + - VALIDATION_FAILED + - VALIDATION_COMPLETED + - PREVIEW_IN_PROGRESS + - PREVIEW_FAILED + - READY_FOR_LAUNCH + - EXECUTION_IN_PROGRESS + - EXECUTION_COMPLETED + - EXECUTION_FAILED + type: string + triggeredBy: + type: string + triggeredAt: + type: number + finishedAt: + type: number + externalCorrelationData: + $ref: '#/components/schemas/CorrelationData' required: - - payoutId + - configSnapshot + - executionId + - executionOperations + - status type: object + x-internal: true GasStationConfigurationResponse: example: gasThreshold: gasThreshold @@ -13550,6 +14945,17 @@ components: maxGasPrice: type: string type: object + EditGasStationConfigurationResponse: + example: + success: true + properties: + success: + description: Indicates whether editing the gas station configuration was + successful + type: boolean + required: + - success + type: object UserGroupResponse: example: name: name @@ -13686,6 +15092,80 @@ components: nullable: true type: string type: object + AuditLogData: + example: + createdAt: createdAt + subject: subject + tenantId: tenantId + id: id + event: event + user: user + userId: userId + timestamp: timestamp + properties: + id: + description: The unique identifier of the audit log + type: string + timestamp: + description: The timestamp of the audit log + type: string + createdAt: + description: The timestamp of the audit log creation + type: string + user: + description: The user who performed the action + type: string + subject: + description: The subject of the action + type: string + event: + description: The event that was performed + type: string + tenantId: + description: The tenant ID of the audit log + type: string + userId: + description: The user ID of the audit log + type: string + type: object + AuditLogsData: + items: + $ref: '#/components/schemas/AuditLogData' + type: array + GetAuditLogsResponse: + example: + cursor: cursor + total: 0.8008281904610115 + data: + - createdAt: createdAt + subject: subject + tenantId: tenantId + id: id + event: event + user: user + userId: userId + timestamp: timestamp + - createdAt: createdAt + subject: subject + tenantId: tenantId + id: id + event: event + user: user + userId: userId + timestamp: timestamp + properties: + data: + items: + $ref: '#/components/schemas/AuditLogData' + type: array + cursor: + description: The next id to start fetch audit logs from + nullable: true + type: string + total: + description: The total number of audit logs + type: number + type: object AddCollateralRequestBody: example: isSrcCollateral: true @@ -13983,6 +15463,16 @@ components: resendStatusUpdated: type: boolean type: object + ResendWebhooksByTransactionIdResponse: + example: + success: true + properties: + success: + description: Indicates whether the webhooks were successfully resent + type: boolean + required: + - success + type: object AdditionalInfoDto: properties: estimatedAnnualReward: @@ -14447,13 +15937,20 @@ components: properties: {} type: object SetAdminQuorumThresholdRequest: - example: - adminQuorumThreshold: 0.8008281904610115 properties: adminQuorumThreshold: description: The number of admins that will requires to approve an operation type: number type: object + SetAdminQuorumThresholdResponse: + properties: + message: + description: The message which indicates the result of the operation. + example: Admin quorum threshold request sent successfully. + type: string + required: + - message + type: object Paging: example: next: next @@ -15892,6 +17389,13 @@ components: description: Set true or false to enable or disable OTA transactions type: boolean type: object + SetOtaStatusResponse: + oneOf: + - $ref: '#/components/schemas/SetOtaStatusResponse_oneOf' + - description: Message indicating the result of the operation when config was + successfully updated + example: Accepted + type: string PolicySrcOrDestType: description: | * EXCHANGE - A third-party exchange account connected to your workspace @@ -17556,6 +19060,105 @@ components: - rules - status type: object + UserId: + description: The unique identifier of the user + type: string + UserRole: + description: The role of the user + enum: + - OWNER + - ADMIN + - SIGNER + - COLLATERALS_SIGNER + - EDITOR + - APPROVER + - VIEWER + - NON_SIGNING_ADMIN + - AUDITOR + - NCW_ADMIN + - NCW_SIGNER + type: string + UserEnabled: + description: Whether the user is enabled + type: boolean + UserStatus: + description: The status of the user + enum: + - PENDING_ACTIVATION + - PENDING_DEVICE_PAIRING + - PENDING_DEVICE_SETUP + - READY + type: string + UserType: + description: The type of the user + enum: + - API + - CONSOLE + type: string + ConsoleUser: + example: + firstName: firstName + lastName: lastName + role: null + id: id + userType: null + email: email + enabled: true + status: null + properties: + id: + description: The unique identifier of the user + type: string + firstName: + description: The first name of the user + type: string + lastName: + description: The last name of the user + type: string + email: + description: The email address of the user + type: string + role: + $ref: '#/components/schemas/UserRole' + enabled: + description: Whether the user is enabled + type: boolean + status: + $ref: '#/components/schemas/UserStatus' + userType: + $ref: '#/components/schemas/UserType' + type: object + ConsoleUsers: + items: + $ref: '#/components/schemas/ConsoleUser' + type: array + GetConsoleUsersResponse: + example: + users: + - firstName: firstName + lastName: lastName + role: null + id: id + userType: null + email: email + enabled: true + status: null + - firstName: firstName + lastName: lastName + role: null + id: id + userType: null + email: email + enabled: true + status: null + properties: + users: + items: + $ref: '#/components/schemas/ConsoleUser' + type: array + required: + - users + type: object CreateConsoleUser: example: firstName: firstName @@ -17577,6 +19180,58 @@ components: - lastName - role type: object + APIUser: + example: + role: null + name: name + id: id + userType: null + enabled: true + status: null + properties: + id: + description: The unique identifier of the user + type: string + name: + description: The name of the user + type: string + role: + $ref: '#/components/schemas/UserRole' + enabled: + description: Whether the user is enabled + type: boolean + status: + $ref: '#/components/schemas/UserStatus' + userType: + $ref: '#/components/schemas/UserType' + type: object + APIUsers: + items: + $ref: '#/components/schemas/APIUser' + type: array + GetAPIUsersResponse: + example: + users: + - role: null + name: name + id: id + userType: null + enabled: true + status: null + - role: null + name: name + id: id + userType: null + enabled: true + status: null + properties: + users: + items: + $ref: '#/components/schemas/APIUser' + type: array + required: + - users + type: object CreateAPIUser: example: role: role @@ -17604,6 +19259,23 @@ components: - name - role type: object + GetWhitelistIpAddressesResponse: + example: + whitelistedIps: + - whitelistedIps + - whitelistedIps + userId: userId + properties: + userId: + description: The ID of the user + type: string + whitelistedIps: + description: List of whitelisted ip addresses + items: + type: string + nullable: true + type: array + type: object SmartTransferTicketTerm: description: Data object with result data example: @@ -18775,43 +20447,15 @@ components: description: Query value to the before page type: string type: object - NetworkConnectionRoutingPolicy_crypto: - oneOf: - - $ref: '#/components/schemas/CustomCryptoRoutingDest' - - $ref: '#/components/schemas/DefaultNetworkRoutingDest' - - $ref: '#/components/schemas/NoneNetworkRoutingDest' - NetworkConnectionRoutingPolicy_sen: - oneOf: - - $ref: '#/components/schemas/CustomFiatRoutingDest' - - $ref: '#/components/schemas/DefaultNetworkRoutingDest' - - $ref: '#/components/schemas/NoneNetworkRoutingDest' - NetworkConnectionRoutingPolicy_signet: - oneOf: - - $ref: '#/components/schemas/DefaultNetworkRoutingDest' - - $ref: '#/components/schemas/CustomFiatRoutingDest' - - $ref: '#/components/schemas/NoneNetworkRoutingDest' - NetworkConnectionRoutingPolicy_sen_test: - oneOf: - - $ref: '#/components/schemas/DefaultNetworkRoutingDest' - - $ref: '#/components/schemas/NoneNetworkRoutingDest' - - $ref: '#/components/schemas/CustomFiatRoutingDest' - NetworkConnectionRoutingPolicy_signet_test: + NetworkConnectionRoutingPolicy_value: oneOf: - - $ref: '#/components/schemas/NoneNetworkRoutingDest' - - $ref: '#/components/schemas/CustomFiatRoutingDest' + - $ref: '#/components/schemas/CustomRoutingDest' - $ref: '#/components/schemas/DefaultNetworkRoutingDest' - NetworkIdRoutingPolicy_crypto: - oneOf: - - $ref: '#/components/schemas/CustomCryptoRoutingDest' - - $ref: '#/components/schemas/NoneNetworkRoutingDest' - NetworkIdRoutingPolicy_sen: - oneOf: - - $ref: '#/components/schemas/CustomFiatRoutingDest' - $ref: '#/components/schemas/NoneNetworkRoutingDest' - NetworkIdRoutingPolicy_sen_test: + NetworkIdRoutingPolicy_value: oneOf: + - $ref: '#/components/schemas/CustomRoutingDest' - $ref: '#/components/schemas/NoneNetworkRoutingDest' - - $ref: '#/components/schemas/CustomFiatRoutingDest' AddAssetToExternalWalletRequest_oneOf: example: address: address @@ -18917,6 +20561,60 @@ components: required: - additionalInfo type: object + AssetResponse_onchain: + example: + standard: ERC20 + symbol: TST3 + address: 0xe7A9as1oa38bc4da0248s179E30aa94CcF453991 + decimals: 18 + name: Test 3 + properties: + symbol: + description: The asset symbol + example: TST3 + type: string + name: + description: The asset name + example: Test 3 + type: string + address: + description: The asset address + example: 0xe7A9as1oa38bc4da0248s179E30aa94CcF453991 + type: string + decimals: + description: Number of decimals + example: 18 + type: number + standard: + description: The asset standard + example: ERC20 + type: string + required: + - decimals + - name + - standard + - symbol + type: object + AssetResponse_metadata: + example: + scope: Global + deprecated: false + properties: + scope: + description: The scope of the asset + enum: + - Global + - Local + example: Global + type: string + deprecated: + description: Is asset deprecated + example: false + type: boolean + required: + - deprecated + - scope + type: object SignedMessage_signature: example: r: r @@ -19045,6 +20743,88 @@ components: - message - type type: object + ConversionOperationExecutionParams_executionParams: + properties: + amount: + type: string + accountId: + type: string + srcAssetId: + type: string + destAssetId: + type: string + slippageBasisPoints: + maximum: 10000 + minimum: 0 + type: integer + type: object + TransferOperationExecutionParams_executionParams: + properties: + amount: + type: string + assetId: + type: string + source: + $ref: '#/components/schemas/Account' + destination: + $ref: '#/components/schemas/Destination' + type: object + DisbursementOperationExecutionParams_executionParams: + properties: + amount: + type: string + paymentAccount: + $ref: '#/components/schemas/Account' + instructionSet: + items: + $ref: '#/components/schemas/DisbursementInstruction' + type: array + type: object + CreateWorkflowExecutionRequest_params_inner: + anyOf: + - $ref: '#/components/schemas/ConversionOperationExecutionParams' + - $ref: '#/components/schemas/TransferOperationExecutionParams' + - $ref: '#/components/schemas/DisbursementOperationExecutionParams' + ScreeningVerdict_matchedRule: + properties: + action: + type: string + category: + items: + type: string + type: array + type: object + TransferOperationFailure_data: + properties: + txId: + type: string + txStatus: + type: string + txSubStatus: + type: string + required: + - txId + - txStatus + type: object + DisbursementOperationPreviewOutput_instructionSet_inner: + allOf: + - $ref: '#/components/schemas/DisbursementInstructionOutput' + - properties: + timeSeconds: + type: number + required: + - timeSeconds + type: object + SetOtaStatusResponse_oneOf: + example: + message: No change needed. The current status is false + properties: + message: + description: Message indicating the result of the operation for example + when no config change is needed + example: No change needed. The current status is false + type: string + type: object SrcOrDestAttributes_inner: anyOf: - $ref: '#/components/schemas/PolicySrcOrDestId' diff --git a/build.gradle b/build.gradle index fa82b0b..1762a0d 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'eclipse' apply plugin: 'com.diffplug.spotless' group = 'com.fireblocks.sdk' -version = '1.6.2' +version = '1.0.0' buildscript { repositories { diff --git a/docs/APIUser.md b/docs/APIUser.md new file mode 100644 index 0000000..45e9c87 --- /dev/null +++ b/docs/APIUser.md @@ -0,0 +1,18 @@ + + +# APIUser + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The unique identifier of the user | [optional] | +|**name** | **String** | The name of the user | [optional] | +|**role** | **UserRole** | | [optional] | +|**enabled** | **Boolean** | Whether the user is enabled | [optional] | +|**status** | **UserStatus** | | [optional] | +|**userType** | **UserType** | | [optional] | + + + diff --git a/docs/Account.md b/docs/Account.md new file mode 100644 index 0000000..052ba77 --- /dev/null +++ b/docs/Account.md @@ -0,0 +1,14 @@ + + +# Account + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accountId** | **String** | | | +|**accountType** | **AccountType** | | | + + + diff --git a/docs/AccountType.md b/docs/AccountType.md new file mode 100644 index 0000000..9aa4ffa --- /dev/null +++ b/docs/AccountType.md @@ -0,0 +1,19 @@ + + +# AccountType + +## Enum + + +* `EXCHANGE_ACCOUNT` (value: `"EXCHANGE_ACCOUNT"`) + +* `UNMANAGED_WALLET` (value: `"UNMANAGED_WALLET"`) + +* `VAULT_ACCOUNT` (value: `"VAULT_ACCOUNT"`) + +* `NETWORK_CONNECTION` (value: `"NETWORK_CONNECTION"`) + +* `FIAT_ACCOUNT` (value: `"FIAT_ACCOUNT"`) + + + diff --git a/docs/AdminQuorumApi.md b/docs/AdminQuorumApi.md deleted file mode 100644 index 1ae8e70..0000000 --- a/docs/AdminQuorumApi.md +++ /dev/null @@ -1,88 +0,0 @@ -# AdminQuorumApi - -All URIs are relative to *https://api.fireblocks.io/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**setAdminQuorumThreshold**](AdminQuorumApi.md#setAdminQuorumThreshold) | **PUT** /admin_quorum | Update admin quorum threshold | - - - -## setAdminQuorumThreshold - -> CompletableFuture> setAdminQuorumThreshold setAdminQuorumThreshold(setAdminQuorumThresholdRequest, idempotencyKey) - -Update admin quorum threshold - -Update admin quorum threshold - -### Example - -```java -// Import classes: -import com.fireblocks.sdk.ApiClient; -import com.fireblocks.sdk.ApiException; -import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; -import com.fireblocks.sdk.api.AdminQuorumApi; -import java.util.concurrent.CompletableFuture; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); - - AdminQuorumApi apiInstance = new AdminQuorumApi(defaultClient); - SetAdminQuorumThresholdRequest setAdminQuorumThresholdRequest = new SetAdminQuorumThresholdRequest(); // SetAdminQuorumThresholdRequest | - 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 = apiInstance.setAdminQuorumThreshold(setAdminQuorumThresholdRequest, idempotencyKey); - System.out.println("Status code: " + response.get().getStatusCode()); - System.out.println("Response headers: " + response.get().getHeaders()); - } catch (InterruptedException | ExecutionException e) { - ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling AdminQuorumApi#setAdminQuorumThreshold"); - System.err.println("Status code: " + apiException.getCode()); - System.err.println("Response headers: " + apiException.getResponseHeaders()); - System.err.println("Reason: " + apiException.getResponseBody()); - e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling AdminQuorumApi#setAdminQuorumThreshold"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **setAdminQuorumThresholdRequest** | [**SetAdminQuorumThresholdRequest**](SetAdminQuorumThresholdRequest.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 | -|-------------|-------------|------------------| -| **200** | OK | * X-Request-ID -
| -| **0** | Error Response | * X-Request-ID -
| - diff --git a/docs/ApiUserApi.md b/docs/ApiUserApi.md index 2b0b7fd..ff14983 100644 --- a/docs/ApiUserApi.md +++ b/docs/ApiUserApi.md @@ -1,6 +1,6 @@ # ApiUserApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -24,21 +24,26 @@ creates api user import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ApiUserApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ApiUserApi apiInstance = new ApiUserApi(defaultClient); CreateAPIUser createAPIUser = new CreateAPIUser(); // CreateAPIUser | 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 = apiInstance.createApiUser(createAPIUser, idempotencyKey); + CompletableFuture> response = fireblocks.apiUser().createApiUser(createAPIUser, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -84,7 +89,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | User sent for creation | * X-Request-ID -
| +| **200** | User sent for creation | * X-Request-ID -
| | **401** | Unauthorized. Missing / invalid JWT token in Authorization header. | * X-Request-ID -
| | **403** | Lacking permissions. | * X-Request-ID -
| | **5XX** | Internal error. | * X-Request-ID -
| @@ -93,7 +98,7 @@ No authorization required ## getApiUsers -> CompletableFuture> getApiUsers getApiUsers() +> CompletableFuture> getApiUsers getApiUsers() get api users @@ -106,21 +111,27 @@ get api users from the current tenant import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ApiUserApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ApiUserApi apiInstance = new ApiUserApi(defaultClient); try { - CompletableFuture> response = apiInstance.getApiUsers(); + CompletableFuture> response = fireblocks.apiUser().getApiUsers(); 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 ApiUserApi#getApiUsers"); @@ -145,8 +156,8 @@ This endpoint does not need any parameter. ### Return type +CompletableFuture> -CompletableFuture> ### Authorization diff --git a/docs/AssetAmount.md b/docs/AssetAmount.md new file mode 100644 index 0000000..4f440e2 --- /dev/null +++ b/docs/AssetAmount.md @@ -0,0 +1,14 @@ + + +# AssetAmount + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**amount** | **String** | | | +|**assetId** | **String** | | | + + + diff --git a/docs/AssetBadRequestErrorResponse.md b/docs/AssetBadRequestErrorResponse.md new file mode 100644 index 0000000..79f8731 --- /dev/null +++ b/docs/AssetBadRequestErrorResponse.md @@ -0,0 +1,14 @@ + + +# AssetBadRequestErrorResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | Bad request error code | | +|**code** | **String** | Error code | | + + + diff --git a/docs/AssetConflictErrorResponse.md b/docs/AssetConflictErrorResponse.md new file mode 100644 index 0000000..063daa0 --- /dev/null +++ b/docs/AssetConflictErrorResponse.md @@ -0,0 +1,14 @@ + + +# AssetConflictErrorResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | Conflict error code | | +|**code** | **String** | Error code | | + + + diff --git a/docs/AssetInternalServerErrorResponse.md b/docs/AssetInternalServerErrorResponse.md new file mode 100644 index 0000000..f1ddcb6 --- /dev/null +++ b/docs/AssetInternalServerErrorResponse.md @@ -0,0 +1,14 @@ + + +# AssetInternalServerErrorResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | Internal server error code | | +|**code** | **String** | Error code | | + + + diff --git a/docs/AssetNotFoundErrorResponse.md b/docs/AssetNotFoundErrorResponse.md new file mode 100644 index 0000000..de220c6 --- /dev/null +++ b/docs/AssetNotFoundErrorResponse.md @@ -0,0 +1,14 @@ + + +# AssetNotFoundErrorResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | Not found error code | | +|**code** | **String** | Error code | | + + + diff --git a/docs/AssetResponse.md b/docs/AssetResponse.md new file mode 100644 index 0000000..7142e69 --- /dev/null +++ b/docs/AssetResponse.md @@ -0,0 +1,27 @@ + + +# AssetResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**legacyId** | **String** | | | +|**assetClass** | [**AssetClassEnum**](#AssetClassEnum) | | | +|**onchain** | [**AssetResponseOnchain**](AssetResponseOnchain.md) | | | +|**metadata** | [**AssetResponseMetadata**](AssetResponseMetadata.md) | | | + + + +## Enum: AssetClassEnum + +| Name | Value | +|---- | -----| +| NATIVE | "NATIVE" | +| FT | "FT" | +| NFT | "NFT" | +| SFT | "SFT" | + + + diff --git a/docs/AssetResponseMetadata.md b/docs/AssetResponseMetadata.md new file mode 100644 index 0000000..f9cd177 --- /dev/null +++ b/docs/AssetResponseMetadata.md @@ -0,0 +1,23 @@ + + +# AssetResponseMetadata + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**scope** | [**ScopeEnum**](#ScopeEnum) | The scope of the asset | | +|**deprecated** | **Boolean** | Is asset deprecated | | + + + +## Enum: ScopeEnum + +| Name | Value | +|---- | -----| +| GLOBAL | "Global" | +| LOCAL | "Local" | + + + diff --git a/docs/AssetResponseOnchain.md b/docs/AssetResponseOnchain.md new file mode 100644 index 0000000..d963320 --- /dev/null +++ b/docs/AssetResponseOnchain.md @@ -0,0 +1,17 @@ + + +# AssetResponseOnchain + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**symbol** | **String** | The asset symbol | | +|**name** | **String** | The asset name | | +|**address** | **String** | The asset address | [optional] | +|**decimals** | **BigDecimal** | Number of decimals | | +|**standard** | **String** | The asset standard | | + + + diff --git a/docs/AssetsApi.md b/docs/AssetsApi.md index bd59d55..d040b9f 100644 --- a/docs/AssetsApi.md +++ b/docs/AssetsApi.md @@ -1,6 +1,6 @@ # AssetsApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -23,21 +23,26 @@ Create multiple wallets for a given vault account by running an async job. </ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.AssetsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - AssetsApi apiInstance = new AssetsApi(defaultClient); CreateAssetsBulkRequest createAssetsBulkRequest = new CreateAssetsBulkRequest(); // CreateAssetsBulkRequest | 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 = apiInstance.createAssetsBulk(createAssetsBulkRequest, idempotencyKey); + CompletableFuture> response = fireblocks.assets().createAssetsBulk(createAssetsBulkRequest, 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()); diff --git a/docs/AuditLogData.md b/docs/AuditLogData.md new file mode 100644 index 0000000..7642dc0 --- /dev/null +++ b/docs/AuditLogData.md @@ -0,0 +1,20 @@ + + +# AuditLogData + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The unique identifier of the audit log | [optional] | +|**timestamp** | **String** | The timestamp of the audit log | [optional] | +|**createdAt** | **String** | The timestamp of the audit log creation | [optional] | +|**user** | **String** | The user who performed the action | [optional] | +|**subject** | **String** | The subject of the action | [optional] | +|**event** | **String** | The event that was performed | [optional] | +|**tenantId** | **String** | The tenant ID of the audit log | [optional] | +|**userId** | **String** | The user ID of the audit log | [optional] | + + + diff --git a/docs/AuditLogsApi.md b/docs/AuditLogsApi.md index bdf8fb0..9666625 100644 --- a/docs/AuditLogsApi.md +++ b/docs/AuditLogsApi.md @@ -1,6 +1,6 @@ # AuditLogsApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -11,7 +11,7 @@ All URIs are relative to *https://api.fireblocks.io/v1* ## getAuditLogs -> CompletableFuture> getAuditLogs getAuditLogs(timePeriod, cursor) +> CompletableFuture> getAuditLogs getAuditLogs(timePeriod, cursor) Get audit logs @@ -24,23 +24,29 @@ Get all audits import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.AuditLogsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - AuditLogsApi apiInstance = new AuditLogsApi(defaultClient); String timePeriod = "DAY"; // String | The last time period to fetch audit logs String cursor = "cursor_example"; // String | The next id to start fetch audit logs from try { - CompletableFuture> response = apiInstance.getAuditLogs(timePeriod, cursor); + CompletableFuture> response = fireblocks.auditLogs().getAuditLogs(timePeriod, cursor); 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 AuditLogsApi#getAuditLogs"); @@ -69,8 +75,8 @@ public class Example { ### Return type +CompletableFuture> -CompletableFuture> ### Authorization @@ -103,20 +109,25 @@ Get all audits import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.AuditLogsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - AuditLogsApi apiInstance = new AuditLogsApi(defaultClient); String timePeriod = "DAY"; // String | The last time period to fetch audit logs try { - CompletableFuture> response = apiInstance.getAudits(timePeriod); + CompletableFuture> response = fireblocks.auditLogs().getAudits(timePeriod); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); diff --git a/docs/BlockchainsAssetsApi.md b/docs/BlockchainsAssetsApi.md index 73255ae..59ce410 100644 --- a/docs/BlockchainsAssetsApi.md +++ b/docs/BlockchainsAssetsApi.md @@ -1,10 +1,11 @@ # BlockchainsAssetsApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**getSupportedAssets**](BlockchainsAssetsApi.md#getSupportedAssets) | **GET** /supported_assets | List all asset types supported by Fireblocks | +| [**registerNewAsset**](BlockchainsAssetsApi.md#registerNewAsset) | **POST** /assets | Register an asset | @@ -23,19 +24,24 @@ Returns all asset types supported by Fireblocks. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.BlockchainsAssetsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - BlockchainsAssetsApi apiInstance = new BlockchainsAssetsApi(defaultClient); try { - CompletableFuture>> response = apiInstance.getSupportedAssets(); + CompletableFuture>> response = fireblocks.blockchainsAssets().getSupportedAssets(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -81,3 +87,91 @@ No authorization required | **200** | A Transaction object | * X-Request-ID -
| | **0** | Error Response | * X-Request-ID -
| + +## registerNewAsset + +> CompletableFuture> registerNewAsset registerNewAsset(registerNewAssetRequest, idempotencyKey) + +Register an asset + +Register a new asset to a workspace and return the newly created asset's details. Currently supported for EVM based chains only. + +### 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.BlockchainsAssetsApi; +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); + + RegisterNewAssetRequest registerNewAssetRequest = new RegisterNewAssetRequest(); // RegisterNewAssetRequest | + 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.blockchainsAssets().registerNewAsset(registerNewAssetRequest, 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 BlockchainsAssetsApi#registerNewAsset"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling BlockchainsAssetsApi#registerNewAsset"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **registerNewAssetRequest** | [**RegisterNewAssetRequest**](RegisterNewAssetRequest.md)| | [optional] | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | A new asset has been created successfully | - | +| **400** | - Listing an asset on the requested blockchain is not supported. Error code: 1000 - The asset address is invalid. Error code: 1004 | - | +| **404** | - Invalid address, could not get asset information. Error code 1004 | - | +| **409** | - The asset is already supported globally. Error code: 1002 - The asset has already been added to this workspace. Error code: 1003 | - | +| **500** | Failed to create asset | - | + diff --git a/docs/ComplianceApi.md b/docs/ComplianceApi.md index c426bf9..cdcb7d3 100644 --- a/docs/ComplianceApi.md +++ b/docs/ComplianceApi.md @@ -1,6 +1,6 @@ # ComplianceApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -29,19 +29,24 @@ Get the post-screening policy for AML. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ComplianceApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ComplianceApi apiInstance = new ComplianceApi(defaultClient); try { - CompletableFuture> response = apiInstance.getAmlPostScreeningPolicy(); + CompletableFuture> response = fireblocks.compliance().getAmlPostScreeningPolicy(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -102,19 +107,24 @@ Get the screening policy for AML. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ComplianceApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ComplianceApi apiInstance = new ComplianceApi(defaultClient); try { - CompletableFuture> response = apiInstance.getAmlScreeningPolicy(); + CompletableFuture> response = fireblocks.compliance().getAmlScreeningPolicy(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -175,19 +185,24 @@ Get the post-screening policy for Travel Rule. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ComplianceApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ComplianceApi apiInstance = new ComplianceApi(defaultClient); try { - CompletableFuture> response = apiInstance.getPostScreeningPolicy(); + CompletableFuture> response = fireblocks.compliance().getPostScreeningPolicy(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -248,19 +263,24 @@ Get the screening policy for Travel Rule. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ComplianceApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ComplianceApi apiInstance = new ComplianceApi(defaultClient); try { - CompletableFuture> response = apiInstance.getScreeningPolicy(); + CompletableFuture> response = fireblocks.compliance().getScreeningPolicy(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -321,20 +341,25 @@ Updates bypass screening, inbound delay, or outbound delay configurations for AM import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ComplianceApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ComplianceApi apiInstance = new ComplianceApi(defaultClient); 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 = apiInstance.updateAmlScreeningConfiguration(idempotencyKey); + CompletableFuture> response = fireblocks.compliance().updateAmlScreeningConfiguration(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()); @@ -398,20 +423,25 @@ Update tenant screening configuration. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ComplianceApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ComplianceApi apiInstance = new ComplianceApi(defaultClient); 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 = apiInstance.updateScreeningConfiguration(idempotencyKey); + CompletableFuture> response = fireblocks.compliance().updateScreeningConfiguration(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()); @@ -475,20 +505,25 @@ Updates bypass screening, inbound delay, or outbound delay configurations for Tr import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ComplianceApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ComplianceApi apiInstance = new ComplianceApi(defaultClient); 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 = apiInstance.updateTravelRuleConfig(idempotencyKey); + CompletableFuture> response = fireblocks.compliance().updateTravelRuleConfig(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()); diff --git a/docs/ComplianceScreeningConfigurationApi.md b/docs/ComplianceScreeningConfigurationApi.md index 162719d..a3c2908 100644 --- a/docs/ComplianceScreeningConfigurationApi.md +++ b/docs/ComplianceScreeningConfigurationApi.md @@ -1,6 +1,6 @@ # ComplianceScreeningConfigurationApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -24,19 +24,24 @@ Retrieves the configuration for Travel Rule screening policy. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ComplianceScreeningConfigurationApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ComplianceScreeningConfigurationApi apiInstance = new ComplianceScreeningConfigurationApi(defaultClient); try { - CompletableFuture> response = apiInstance.getAmlScreeningConfiguration(); + CompletableFuture> response = fireblocks.complianceScreeningConfiguration().getAmlScreeningConfiguration(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -97,19 +102,24 @@ Retrieves the configuration for Travel Rule screening policy. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ComplianceScreeningConfigurationApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ComplianceScreeningConfigurationApi apiInstance = new ComplianceScreeningConfigurationApi(defaultClient); try { - CompletableFuture> response = apiInstance.getScreeningConfiguration(); + CompletableFuture> response = fireblocks.complianceScreeningConfiguration().getScreeningConfiguration(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); diff --git a/docs/ConfigConversionOperationSnapshot.md b/docs/ConfigConversionOperationSnapshot.md new file mode 100644 index 0000000..eba49f6 --- /dev/null +++ b/docs/ConfigConversionOperationSnapshot.md @@ -0,0 +1,15 @@ + + +# ConfigConversionOperationSnapshot + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**operationId** | **String** | | | +|**type** | **ConversionOperationType** | | | +|**params** | [**ConversionOperationConfigParams**](ConversionOperationConfigParams.md) | | | + + + diff --git a/docs/ConfigDisbursementOperationSnapshot.md b/docs/ConfigDisbursementOperationSnapshot.md new file mode 100644 index 0000000..1da6057 --- /dev/null +++ b/docs/ConfigDisbursementOperationSnapshot.md @@ -0,0 +1,15 @@ + + +# ConfigDisbursementOperationSnapshot + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**operationId** | **String** | | | +|**type** | **DisbursementOperationType** | | | +|**params** | [**DisbursementOperationConfigParams**](DisbursementOperationConfigParams.md) | | | + + + diff --git a/docs/ConfigOperation.md b/docs/ConfigOperation.md new file mode 100644 index 0000000..2b64c58 --- /dev/null +++ b/docs/ConfigOperation.md @@ -0,0 +1,46 @@ + + +# ConfigOperation + +## oneOf schemas +* [ConversionConfigOperation](ConversionConfigOperation.md) +* [DisbursementConfigOperation](DisbursementConfigOperation.md) +* [TransferConfigOperation](TransferConfigOperation.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.ConfigOperation; +import com.fireblocks.sdk.model.ConversionConfigOperation; +import com.fireblocks.sdk.model.DisbursementConfigOperation; +import com.fireblocks.sdk.model.TransferConfigOperation; + +public class Example { + public static void main(String[] args) { + ConfigOperation exampleConfigOperation = new ConfigOperation(); + + // create a new ConversionConfigOperation + ConversionConfigOperation exampleConversionConfigOperation = new ConversionConfigOperation(); + // set ConfigOperation to ConversionConfigOperation + exampleConfigOperation.setActualInstance(exampleConversionConfigOperation); + // to get back the ConversionConfigOperation set earlier + ConversionConfigOperation testConversionConfigOperation = (ConversionConfigOperation) exampleConfigOperation.getActualInstance(); + + // create a new DisbursementConfigOperation + DisbursementConfigOperation exampleDisbursementConfigOperation = new DisbursementConfigOperation(); + // set ConfigOperation to DisbursementConfigOperation + exampleConfigOperation.setActualInstance(exampleDisbursementConfigOperation); + // to get back the DisbursementConfigOperation set earlier + DisbursementConfigOperation testDisbursementConfigOperation = (DisbursementConfigOperation) exampleConfigOperation.getActualInstance(); + + // create a new TransferConfigOperation + TransferConfigOperation exampleTransferConfigOperation = new TransferConfigOperation(); + // set ConfigOperation to TransferConfigOperation + exampleConfigOperation.setActualInstance(exampleTransferConfigOperation); + // to get back the TransferConfigOperation set earlier + TransferConfigOperation testTransferConfigOperation = (TransferConfigOperation) exampleConfigOperation.getActualInstance(); + } +} +``` + + diff --git a/docs/ConfigOperationSnapshot.md b/docs/ConfigOperationSnapshot.md new file mode 100644 index 0000000..ce97916 --- /dev/null +++ b/docs/ConfigOperationSnapshot.md @@ -0,0 +1,46 @@ + + +# ConfigOperationSnapshot + +## oneOf schemas +* [ConfigConversionOperationSnapshot](ConfigConversionOperationSnapshot.md) +* [ConfigDisbursementOperationSnapshot](ConfigDisbursementOperationSnapshot.md) +* [ConfigTransferOperationSnapshot](ConfigTransferOperationSnapshot.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.ConfigOperationSnapshot; +import com.fireblocks.sdk.model.ConfigConversionOperationSnapshot; +import com.fireblocks.sdk.model.ConfigDisbursementOperationSnapshot; +import com.fireblocks.sdk.model.ConfigTransferOperationSnapshot; + +public class Example { + public static void main(String[] args) { + ConfigOperationSnapshot exampleConfigOperationSnapshot = new ConfigOperationSnapshot(); + + // create a new ConfigConversionOperationSnapshot + ConfigConversionOperationSnapshot exampleConfigConversionOperationSnapshot = new ConfigConversionOperationSnapshot(); + // set ConfigOperationSnapshot to ConfigConversionOperationSnapshot + exampleConfigOperationSnapshot.setActualInstance(exampleConfigConversionOperationSnapshot); + // to get back the ConfigConversionOperationSnapshot set earlier + ConfigConversionOperationSnapshot testConfigConversionOperationSnapshot = (ConfigConversionOperationSnapshot) exampleConfigOperationSnapshot.getActualInstance(); + + // create a new ConfigDisbursementOperationSnapshot + ConfigDisbursementOperationSnapshot exampleConfigDisbursementOperationSnapshot = new ConfigDisbursementOperationSnapshot(); + // set ConfigOperationSnapshot to ConfigDisbursementOperationSnapshot + exampleConfigOperationSnapshot.setActualInstance(exampleConfigDisbursementOperationSnapshot); + // to get back the ConfigDisbursementOperationSnapshot set earlier + ConfigDisbursementOperationSnapshot testConfigDisbursementOperationSnapshot = (ConfigDisbursementOperationSnapshot) exampleConfigOperationSnapshot.getActualInstance(); + + // create a new ConfigTransferOperationSnapshot + ConfigTransferOperationSnapshot exampleConfigTransferOperationSnapshot = new ConfigTransferOperationSnapshot(); + // set ConfigOperationSnapshot to ConfigTransferOperationSnapshot + exampleConfigOperationSnapshot.setActualInstance(exampleConfigTransferOperationSnapshot); + // to get back the ConfigTransferOperationSnapshot set earlier + ConfigTransferOperationSnapshot testConfigTransferOperationSnapshot = (ConfigTransferOperationSnapshot) exampleConfigOperationSnapshot.getActualInstance(); + } +} +``` + + diff --git a/docs/ConfigOperationStatus.md b/docs/ConfigOperationStatus.md new file mode 100644 index 0000000..fc39e21 --- /dev/null +++ b/docs/ConfigOperationStatus.md @@ -0,0 +1,17 @@ + + +# ConfigOperationStatus + +## Enum + + +* `PENDING` (value: `"PENDING"`) + +* `VALIDATION_IN_PROGRESS` (value: `"VALIDATION_IN_PROGRESS"`) + +* `READY_FOR_EXECUTION` (value: `"READY_FOR_EXECUTION"`) + +* `VALIDATION_FAILED` (value: `"VALIDATION_FAILED"`) + + + diff --git a/docs/ConfigTransferOperationSnapshot.md b/docs/ConfigTransferOperationSnapshot.md new file mode 100644 index 0000000..06fdd1e --- /dev/null +++ b/docs/ConfigTransferOperationSnapshot.md @@ -0,0 +1,15 @@ + + +# ConfigTransferOperationSnapshot + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**operationId** | **String** | | | +|**type** | **TransferOperationType** | | | +|**params** | [**TransferOperationConfigParams**](TransferOperationConfigParams.md) | | | + + + diff --git a/docs/ConsoleUser.md b/docs/ConsoleUser.md new file mode 100644 index 0000000..1f3a2cf --- /dev/null +++ b/docs/ConsoleUser.md @@ -0,0 +1,20 @@ + + +# ConsoleUser + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The unique identifier of the user | [optional] | +|**firstName** | **String** | The first name of the user | [optional] | +|**lastName** | **String** | The last name of the user | [optional] | +|**email** | **String** | The email address of the user | [optional] | +|**role** | **UserRole** | | [optional] | +|**enabled** | **Boolean** | Whether the user is enabled | [optional] | +|**status** | **UserStatus** | | [optional] | +|**userType** | **UserType** | | [optional] | + + + diff --git a/docs/ConsoleUserApi.md b/docs/ConsoleUserApi.md index cb552bb..b18df61 100644 --- a/docs/ConsoleUserApi.md +++ b/docs/ConsoleUserApi.md @@ -1,6 +1,6 @@ # ConsoleUserApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -24,21 +24,26 @@ creates fireblocks console user import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ConsoleUserApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ConsoleUserApi apiInstance = new ConsoleUserApi(defaultClient); CreateConsoleUser createConsoleUser = new CreateConsoleUser(); // CreateConsoleUser | 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 = apiInstance.createConsoleUser(createConsoleUser, idempotencyKey); + CompletableFuture> response = fireblocks.consoleUser().createConsoleUser(createConsoleUser, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -84,7 +89,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | Users sent for creation | * X-Request-ID -
| +| **200** | Users sent for creation | * X-Request-ID -
| | **400** | bad request | * X-Request-ID -
| | **401** | Unauthorized. Missing / invalid JWT token in Authorization header. | * X-Request-ID -
| | **403** | Lacking permissions. | * X-Request-ID -
| @@ -94,7 +99,7 @@ No authorization required ## getConsoleUsers -> CompletableFuture> getConsoleUsers getConsoleUsers() +> CompletableFuture> getConsoleUsers getConsoleUsers() get console users @@ -107,21 +112,27 @@ get console users from the current tenant import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ConsoleUserApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ConsoleUserApi apiInstance = new ConsoleUserApi(defaultClient); try { - CompletableFuture> response = apiInstance.getConsoleUsers(); + CompletableFuture> response = fireblocks.consoleUser().getConsoleUsers(); 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 ConsoleUserApi#getConsoleUsers"); @@ -146,8 +157,8 @@ This endpoint does not need any parameter. ### Return type +CompletableFuture> -CompletableFuture> ### Authorization diff --git a/docs/ContractsApi.md b/docs/ContractsApi.md index 10b09ca..3760647 100644 --- a/docs/ContractsApi.md +++ b/docs/ContractsApi.md @@ -1,6 +1,6 @@ # ContractsApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -29,23 +29,28 @@ Adds an asset to an existing contract. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ContractsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ContractsApi apiInstance = new ContractsApi(defaultClient); String contractId = "contractId_example"; // String | The ID of the contract String assetId = "assetId_example"; // String | The ID of the asset to add AddContractAssetRequest addContractAssetRequest = new AddContractAssetRequest(); // AddContractAssetRequest | 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 = apiInstance.addContractAsset(contractId, assetId, addContractAssetRequest, idempotencyKey); + CompletableFuture> response = fireblocks.contracts().addContractAsset(contractId, assetId, addContractAssetRequest, 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()); @@ -113,21 +118,26 @@ Creates a new contract. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ContractsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ContractsApi apiInstance = new ContractsApi(defaultClient); CreateContractRequest createContractRequest = new CreateContractRequest(); // CreateContractRequest | 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 = apiInstance.createContract(createContractRequest, idempotencyKey); + CompletableFuture> response = fireblocks.contracts().createContract(createContractRequest, 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()); @@ -193,20 +203,25 @@ Deletes a contract by ID. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ContractsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ContractsApi apiInstance = new ContractsApi(defaultClient); String contractId = "contractId_example"; // String | The ID of the contract to delete try { - CompletableFuture> response = apiInstance.deleteContract(contractId); + CompletableFuture> response = fireblocks.contracts().deleteContract(contractId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -270,21 +285,26 @@ Deletes a contract asset by ID. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ContractsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ContractsApi apiInstance = new ContractsApi(defaultClient); String contractId = "contractId_example"; // String | The ID of the contract String assetId = "assetId_example"; // String | The ID of the asset to delete try { - CompletableFuture> response = apiInstance.deleteContractAsset(contractId, assetId); + CompletableFuture> response = fireblocks.contracts().deleteContractAsset(contractId, assetId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -349,20 +369,25 @@ Returns a contract by ID. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ContractsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ContractsApi apiInstance = new ContractsApi(defaultClient); String contractId = "contractId_example"; // String | The ID of the contract to return try { - CompletableFuture> response = apiInstance.getContract(contractId); + CompletableFuture> response = fireblocks.contracts().getContract(contractId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -427,21 +452,26 @@ Returns a contract asset by ID. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ContractsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ContractsApi apiInstance = new ContractsApi(defaultClient); String contractId = "contractId_example"; // String | The ID of the contract String assetId = "assetId_example"; // String | The ID of the asset to return try { - CompletableFuture> response = apiInstance.getContractAsset(contractId, assetId); + CompletableFuture> response = fireblocks.contracts().getContractAsset(contractId, assetId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -507,19 +537,24 @@ Gets a list of contracts. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ContractsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ContractsApi apiInstance = new ContractsApi(defaultClient); try { - CompletableFuture>> response = apiInstance.getContracts(); + CompletableFuture>> response = fireblocks.contracts().getContracts(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); diff --git a/docs/ConversionConfigOperation.md b/docs/ConversionConfigOperation.md new file mode 100644 index 0000000..8e62bbc --- /dev/null +++ b/docs/ConversionConfigOperation.md @@ -0,0 +1,17 @@ + + +# ConversionConfigOperation + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**operationId** | **String** | | | +|**type** | **ConversionOperationType** | | | +|**params** | [**ConversionOperationConfigParams**](ConversionOperationConfigParams.md) | | | +|**status** | **ConfigOperationStatus** | | | +|**validationFailure** | [**ConversionValidationFailure**](ConversionValidationFailure.md) | | [optional] | + + + diff --git a/docs/ConversionOperationConfigParams.md b/docs/ConversionOperationConfigParams.md new file mode 100644 index 0000000..49a96e2 --- /dev/null +++ b/docs/ConversionOperationConfigParams.md @@ -0,0 +1,17 @@ + + +# ConversionOperationConfigParams + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**amount** | **String** | | [optional] | +|**accountId** | **String** | | [optional] | +|**srcAssetId** | **String** | | [optional] | +|**destAssetId** | **String** | | | +|**slippageBasisPoints** | **Integer** | | [optional] | + + + diff --git a/docs/ConversionOperationExecution.md b/docs/ConversionOperationExecution.md new file mode 100644 index 0000000..1a6fdb8 --- /dev/null +++ b/docs/ConversionOperationExecution.md @@ -0,0 +1,17 @@ + + +# ConversionOperationExecution + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**input** | [**ConversionOperationConfigParams**](ConversionOperationConfigParams.md) | | | +|**output** | [**ConversionOperationExecutionOutput**](ConversionOperationExecutionOutput.md) | | [optional] | +|**startedAt** | **BigDecimal** | | | +|**finishedAt** | **BigDecimal** | | [optional] | +|**failure** | [**ConversionOperationFailure**](ConversionOperationFailure.md) | | [optional] | + + + diff --git a/docs/ConversionOperationExecutionOutput.md b/docs/ConversionOperationExecutionOutput.md new file mode 100644 index 0000000..980c8f7 --- /dev/null +++ b/docs/ConversionOperationExecutionOutput.md @@ -0,0 +1,15 @@ + + +# ConversionOperationExecutionOutput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**amount** | [**AssetAmount**](AssetAmount.md) | | | +|**fee** | [**AssetAmount**](AssetAmount.md) | | | +|**conversionRate** | **String** | | | + + + diff --git a/docs/ConversionOperationExecutionParams.md b/docs/ConversionOperationExecutionParams.md new file mode 100644 index 0000000..1791620 --- /dev/null +++ b/docs/ConversionOperationExecutionParams.md @@ -0,0 +1,14 @@ + + +# ConversionOperationExecutionParams + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**configOperationId** | **String** | | | +|**executionParams** | [**ConversionOperationExecutionParamsExecutionParams**](ConversionOperationExecutionParamsExecutionParams.md) | | [optional] | + + + diff --git a/docs/ConversionOperationExecutionParamsExecutionParams.md b/docs/ConversionOperationExecutionParamsExecutionParams.md new file mode 100644 index 0000000..5cc16d8 --- /dev/null +++ b/docs/ConversionOperationExecutionParamsExecutionParams.md @@ -0,0 +1,17 @@ + + +# ConversionOperationExecutionParamsExecutionParams + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**amount** | **String** | | [optional] | +|**accountId** | **String** | | [optional] | +|**srcAssetId** | **String** | | [optional] | +|**destAssetId** | **String** | | [optional] | +|**slippageBasisPoints** | **Integer** | | [optional] | + + + diff --git a/docs/ConversionOperationFailure.md b/docs/ConversionOperationFailure.md new file mode 100644 index 0000000..e093253 --- /dev/null +++ b/docs/ConversionOperationFailure.md @@ -0,0 +1,25 @@ + + +# ConversionOperationFailure + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**reason** | [**ReasonEnum**](#ReasonEnum) | | | +|**data** | **Map<String, Object>** | | [optional] | + + + +## Enum: ReasonEnum + +| Name | Value | +|---- | -----| +| INVALID_AMOUNT | "INVALID_AMOUNT" | +| SLIPPAGE_EXCEEDED | "SLIPPAGE_EXCEEDED" | +| AMOUNT_TOO_SMALL | "AMOUNT_TOO_SMALL" | +| INSUFFICIENT_FUNDS | "INSUFFICIENT_FUNDS" | + + + diff --git a/docs/ConversionOperationPreview.md b/docs/ConversionOperationPreview.md new file mode 100644 index 0000000..758d784 --- /dev/null +++ b/docs/ConversionOperationPreview.md @@ -0,0 +1,15 @@ + + +# ConversionOperationPreview + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**input** | [**ConversionOperationConfigParams**](ConversionOperationConfigParams.md) | | | +|**output** | [**ConversionOperationPreviewOutput**](ConversionOperationPreviewOutput.md) | | [optional] | +|**failure** | [**ConversionOperationFailure**](ConversionOperationFailure.md) | | [optional] | + + + diff --git a/docs/ConversionOperationPreviewOutput.md b/docs/ConversionOperationPreviewOutput.md new file mode 100644 index 0000000..790a922 --- /dev/null +++ b/docs/ConversionOperationPreviewOutput.md @@ -0,0 +1,16 @@ + + +# ConversionOperationPreviewOutput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**amount** | [**AssetAmount**](AssetAmount.md) | | | +|**fee** | [**AssetAmount**](AssetAmount.md) | | | +|**conversionRate** | **String** | | | +|**timeSeconds** | **BigDecimal** | | | + + + diff --git a/docs/ConversionOperationType.md b/docs/ConversionOperationType.md new file mode 100644 index 0000000..6a98313 --- /dev/null +++ b/docs/ConversionOperationType.md @@ -0,0 +1,11 @@ + + +# ConversionOperationType + +## Enum + + +* `CONVERSION` (value: `"CONVERSION"`) + + + diff --git a/docs/ConversionValidationFailure.md b/docs/ConversionValidationFailure.md new file mode 100644 index 0000000..09ede5b --- /dev/null +++ b/docs/ConversionValidationFailure.md @@ -0,0 +1,37 @@ + + +# ConversionValidationFailure + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**reason** | [**ReasonEnum**](#ReasonEnum) | | | +|**data** | **Map<String, Object>** | | [optional] | + + + +## Enum: ReasonEnum + +| Name | Value | +|---- | -----| +| ACCOUNT_NOT_FOUND | "ACCOUNT_NOT_FOUND" | +| ACCOUNT_TYPE_NOT_SUPPORTED | "ACCOUNT_TYPE_NOT_SUPPORTED" | +| INSUFFICIENT_BALANCE | "INSUFFICIENT_BALANCE" | +| ASSET_NOT_FOUND | "ASSET_NOT_FOUND" | +| ASSETS_CONTINUITY_MISMATCH | "ASSETS_CONTINUITY_MISMATCH" | +| EXCHANGE_BASKETS_MISMATCH | "EXCHANGE_BASKETS_MISMATCH" | +| ACCOUNTS_CONTINUITY_MISMATCH | "ACCOUNTS_CONTINUITY_MISMATCH" | +| ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED | "ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED" | +| EQUAL_ACCOUNTS_NOT_ALLOWED | "EQUAL_ACCOUNTS_NOT_ALLOWED" | +| EQUAL_ASSETS_NOT_ALLOWED | "EQUAL_ASSETS_NOT_ALLOWED" | +| INVALID_AMOUNT | "INVALID_AMOUNT" | +| UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED | "UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED" | +| MANAGED_OPERATION_PARAMS_INVALID_SCHEMA | "MANAGED_OPERATION_PARAMS_INVALID_SCHEMA" | +| ACCOUNT_IS_NOT_EXCHANGE | "ACCOUNT_IS_NOT_EXCHANGE" | +| UNSUPPORTED_TRADING_METHOD | "UNSUPPORTED_TRADING_METHOD" | +| ASSETS_CAN_NOT_CONVERTED | "ASSETS_CAN_NOT_CONVERTED" | + + + diff --git a/docs/ConvertAssetsResponse.md b/docs/ConvertAssetsResponse.md new file mode 100644 index 0000000..e489dc1 --- /dev/null +++ b/docs/ConvertAssetsResponse.md @@ -0,0 +1,13 @@ + + +# ConvertAssetsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**success** | **Boolean** | Indicates whether the conversion was successful | | + + + diff --git a/docs/CreateConfigOperationRequest.md b/docs/CreateConfigOperationRequest.md new file mode 100644 index 0000000..b99bc4d --- /dev/null +++ b/docs/CreateConfigOperationRequest.md @@ -0,0 +1,46 @@ + + +# CreateConfigOperationRequest + +## oneOf schemas +* [CreateConversionConfigOperationRequest](CreateConversionConfigOperationRequest.md) +* [CreateDisbursementConfigOperationRequest](CreateDisbursementConfigOperationRequest.md) +* [CreateTransferConfigOperationRequest](CreateTransferConfigOperationRequest.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.CreateConfigOperationRequest; +import com.fireblocks.sdk.model.CreateConversionConfigOperationRequest; +import com.fireblocks.sdk.model.CreateDisbursementConfigOperationRequest; +import com.fireblocks.sdk.model.CreateTransferConfigOperationRequest; + +public class Example { + public static void main(String[] args) { + CreateConfigOperationRequest exampleCreateConfigOperationRequest = new CreateConfigOperationRequest(); + + // create a new CreateConversionConfigOperationRequest + CreateConversionConfigOperationRequest exampleCreateConversionConfigOperationRequest = new CreateConversionConfigOperationRequest(); + // set CreateConfigOperationRequest to CreateConversionConfigOperationRequest + exampleCreateConfigOperationRequest.setActualInstance(exampleCreateConversionConfigOperationRequest); + // to get back the CreateConversionConfigOperationRequest set earlier + CreateConversionConfigOperationRequest testCreateConversionConfigOperationRequest = (CreateConversionConfigOperationRequest) exampleCreateConfigOperationRequest.getActualInstance(); + + // create a new CreateDisbursementConfigOperationRequest + CreateDisbursementConfigOperationRequest exampleCreateDisbursementConfigOperationRequest = new CreateDisbursementConfigOperationRequest(); + // set CreateConfigOperationRequest to CreateDisbursementConfigOperationRequest + exampleCreateConfigOperationRequest.setActualInstance(exampleCreateDisbursementConfigOperationRequest); + // to get back the CreateDisbursementConfigOperationRequest set earlier + CreateDisbursementConfigOperationRequest testCreateDisbursementConfigOperationRequest = (CreateDisbursementConfigOperationRequest) exampleCreateConfigOperationRequest.getActualInstance(); + + // create a new CreateTransferConfigOperationRequest + CreateTransferConfigOperationRequest exampleCreateTransferConfigOperationRequest = new CreateTransferConfigOperationRequest(); + // set CreateConfigOperationRequest to CreateTransferConfigOperationRequest + exampleCreateConfigOperationRequest.setActualInstance(exampleCreateTransferConfigOperationRequest); + // to get back the CreateTransferConfigOperationRequest set earlier + CreateTransferConfigOperationRequest testCreateTransferConfigOperationRequest = (CreateTransferConfigOperationRequest) exampleCreateConfigOperationRequest.getActualInstance(); + } +} +``` + + diff --git a/docs/CreateConversionConfigOperationRequest.md b/docs/CreateConversionConfigOperationRequest.md new file mode 100644 index 0000000..1989aec --- /dev/null +++ b/docs/CreateConversionConfigOperationRequest.md @@ -0,0 +1,14 @@ + + +# CreateConversionConfigOperationRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **ConversionOperationType** | | | +|**params** | [**ConversionOperationConfigParams**](ConversionOperationConfigParams.md) | | | + + + diff --git a/docs/CreateDisbursementConfigOperationRequest.md b/docs/CreateDisbursementConfigOperationRequest.md new file mode 100644 index 0000000..804d20c --- /dev/null +++ b/docs/CreateDisbursementConfigOperationRequest.md @@ -0,0 +1,14 @@ + + +# CreateDisbursementConfigOperationRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **DisbursementOperationType** | | | +|**params** | [**DisbursementOperationConfigParams**](DisbursementOperationConfigParams.md) | | | + + + diff --git a/docs/CreateNetworkIdRequest.md b/docs/CreateNetworkIdRequest.md index ef0026b..84f1595 100644 --- a/docs/CreateNetworkIdRequest.md +++ b/docs/CreateNetworkIdRequest.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**name** | **String** | | | -|**routingPolicy** | [**NetworkIdRoutingPolicy**](NetworkIdRoutingPolicy.md) | | [optional] | +|**routingPolicy** | [**Map<String, NetworkIdRoutingPolicyValue>**](NetworkIdRoutingPolicyValue.md) | | [optional] | diff --git a/docs/CreateTransferConfigOperationRequest.md b/docs/CreateTransferConfigOperationRequest.md new file mode 100644 index 0000000..9c641b1 --- /dev/null +++ b/docs/CreateTransferConfigOperationRequest.md @@ -0,0 +1,14 @@ + + +# CreateTransferConfigOperationRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **TransferOperationType** | | | +|**params** | [**TransferOperationConfigParams**](TransferOperationConfigParams.md) | | | + + + diff --git a/docs/CreateWorkflowExecutionRequestParamsInner.md b/docs/CreateWorkflowExecutionRequestParamsInner.md new file mode 100644 index 0000000..d319c95 --- /dev/null +++ b/docs/CreateWorkflowExecutionRequestParamsInner.md @@ -0,0 +1,46 @@ + + +# CreateWorkflowExecutionRequestParamsInner + +## anyOf schemas +* [ConversionOperationExecutionParams](ConversionOperationExecutionParams.md) +* [DisbursementOperationExecutionParams](DisbursementOperationExecutionParams.md) +* [TransferOperationExecutionParams](TransferOperationExecutionParams.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.CreateWorkflowExecutionRequestParamsInner; +import com.fireblocks.sdk.model.ConversionOperationExecutionParams; +import com.fireblocks.sdk.model.DisbursementOperationExecutionParams; +import com.fireblocks.sdk.model.TransferOperationExecutionParams; + +public class Example { + public static void main(String[] args) { + CreateWorkflowExecutionRequestParamsInner exampleCreateWorkflowExecutionRequestParamsInner = new CreateWorkflowExecutionRequestParamsInner(); + + // create a new ConversionOperationExecutionParams + ConversionOperationExecutionParams exampleConversionOperationExecutionParams = new ConversionOperationExecutionParams(); + // set CreateWorkflowExecutionRequestParamsInner to ConversionOperationExecutionParams + exampleCreateWorkflowExecutionRequestParamsInner.setActualInstance(exampleConversionOperationExecutionParams); + // to get back the ConversionOperationExecutionParams set earlier + ConversionOperationExecutionParams testConversionOperationExecutionParams = (ConversionOperationExecutionParams) exampleCreateWorkflowExecutionRequestParamsInner.getActualInstance(); + + // create a new DisbursementOperationExecutionParams + DisbursementOperationExecutionParams exampleDisbursementOperationExecutionParams = new DisbursementOperationExecutionParams(); + // set CreateWorkflowExecutionRequestParamsInner to DisbursementOperationExecutionParams + exampleCreateWorkflowExecutionRequestParamsInner.setActualInstance(exampleDisbursementOperationExecutionParams); + // to get back the DisbursementOperationExecutionParams set earlier + DisbursementOperationExecutionParams testDisbursementOperationExecutionParams = (DisbursementOperationExecutionParams) exampleCreateWorkflowExecutionRequestParamsInner.getActualInstance(); + + // create a new TransferOperationExecutionParams + TransferOperationExecutionParams exampleTransferOperationExecutionParams = new TransferOperationExecutionParams(); + // set CreateWorkflowExecutionRequestParamsInner to TransferOperationExecutionParams + exampleCreateWorkflowExecutionRequestParamsInner.setActualInstance(exampleTransferOperationExecutionParams); + // to get back the TransferOperationExecutionParams set earlier + TransferOperationExecutionParams testTransferOperationExecutionParams = (TransferOperationExecutionParams) exampleCreateWorkflowExecutionRequestParamsInner.getActualInstance(); + } +} +``` + + diff --git a/docs/CustomFiatRoutingDest.md b/docs/CustomFiatRoutingDest.md deleted file mode 100644 index 68b9427..0000000 --- a/docs/CustomFiatRoutingDest.md +++ /dev/null @@ -1,31 +0,0 @@ - - -# CustomFiatRoutingDest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**scheme** | [**SchemeEnum**](#SchemeEnum) | The network routing logic. | | -|**dstType** | [**DstTypeEnum**](#DstTypeEnum) | The fiat account the funds are being sent to. | | -|**dstId** | **String** | The ID of the fiat account the funds are being sent to. | | - - - -## Enum: SchemeEnum - -| Name | Value | -|---- | -----| -| CUSTOM | "CUSTOM" | - - - -## Enum: DstTypeEnum - -| Name | Value | -|---- | -----| -| FIAT_ACCOUNT | "FIAT_ACCOUNT" | - - - diff --git a/docs/CustomCryptoRoutingDest.md b/docs/CustomRoutingDest.md similarity index 63% rename from docs/CustomCryptoRoutingDest.md rename to docs/CustomRoutingDest.md index 1130e93..8e7302c 100644 --- a/docs/CustomCryptoRoutingDest.md +++ b/docs/CustomRoutingDest.md @@ -1,6 +1,6 @@ -# CustomCryptoRoutingDest +# CustomRoutingDest ## Properties @@ -8,8 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**scheme** | [**SchemeEnum**](#SchemeEnum) | The network routing logic. | | -|**dstType** | [**DstTypeEnum**](#DstTypeEnum) | The type of destination account the funds are being sent to. | | -|**dstId** | **String** | The ID of the destination account the funds are being sent to. | | +|**dstType** | [**DstTypeEnum**](#DstTypeEnum) | The account the funds are being sent to. | | +|**dstId** | **String** | The ID of the account the funds are being sent to. | | @@ -25,6 +25,7 @@ | Name | Value | |---- | -----| +| FIAT_ACCOUNT | "FIAT_ACCOUNT" | | VAULT | "VAULT" | | EXCHANGE | "EXCHANGE" | diff --git a/docs/DepositFundsFromLinkedDDAResponse.md b/docs/DepositFundsFromLinkedDDAResponse.md new file mode 100644 index 0000000..5a7a668 --- /dev/null +++ b/docs/DepositFundsFromLinkedDDAResponse.md @@ -0,0 +1,13 @@ + + +# DepositFundsFromLinkedDDAResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**success** | **Boolean** | Indicates whether the funds were successfully deposited from the linked DDA | | + + + diff --git a/docs/Destination.md b/docs/Destination.md new file mode 100644 index 0000000..cb315b0 --- /dev/null +++ b/docs/Destination.md @@ -0,0 +1,37 @@ + + +# Destination + +## oneOf schemas +* [Account](Account.md) +* [OneTimeAddressAccount](OneTimeAddressAccount.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.Destination; +import com.fireblocks.sdk.model.Account; +import com.fireblocks.sdk.model.OneTimeAddressAccount; + +public class Example { + public static void main(String[] args) { + Destination exampleDestination = new Destination(); + + // create a new Account + Account exampleAccount = new Account(); + // set Destination to Account + exampleDestination.setActualInstance(exampleAccount); + // to get back the Account set earlier + Account testAccount = (Account) exampleDestination.getActualInstance(); + + // create a new OneTimeAddressAccount + OneTimeAddressAccount exampleOneTimeAddressAccount = new OneTimeAddressAccount(); + // set Destination to OneTimeAddressAccount + exampleDestination.setActualInstance(exampleOneTimeAddressAccount); + // to get back the OneTimeAddressAccount set earlier + OneTimeAddressAccount testOneTimeAddressAccount = (OneTimeAddressAccount) exampleDestination.getActualInstance(); + } +} +``` + + diff --git a/docs/DisbursementAmountInstruction.md b/docs/DisbursementAmountInstruction.md new file mode 100644 index 0000000..9fd0af0 --- /dev/null +++ b/docs/DisbursementAmountInstruction.md @@ -0,0 +1,15 @@ + + +# DisbursementAmountInstruction + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**payeeAccount** | [**Destination**](Destination.md) | | | +|**assetId** | **String** | | | +|**amount** | **String** | | | + + + diff --git a/docs/DisbursementConfigOperation.md b/docs/DisbursementConfigOperation.md new file mode 100644 index 0000000..82a222b --- /dev/null +++ b/docs/DisbursementConfigOperation.md @@ -0,0 +1,17 @@ + + +# DisbursementConfigOperation + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**operationId** | **String** | | | +|**type** | **DisbursementOperationType** | | | +|**params** | [**DisbursementOperationConfigParams**](DisbursementOperationConfigParams.md) | | | +|**status** | **ConfigOperationStatus** | | | +|**validationFailure** | [**DisbursementValidationFailure**](DisbursementValidationFailure.md) | | [optional] | + + + diff --git a/docs/DisbursementInstruction.md b/docs/DisbursementInstruction.md new file mode 100644 index 0000000..cf201ad --- /dev/null +++ b/docs/DisbursementInstruction.md @@ -0,0 +1,37 @@ + + +# DisbursementInstruction + +## oneOf schemas +* [DisbursementAmountInstruction](DisbursementAmountInstruction.md) +* [DisbursementPercentageInstruction](DisbursementPercentageInstruction.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.DisbursementInstruction; +import com.fireblocks.sdk.model.DisbursementAmountInstruction; +import com.fireblocks.sdk.model.DisbursementPercentageInstruction; + +public class Example { + public static void main(String[] args) { + DisbursementInstruction exampleDisbursementInstruction = new DisbursementInstruction(); + + // create a new DisbursementAmountInstruction + DisbursementAmountInstruction exampleDisbursementAmountInstruction = new DisbursementAmountInstruction(); + // set DisbursementInstruction to DisbursementAmountInstruction + exampleDisbursementInstruction.setActualInstance(exampleDisbursementAmountInstruction); + // to get back the DisbursementAmountInstruction set earlier + DisbursementAmountInstruction testDisbursementAmountInstruction = (DisbursementAmountInstruction) exampleDisbursementInstruction.getActualInstance(); + + // create a new DisbursementPercentageInstruction + DisbursementPercentageInstruction exampleDisbursementPercentageInstruction = new DisbursementPercentageInstruction(); + // set DisbursementInstruction to DisbursementPercentageInstruction + exampleDisbursementInstruction.setActualInstance(exampleDisbursementPercentageInstruction); + // to get back the DisbursementPercentageInstruction set earlier + DisbursementPercentageInstruction testDisbursementPercentageInstruction = (DisbursementPercentageInstruction) exampleDisbursementInstruction.getActualInstance(); + } +} +``` + + diff --git a/docs/DisbursementInstructionOutput.md b/docs/DisbursementInstructionOutput.md new file mode 100644 index 0000000..a6a7f11 --- /dev/null +++ b/docs/DisbursementInstructionOutput.md @@ -0,0 +1,15 @@ + + +# DisbursementInstructionOutput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**amount** | [**AssetAmount**](AssetAmount.md) | | | +|**fee** | [**AssetAmount**](AssetAmount.md) | | | +|**payeeAccount** | [**Destination**](Destination.md) | | | + + + diff --git a/docs/DisbursementOperationConfigParams.md b/docs/DisbursementOperationConfigParams.md new file mode 100644 index 0000000..d24fe39 --- /dev/null +++ b/docs/DisbursementOperationConfigParams.md @@ -0,0 +1,14 @@ + + +# DisbursementOperationConfigParams + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**paymentAccount** | [**Account**](Account.md) | | [optional] | +|**instructionSet** | [**List<DisbursementInstruction>**](DisbursementInstruction.md) | | | + + + diff --git a/docs/DisbursementOperationExecution.md b/docs/DisbursementOperationExecution.md new file mode 100644 index 0000000..aab0dd7 --- /dev/null +++ b/docs/DisbursementOperationExecution.md @@ -0,0 +1,18 @@ + + +# DisbursementOperationExecution + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**input** | [**DisbursementOperationInput**](DisbursementOperationInput.md) | | | +|**output** | [**DisbursementOperationExecutionOutput**](DisbursementOperationExecutionOutput.md) | | [optional] | +|**payoutId** | **String** | | [optional] | +|**startedAt** | **BigDecimal** | | | +|**finishedAt** | **BigDecimal** | | [optional] | +|**failure** | [**OperationExecutionFailure**](OperationExecutionFailure.md) | | [optional] | + + + diff --git a/docs/DisbursementOperationExecutionOutput.md b/docs/DisbursementOperationExecutionOutput.md new file mode 100644 index 0000000..2ce515e --- /dev/null +++ b/docs/DisbursementOperationExecutionOutput.md @@ -0,0 +1,13 @@ + + +# DisbursementOperationExecutionOutput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**instructionSet** | [**List<DisbursementInstructionOutput>**](DisbursementInstructionOutput.md) | | | + + + diff --git a/docs/DisbursementOperationExecutionParams.md b/docs/DisbursementOperationExecutionParams.md new file mode 100644 index 0000000..6ecc0be --- /dev/null +++ b/docs/DisbursementOperationExecutionParams.md @@ -0,0 +1,14 @@ + + +# DisbursementOperationExecutionParams + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**configOperationId** | **String** | | | +|**executionParams** | [**DisbursementOperationExecutionParamsExecutionParams**](DisbursementOperationExecutionParamsExecutionParams.md) | | [optional] | + + + diff --git a/docs/DisbursementOperationExecutionParamsExecutionParams.md b/docs/DisbursementOperationExecutionParamsExecutionParams.md new file mode 100644 index 0000000..0dceddd --- /dev/null +++ b/docs/DisbursementOperationExecutionParamsExecutionParams.md @@ -0,0 +1,15 @@ + + +# DisbursementOperationExecutionParamsExecutionParams + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**amount** | **String** | | [optional] | +|**paymentAccount** | [**Account**](Account.md) | | [optional] | +|**instructionSet** | [**List<DisbursementInstruction>**](DisbursementInstruction.md) | | [optional] | + + + diff --git a/docs/DisbursementOperationInput.md b/docs/DisbursementOperationInput.md new file mode 100644 index 0000000..c7a6c55 --- /dev/null +++ b/docs/DisbursementOperationInput.md @@ -0,0 +1,15 @@ + + +# DisbursementOperationInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**amount** | **String** | | [optional] | +|**paymentAccount** | [**Account**](Account.md) | | | +|**instructionSet** | [**List<DisbursementInstruction>**](DisbursementInstruction.md) | | | + + + diff --git a/docs/DisbursementOperationPreview.md b/docs/DisbursementOperationPreview.md new file mode 100644 index 0000000..01ffa47 --- /dev/null +++ b/docs/DisbursementOperationPreview.md @@ -0,0 +1,15 @@ + + +# DisbursementOperationPreview + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**input** | [**DisbursementOperationInput**](DisbursementOperationInput.md) | | | +|**output** | [**DisbursementOperationPreviewOutput**](DisbursementOperationPreviewOutput.md) | | [optional] | +|**failure** | [**OperationExecutionFailure**](OperationExecutionFailure.md) | | [optional] | + + + diff --git a/docs/DisbursementOperationPreviewOutput.md b/docs/DisbursementOperationPreviewOutput.md new file mode 100644 index 0000000..de753e7 --- /dev/null +++ b/docs/DisbursementOperationPreviewOutput.md @@ -0,0 +1,13 @@ + + +# DisbursementOperationPreviewOutput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**instructionSet** | [**List<DisbursementOperationPreviewOutputInstructionSetInner>**](DisbursementOperationPreviewOutputInstructionSetInner.md) | | | + + + diff --git a/docs/DisbursementOperationPreviewOutputInstructionSetInner.md b/docs/DisbursementOperationPreviewOutputInstructionSetInner.md new file mode 100644 index 0000000..ba791e5 --- /dev/null +++ b/docs/DisbursementOperationPreviewOutputInstructionSetInner.md @@ -0,0 +1,16 @@ + + +# DisbursementOperationPreviewOutputInstructionSetInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**amount** | [**AssetAmount**](AssetAmount.md) | | | +|**fee** | [**AssetAmount**](AssetAmount.md) | | | +|**payeeAccount** | [**Destination**](Destination.md) | | | +|**timeSeconds** | **BigDecimal** | | | + + + diff --git a/docs/DisbursementOperationType.md b/docs/DisbursementOperationType.md new file mode 100644 index 0000000..a51bf68 --- /dev/null +++ b/docs/DisbursementOperationType.md @@ -0,0 +1,11 @@ + + +# DisbursementOperationType + +## Enum + + +* `DISBURSEMENT` (value: `"DISBURSEMENT"`) + + + diff --git a/docs/DisbursementPercentageInstruction.md b/docs/DisbursementPercentageInstruction.md new file mode 100644 index 0000000..21ad223 --- /dev/null +++ b/docs/DisbursementPercentageInstruction.md @@ -0,0 +1,15 @@ + + +# DisbursementPercentageInstruction + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**payeeAccount** | [**Destination**](Destination.md) | | | +|**assetId** | **String** | | | +|**percentage** | **String** | | | + + + diff --git a/docs/DisbursementValidationFailure.md b/docs/DisbursementValidationFailure.md new file mode 100644 index 0000000..663baae --- /dev/null +++ b/docs/DisbursementValidationFailure.md @@ -0,0 +1,36 @@ + + +# DisbursementValidationFailure + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**reason** | [**ReasonEnum**](#ReasonEnum) | | | +|**data** | **Map<String, Object>** | | [optional] | + + + +## Enum: ReasonEnum + +| Name | Value | +|---- | -----| +| ACCOUNT_NOT_FOUND | "ACCOUNT_NOT_FOUND" | +| ACCOUNT_TYPE_NOT_SUPPORTED | "ACCOUNT_TYPE_NOT_SUPPORTED" | +| INSUFFICIENT_BALANCE | "INSUFFICIENT_BALANCE" | +| ASSET_NOT_FOUND | "ASSET_NOT_FOUND" | +| ASSETS_CONTINUITY_MISMATCH | "ASSETS_CONTINUITY_MISMATCH" | +| EXCHANGE_BASKETS_MISMATCH | "EXCHANGE_BASKETS_MISMATCH" | +| ACCOUNTS_CONTINUITY_MISMATCH | "ACCOUNTS_CONTINUITY_MISMATCH" | +| ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED | "ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED" | +| EQUAL_ACCOUNTS_NOT_ALLOWED | "EQUAL_ACCOUNTS_NOT_ALLOWED" | +| EQUAL_ASSETS_NOT_ALLOWED | "EQUAL_ASSETS_NOT_ALLOWED" | +| INVALID_AMOUNT | "INVALID_AMOUNT" | +| UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED | "UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED" | +| MANAGED_OPERATION_PARAMS_INVALID_SCHEMA | "MANAGED_OPERATION_PARAMS_INVALID_SCHEMA" | +| INSTRUCTIONS_EXCEED_HUNDRED_PERCENT | "INSTRUCTIONS_EXCEED_HUNDRED_PERCENT" | +| INSTRUCTIONS_ARRAY_EMPTY | "INSTRUCTIONS_ARRAY_EMPTY" | + + + diff --git a/docs/EditGasStationConfigurationResponse.md b/docs/EditGasStationConfigurationResponse.md new file mode 100644 index 0000000..b46be35 --- /dev/null +++ b/docs/EditGasStationConfigurationResponse.md @@ -0,0 +1,13 @@ + + +# EditGasStationConfigurationResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**success** | **Boolean** | Indicates whether editing the gas station configuration was successful | | + + + diff --git a/docs/ExchangeAccountsApi.md b/docs/ExchangeAccountsApi.md index b3b94fb..3eec54c 100644 --- a/docs/ExchangeAccountsApi.md +++ b/docs/ExchangeAccountsApi.md @@ -1,6 +1,6 @@ # ExchangeAccountsApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -14,7 +14,7 @@ All URIs are relative to *https://api.fireblocks.io/v1* ## convertAssets -> CompletableFuture> convertAssets convertAssets(exchangeAccountId, convertAssetsRequest, idempotencyKey) +> CompletableFuture> convertAssets convertAssets(exchangeAccountId, convertAssetsRequest, idempotencyKey) Convert exchange account funds from the source asset to the destination asset. @@ -27,24 +27,30 @@ Convert exchange account funds from the source asset to the destination asset. C import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ExchangeAccountsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ExchangeAccountsApi apiInstance = new ExchangeAccountsApi(defaultClient); String exchangeAccountId = "exchangeAccountId_example"; // String | The ID of the exchange account. Please make sure the exchange supports conversions. To find the ID of your exchange account, use GET/exchange_accounts. ConvertAssetsRequest convertAssetsRequest = new ConvertAssetsRequest(); // ConvertAssetsRequest | 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 = apiInstance.convertAssets(exchangeAccountId, convertAssetsRequest, idempotencyKey); + CompletableFuture> response = fireblocks.exchangeAccounts().convertAssets(exchangeAccountId, convertAssetsRequest, 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 ExchangeAccountsApi#convertAssets"); @@ -74,8 +80,8 @@ public class Example { ### Return type +CompletableFuture> -CompletableFuture> ### Authorization @@ -108,20 +114,25 @@ Returns an exchange account by ID. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ExchangeAccountsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ExchangeAccountsApi apiInstance = new ExchangeAccountsApi(defaultClient); String exchangeAccountId = "exchangeAccountId_example"; // String | The ID of the exchange account to return try { - CompletableFuture> response = apiInstance.getExchangeAccount(exchangeAccountId); + CompletableFuture> response = fireblocks.exchangeAccounts().getExchangeAccount(exchangeAccountId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -186,21 +197,26 @@ Returns an asset for an exchange account. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ExchangeAccountsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ExchangeAccountsApi apiInstance = new ExchangeAccountsApi(defaultClient); String exchangeAccountId = "exchangeAccountId_example"; // String | The ID of the exchange account to return String assetId = "assetId_example"; // String | The ID of the asset to return try { - CompletableFuture> response = apiInstance.getExchangeAccountAsset(exchangeAccountId, assetId); + CompletableFuture> response = fireblocks.exchangeAccounts().getExchangeAccountAsset(exchangeAccountId, assetId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -266,22 +282,27 @@ Returns a page include exchange accounts. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ExchangeAccountsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ExchangeAccountsApi apiInstance = new ExchangeAccountsApi(defaultClient); BigDecimal limit = new BigDecimal("3"); // BigDecimal | number of exchanges per page String before = "before_example"; // String | String after = "after_example"; // String | try { - CompletableFuture>> response = apiInstance.getPagedExchangeAccounts(limit, before, after); + CompletableFuture>> response = fireblocks.exchangeAccounts().getPagedExchangeAccounts(limit, before, after); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -335,7 +356,7 @@ No authorization required ## internalTransfer -> CompletableFuture> internalTransfer internalTransfer(exchangeAccountId, createInternalTransferRequest, idempotencyKey) +> CompletableFuture> internalTransfer internalTransfer(exchangeAccountId, createInternalTransferRequest, idempotencyKey) Internal transfer for exchange accounts @@ -348,24 +369,30 @@ Transfers funds between trading accounts under the same exchange account. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ExchangeAccountsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ExchangeAccountsApi apiInstance = new ExchangeAccountsApi(defaultClient); String exchangeAccountId = "exchangeAccountId_example"; // String | The ID of the exchange account to return CreateInternalTransferRequest createInternalTransferRequest = new CreateInternalTransferRequest(); // CreateInternalTransferRequest | 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 = apiInstance.internalTransfer(exchangeAccountId, createInternalTransferRequest, idempotencyKey); + CompletableFuture> response = fireblocks.exchangeAccounts().internalTransfer(exchangeAccountId, createInternalTransferRequest, 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 ExchangeAccountsApi#internalTransfer"); @@ -395,8 +422,8 @@ public class Example { ### Return type +CompletableFuture> -CompletableFuture> ### Authorization diff --git a/docs/ExecutionConversionOperation.md b/docs/ExecutionConversionOperation.md new file mode 100644 index 0000000..77e30e5 --- /dev/null +++ b/docs/ExecutionConversionOperation.md @@ -0,0 +1,18 @@ + + +# ExecutionConversionOperation + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**operationId** | **String** | | | +|**status** | **ExecutionOperationStatus** | | | +|**validationFailure** | [**ConversionValidationFailure**](ConversionValidationFailure.md) | | [optional] | +|**operationType** | **ConversionOperationType** | | | +|**preview** | [**ConversionOperationPreview**](ConversionOperationPreview.md) | | [optional] | +|**execution** | [**ConversionOperationExecution**](ConversionOperationExecution.md) | | [optional] | + + + diff --git a/docs/ExecutionDisbursementOperation.md b/docs/ExecutionDisbursementOperation.md new file mode 100644 index 0000000..0212dc8 --- /dev/null +++ b/docs/ExecutionDisbursementOperation.md @@ -0,0 +1,18 @@ + + +# ExecutionDisbursementOperation + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**operationId** | **String** | | | +|**status** | **ExecutionOperationStatus** | | | +|**validationFailure** | [**DisbursementValidationFailure**](DisbursementValidationFailure.md) | | [optional] | +|**operationType** | **DisbursementOperationType** | | | +|**preview** | [**DisbursementOperationPreview**](DisbursementOperationPreview.md) | | [optional] | +|**execution** | [**DisbursementOperationExecution**](DisbursementOperationExecution.md) | | [optional] | + + + diff --git a/docs/ExecutionOperationStatus.md b/docs/ExecutionOperationStatus.md new file mode 100644 index 0000000..50119b7 --- /dev/null +++ b/docs/ExecutionOperationStatus.md @@ -0,0 +1,33 @@ + + +# ExecutionOperationStatus + +## Enum + + +* `PENDING` (value: `"PENDING"`) + +* `VALIDATION_IN_PROGRESS` (value: `"VALIDATION_IN_PROGRESS"`) + +* `VALIDATION_FAILED` (value: `"VALIDATION_FAILED"`) + +* `VALIDATION_COMPLETED` (value: `"VALIDATION_COMPLETED"`) + +* `PREVIEW_REQUESTED` (value: `"PREVIEW_REQUESTED"`) + +* `PREVIEW_IN_PROGRESS` (value: `"PREVIEW_IN_PROGRESS"`) + +* `PREVIEW_FAILED` (value: `"PREVIEW_FAILED"`) + +* `READY_FOR_LAUNCH` (value: `"READY_FOR_LAUNCH"`) + +* `EXECUTION_REQUESTED` (value: `"EXECUTION_REQUESTED"`) + +* `EXECUTION_IN_PROGRESS` (value: `"EXECUTION_IN_PROGRESS"`) + +* `EXECUTION_COMPLETED` (value: `"EXECUTION_COMPLETED"`) + +* `EXECUTION_FAILED` (value: `"EXECUTION_FAILED"`) + + + diff --git a/docs/ExecutionScreeningOperation.md b/docs/ExecutionScreeningOperation.md new file mode 100644 index 0000000..5cf1b5d --- /dev/null +++ b/docs/ExecutionScreeningOperation.md @@ -0,0 +1,17 @@ + + +# ExecutionScreeningOperation + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**operationId** | **String** | | | +|**status** | **ExecutionOperationStatus** | | | +|**operationType** | **ScreeningOperationType** | | | +|**validationFailure** | [**ScreeningValidationFailure**](ScreeningValidationFailure.md) | | [optional] | +|**execution** | [**ScreeningOperationExecution**](ScreeningOperationExecution.md) | | [optional] | + + + diff --git a/docs/ExecutionTransferOperation.md b/docs/ExecutionTransferOperation.md new file mode 100644 index 0000000..6f65cfb --- /dev/null +++ b/docs/ExecutionTransferOperation.md @@ -0,0 +1,18 @@ + + +# ExecutionTransferOperation + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**operationId** | **String** | | | +|**status** | **ExecutionOperationStatus** | | | +|**validationFailure** | [**TransferValidationFailure**](TransferValidationFailure.md) | | [optional] | +|**operationType** | **TransferOperationType** | | | +|**preview** | [**TransferOperationPreview**](TransferOperationPreview.md) | | [optional] | +|**execution** | [**TransferOperationExecution**](TransferOperationExecution.md) | | [optional] | + + + diff --git a/docs/ExternalWalletsApi.md b/docs/ExternalWalletsApi.md index 62063d7..1c409e1 100644 --- a/docs/ExternalWalletsApi.md +++ b/docs/ExternalWalletsApi.md @@ -1,6 +1,6 @@ # ExternalWalletsApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -30,23 +30,28 @@ Adds an asset to an existing external wallet. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ExternalWalletsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ExternalWalletsApi apiInstance = new ExternalWalletsApi(defaultClient); String walletId = "walletId_example"; // String | The ID of the wallet String assetId = "assetId_example"; // String | The ID of the asset to add AddAssetToExternalWalletRequest addAssetToExternalWalletRequest = new AddAssetToExternalWalletRequest(); // AddAssetToExternalWalletRequest | 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 = apiInstance.addAssetToExternalWallet(walletId, assetId, addAssetToExternalWalletRequest, idempotencyKey); + CompletableFuture> response = fireblocks.externalWallets().addAssetToExternalWallet(walletId, assetId, addAssetToExternalWalletRequest, 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()); @@ -114,21 +119,26 @@ Creates a new external wallet with the requested name. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ExternalWalletsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ExternalWalletsApi apiInstance = new ExternalWalletsApi(defaultClient); CreateWalletRequest createWalletRequest = new CreateWalletRequest(); // CreateWalletRequest | 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 = apiInstance.createExternalWallet(createWalletRequest, idempotencyKey); + CompletableFuture> response = fireblocks.externalWallets().createExternalWallet(createWalletRequest, 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()); @@ -194,20 +204,25 @@ Deletes an external wallet by ID. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ExternalWalletsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ExternalWalletsApi apiInstance = new ExternalWalletsApi(defaultClient); String walletId = "walletId_example"; // String | The ID of the wallet to delete try { - CompletableFuture> response = apiInstance.deleteExternalWallet(walletId); + CompletableFuture> response = fireblocks.externalWallets().deleteExternalWallet(walletId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -271,20 +286,25 @@ Returns an external wallet by ID. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ExternalWalletsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ExternalWalletsApi apiInstance = new ExternalWalletsApi(defaultClient); String walletId = "walletId_example"; // String | The ID of the wallet to return try { - CompletableFuture> response = apiInstance.getExternalWallet(walletId); + CompletableFuture> response = fireblocks.externalWallets().getExternalWallet(walletId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -349,21 +369,26 @@ Returns an external wallet by wallet ID and asset ID. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ExternalWalletsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ExternalWalletsApi apiInstance = new ExternalWalletsApi(defaultClient); String walletId = "walletId_example"; // String | The ID of the wallet String assetId = "assetId_example"; // String | The ID of the asset to return try { - CompletableFuture> response = apiInstance.getExternalWalletAsset(walletId, assetId); + CompletableFuture> response = fireblocks.externalWallets().getExternalWalletAsset(walletId, assetId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -429,19 +454,24 @@ Gets a list of external wallets under the workspace. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ExternalWalletsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ExternalWalletsApi apiInstance = new ExternalWalletsApi(defaultClient); try { - CompletableFuture>> response = apiInstance.getExternalWallets(); + CompletableFuture>> response = fireblocks.externalWallets().getExternalWallets(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -503,21 +533,26 @@ Deletes an external wallet asset by ID. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ExternalWalletsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ExternalWalletsApi apiInstance = new ExternalWalletsApi(defaultClient); String walletId = "walletId_example"; // String | The ID of the wallet String assetId = "assetId_example"; // String | The ID of the asset to delete try { - CompletableFuture> response = apiInstance.removeAssetFromExternalWallet(walletId, assetId); + CompletableFuture> response = fireblocks.externalWallets().removeAssetFromExternalWallet(walletId, assetId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -582,22 +617,27 @@ Sets an AML/KYT customer reference ID for the specific external wallet. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ExternalWalletsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ExternalWalletsApi apiInstance = new ExternalWalletsApi(defaultClient); SetCustomerRefIdRequest setCustomerRefIdRequest = new SetCustomerRefIdRequest(); // SetCustomerRefIdRequest | String walletId = "walletId_example"; // String | The wallet ID 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 = apiInstance.setExternalWalletCustomerRefId(setCustomerRefIdRequest, walletId, idempotencyKey); + CompletableFuture> response = fireblocks.externalWallets().setExternalWalletCustomerRefId(setCustomerRefIdRequest, walletId, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { diff --git a/docs/FiatAccountsApi.md b/docs/FiatAccountsApi.md index 63b09c4..cf04743 100644 --- a/docs/FiatAccountsApi.md +++ b/docs/FiatAccountsApi.md @@ -1,6 +1,6 @@ # FiatAccountsApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -13,7 +13,7 @@ All URIs are relative to *https://api.fireblocks.io/v1* ## depositFundsFromLinkedDDA -> CompletableFuture> depositFundsFromLinkedDDA depositFundsFromLinkedDDA(accountId, funds, idempotencyKey) +> CompletableFuture> depositFundsFromLinkedDDA depositFundsFromLinkedDDA(accountId, funds, idempotencyKey) Deposit funds from DDA @@ -26,24 +26,30 @@ Deposits funds from the linked DDA. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.FiatAccountsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - FiatAccountsApi apiInstance = new FiatAccountsApi(defaultClient); String accountId = "accountId_example"; // String | The ID of the fiat account to use Funds funds = new Funds(); // Funds | 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 = apiInstance.depositFundsFromLinkedDDA(accountId, funds, idempotencyKey); + CompletableFuture> response = fireblocks.fiatAccounts().depositFundsFromLinkedDDA(accountId, funds, 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 FiatAccountsApi#depositFundsFromLinkedDDA"); @@ -73,8 +79,8 @@ public class Example { ### Return type +CompletableFuture> -CompletableFuture> ### Authorization @@ -107,20 +113,25 @@ Returns a fiat account by ID. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.FiatAccountsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - FiatAccountsApi apiInstance = new FiatAccountsApi(defaultClient); String accountId = "accountId_example"; // String | The ID of the fiat account to return try { - CompletableFuture> response = apiInstance.getFiatAccount(accountId); + CompletableFuture> response = fireblocks.fiatAccounts().getFiatAccount(accountId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -185,19 +196,24 @@ Returns all fiat accounts. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.FiatAccountsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - FiatAccountsApi apiInstance = new FiatAccountsApi(defaultClient); try { - CompletableFuture>> response = apiInstance.getFiatAccounts(); + CompletableFuture>> response = fireblocks.fiatAccounts().getFiatAccounts(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -246,7 +262,7 @@ No authorization required ## redeemFundsToLinkedDDA -> CompletableFuture> redeemFundsToLinkedDDA redeemFundsToLinkedDDA(accountId, funds, idempotencyKey) +> CompletableFuture> redeemFundsToLinkedDDA redeemFundsToLinkedDDA(accountId, funds, idempotencyKey) Redeem funds to DDA @@ -259,24 +275,30 @@ Redeems funds to the linked DDA. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.FiatAccountsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - FiatAccountsApi apiInstance = new FiatAccountsApi(defaultClient); String accountId = "accountId_example"; // String | The ID of the fiat account to use Funds funds = new Funds(); // Funds | 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 = apiInstance.redeemFundsToLinkedDDA(accountId, funds, idempotencyKey); + CompletableFuture> response = fireblocks.fiatAccounts().redeemFundsToLinkedDDA(accountId, funds, 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 FiatAccountsApi#redeemFundsToLinkedDDA"); @@ -306,8 +328,8 @@ public class Example { ### Return type +CompletableFuture> -CompletableFuture> ### Authorization diff --git a/docs/GasStationsApi.md b/docs/GasStationsApi.md index b46b623..99a9875 100644 --- a/docs/GasStationsApi.md +++ b/docs/GasStationsApi.md @@ -1,6 +1,6 @@ # GasStationsApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -26,20 +26,25 @@ Returns gas station settings and balances for a requested asset. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.GasStationsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - GasStationsApi apiInstance = new GasStationsApi(defaultClient); String assetId = "assetId_example"; // String | The ID of the asset try { - CompletableFuture> response = apiInstance.getGasStationByAssetId(assetId); + CompletableFuture> response = fireblocks.gasStations().getGasStationByAssetId(assetId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -104,19 +109,24 @@ Returns gas station settings and ETH balance. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.GasStationsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - GasStationsApi apiInstance = new GasStationsApi(defaultClient); try { - CompletableFuture> response = apiInstance.getGasStationInfo(); + CompletableFuture> response = fireblocks.gasStations().getGasStationInfo(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -165,7 +175,7 @@ No authorization required ## updateGasStationConfiguration -> CompletableFuture> updateGasStationConfiguration updateGasStationConfiguration(gasStationConfiguration, idempotencyKey) +> CompletableFuture> updateGasStationConfiguration updateGasStationConfiguration(gasStationConfiguration, idempotencyKey) Edit gas station settings @@ -178,23 +188,29 @@ Configures gas station settings for ETH. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.GasStationsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - GasStationsApi apiInstance = new GasStationsApi(defaultClient); GasStationConfiguration gasStationConfiguration = new GasStationConfiguration(); // GasStationConfiguration | 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 = apiInstance.updateGasStationConfiguration(gasStationConfiguration, idempotencyKey); + CompletableFuture> response = fireblocks.gasStations().updateGasStationConfiguration(gasStationConfiguration, 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 GasStationsApi#updateGasStationConfiguration"); @@ -223,8 +239,8 @@ public class Example { ### Return type +CompletableFuture> -CompletableFuture> ### Authorization @@ -244,7 +260,7 @@ No authorization required ## updateGasStationConfigurationByAssetId -> CompletableFuture> updateGasStationConfigurationByAssetId updateGasStationConfigurationByAssetId(gasStationConfiguration, assetId, idempotencyKey) +> CompletableFuture> updateGasStationConfigurationByAssetId updateGasStationConfigurationByAssetId(gasStationConfiguration, assetId, idempotencyKey) Edit gas station settings for an asset @@ -257,24 +273,30 @@ Configures gas station settings for a requested asset. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.GasStationsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - GasStationsApi apiInstance = new GasStationsApi(defaultClient); GasStationConfiguration gasStationConfiguration = new GasStationConfiguration(); // GasStationConfiguration | String assetId = "assetId_example"; // String | The ID of the asset 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 = apiInstance.updateGasStationConfigurationByAssetId(gasStationConfiguration, assetId, idempotencyKey); + CompletableFuture> response = fireblocks.gasStations().updateGasStationConfigurationByAssetId(gasStationConfiguration, assetId, 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 GasStationsApi#updateGasStationConfigurationByAssetId"); @@ -304,8 +326,8 @@ public class Example { ### Return type +CompletableFuture> -CompletableFuture> ### Authorization diff --git a/docs/GetAPIUsersResponse.md b/docs/GetAPIUsersResponse.md new file mode 100644 index 0000000..9810caa --- /dev/null +++ b/docs/GetAPIUsersResponse.md @@ -0,0 +1,13 @@ + + +# GetAPIUsersResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**users** | [**List<APIUser>**](APIUser.md) | | | + + + diff --git a/docs/GetAuditLogsResponse.md b/docs/GetAuditLogsResponse.md new file mode 100644 index 0000000..db0bdc8 --- /dev/null +++ b/docs/GetAuditLogsResponse.md @@ -0,0 +1,15 @@ + + +# GetAuditLogsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<AuditLogData>**](AuditLogData.md) | | [optional] | +|**cursor** | **String** | The next id to start fetch audit logs from | [optional] | +|**total** | **BigDecimal** | The total number of audit logs | [optional] | + + + diff --git a/docs/GetConsoleUsersResponse.md b/docs/GetConsoleUsersResponse.md new file mode 100644 index 0000000..4125373 --- /dev/null +++ b/docs/GetConsoleUsersResponse.md @@ -0,0 +1,13 @@ + + +# GetConsoleUsersResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**users** | [**List<ConsoleUser>**](ConsoleUser.md) | | | + + + diff --git a/docs/GetMaxSpendableAmountResponse.md b/docs/GetMaxSpendableAmountResponse.md new file mode 100644 index 0000000..b981e96 --- /dev/null +++ b/docs/GetMaxSpendableAmountResponse.md @@ -0,0 +1,13 @@ + + +# GetMaxSpendableAmountResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**maxSpendableAmount** | **String** | The maximum amount that can be spent from the vault account | [optional] | + + + diff --git a/docs/GetWhitelistIpAddressesResponse.md b/docs/GetWhitelistIpAddressesResponse.md new file mode 100644 index 0000000..c0e4128 --- /dev/null +++ b/docs/GetWhitelistIpAddressesResponse.md @@ -0,0 +1,14 @@ + + +# GetWhitelistIpAddressesResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**userId** | **String** | The ID of the user | [optional] | +|**whitelistedIps** | **List<String>** | List of whitelisted ip addresses | [optional] | + + + diff --git a/docs/InternalTransferResponse.md b/docs/InternalTransferResponse.md new file mode 100644 index 0000000..c9e39e9 --- /dev/null +++ b/docs/InternalTransferResponse.md @@ -0,0 +1,13 @@ + + +# InternalTransferResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**success** | **Boolean** | Indicates whether the transfer was successful | | + + + diff --git a/docs/InternalWalletsApi.md b/docs/InternalWalletsApi.md index 0978011..14adb3d 100644 --- a/docs/InternalWalletsApi.md +++ b/docs/InternalWalletsApi.md @@ -1,6 +1,6 @@ # InternalWalletsApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -30,21 +30,26 @@ Creates a new internal wallet with the requested name. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.InternalWalletsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - InternalWalletsApi apiInstance = new InternalWalletsApi(defaultClient); CreateWalletRequest createWalletRequest = new CreateWalletRequest(); // CreateWalletRequest | 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 = apiInstance.createInternalWallet(createWalletRequest, idempotencyKey); + CompletableFuture> response = fireblocks.internalWallets().createInternalWallet(createWalletRequest, 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()); @@ -110,23 +115,28 @@ Adds an asset to an existing internal wallet. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.InternalWalletsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - InternalWalletsApi apiInstance = new InternalWalletsApi(defaultClient); String walletId = "walletId_example"; // String | The ID of the wallet String assetId = "assetId_example"; // String | The ID of the asset to add CreateInternalWalletAssetRequest createInternalWalletAssetRequest = new CreateInternalWalletAssetRequest(); // CreateInternalWalletAssetRequest | 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 = apiInstance.createInternalWalletAsset(walletId, assetId, createInternalWalletAssetRequest, idempotencyKey); + CompletableFuture> response = fireblocks.internalWallets().createInternalWalletAsset(walletId, assetId, createInternalWalletAssetRequest, 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()); @@ -194,20 +204,25 @@ Deletes an internal wallet by ID. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.InternalWalletsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - InternalWalletsApi apiInstance = new InternalWalletsApi(defaultClient); String walletId = "walletId_example"; // String | The ID of the wallet to delete try { - CompletableFuture> response = apiInstance.deleteInternalWallet(walletId); + CompletableFuture> response = fireblocks.internalWallets().deleteInternalWallet(walletId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -271,21 +286,26 @@ Deletes a whitelisted address (for an asset) from an internal wallet. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.InternalWalletsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - InternalWalletsApi apiInstance = new InternalWalletsApi(defaultClient); String walletId = "walletId_example"; // String | The ID of the wallet String assetId = "assetId_example"; // String | The ID of the asset to delete try { - CompletableFuture> response = apiInstance.deleteInternalWalletAsset(walletId, assetId); + CompletableFuture> response = fireblocks.internalWallets().deleteInternalWalletAsset(walletId, assetId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -350,20 +370,25 @@ Returns all assets in an internal wallet by ID. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.InternalWalletsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - InternalWalletsApi apiInstance = new InternalWalletsApi(defaultClient); String walletId = "walletId_example"; // String | The ID of the wallet to return try { - CompletableFuture> response = apiInstance.getInternalWallet(walletId); + CompletableFuture> response = fireblocks.internalWallets().getInternalWallet(walletId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -428,21 +453,26 @@ Returns information for an asset in an internal wallet. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.InternalWalletsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - InternalWalletsApi apiInstance = new InternalWalletsApi(defaultClient); String walletId = "walletId_example"; // String | The ID of the wallet String assetId = "assetId_example"; // String | The ID of the asset to return try { - CompletableFuture> response = apiInstance.getInternalWalletAsset(walletId, assetId); + CompletableFuture> response = fireblocks.internalWallets().getInternalWalletAsset(walletId, assetId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -508,19 +538,24 @@ Gets a list of internal wallets. **Note**: BTC-based assets belonging to whitel import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.InternalWalletsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - InternalWalletsApi apiInstance = new InternalWalletsApi(defaultClient); try { - CompletableFuture>> response = apiInstance.getInternalWallets(); + CompletableFuture>> response = fireblocks.internalWallets().getInternalWallets(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -582,22 +617,27 @@ Sets an AML/KYT customer reference ID for the specific internal wallet. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.InternalWalletsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - InternalWalletsApi apiInstance = new InternalWalletsApi(defaultClient); SetCustomerRefIdRequest setCustomerRefIdRequest = new SetCustomerRefIdRequest(); // SetCustomerRefIdRequest | String walletId = "walletId_example"; // String | The wallet ID 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 = apiInstance.setCustomerRefIdForInternalWallet(setCustomerRefIdRequest, walletId, idempotencyKey); + CompletableFuture> response = fireblocks.internalWallets().setCustomerRefIdForInternalWallet(setCustomerRefIdRequest, walletId, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { diff --git a/docs/JobManagementApi.md b/docs/JobManagementApi.md index c169118..0a2eeaf 100644 --- a/docs/JobManagementApi.md +++ b/docs/JobManagementApi.md @@ -1,6 +1,6 @@ # JobManagementApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -28,21 +28,26 @@ Stop the given job immediately. If the job is in the ‘Active’ state, the job import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.JobManagementApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - JobManagementApi apiInstance = new JobManagementApi(defaultClient); String jobId = "jobId_example"; // String | The requested job id 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 = apiInstance.cancelJob(jobId, idempotencyKey); + CompletableFuture> response = fireblocks.jobManagement().cancelJob(jobId, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -107,21 +112,26 @@ Continue the given paused job. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.JobManagementApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - JobManagementApi apiInstance = new JobManagementApi(defaultClient); String jobId = "jobId_example"; // String | The requested job id 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 = apiInstance.continueJob(jobId, idempotencyKey); + CompletableFuture> response = fireblocks.jobManagement().continueJob(jobId, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -186,20 +196,25 @@ Get an object describing the given job import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.JobManagementApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - JobManagementApi apiInstance = new JobManagementApi(defaultClient); String jobId = "jobId_example"; // String | The requested job id try { - CompletableFuture> response = apiInstance.getJob(jobId); + CompletableFuture> response = fireblocks.jobManagement().getJob(jobId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -264,20 +279,25 @@ Return a list of tasks for given job import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.JobManagementApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - JobManagementApi apiInstance = new JobManagementApi(defaultClient); String jobId = "jobId_example"; // String | The requested job id try { - CompletableFuture>> response = apiInstance.getJobTasks(jobId); + CompletableFuture>> response = fireblocks.jobManagement().getJobTasks(jobId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -342,21 +362,26 @@ Get an array of objects including all active, paused, canceled, and complete job import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.JobManagementApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - JobManagementApi apiInstance = new JobManagementApi(defaultClient); Integer fromTime = 56; // Integer | Start of time range in ms since 1970 Integer toTime = 56; // Integer | End of time range in ms since 1970 try { - CompletableFuture>> response = apiInstance.getJobs(fromTime, toTime); + CompletableFuture>> response = fireblocks.jobManagement().getJobs(fromTime, toTime); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -422,21 +447,26 @@ Pause the given job, after the current task is done. A paused job can later be r import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.JobManagementApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - JobManagementApi apiInstance = new JobManagementApi(defaultClient); String jobId = "jobId_example"; // String | The requested job id 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 = apiInstance.pauseJob(jobId, idempotencyKey); + CompletableFuture> response = fireblocks.jobManagement().pauseJob(jobId, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { diff --git a/docs/NetworkConnection.md b/docs/NetworkConnection.md index 44224b8..302df5a 100644 --- a/docs/NetworkConnection.md +++ b/docs/NetworkConnection.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**localNetworkId** | **String** | The network ID of the profile trying to create the connection. | | |**remoteNetworkId** | **String** | The network ID the profile is attempting to connect to. | | -|**routingPolicy** | [**NetworkConnectionRoutingPolicy**](NetworkConnectionRoutingPolicy.md) | | [optional] | +|**routingPolicy** | [**Map<String, NetworkConnectionRoutingPolicyValue>**](NetworkConnectionRoutingPolicyValue.md) | | [optional] | diff --git a/docs/NetworkConnectionResponse.md b/docs/NetworkConnectionResponse.md index c975747..fe2e4e3 100644 --- a/docs/NetworkConnectionResponse.md +++ b/docs/NetworkConnectionResponse.md @@ -13,7 +13,7 @@ |**status** | **NetworkConnectionStatus** | | | |**localNetworkId** | [**NetworkId**](NetworkId.md) | | | |**remoteNetworkId** | [**NetworkId**](NetworkId.md) | | | -|**routingPolicy** | [**NetworkConnectionRoutingPolicy**](NetworkConnectionRoutingPolicy.md) | | | +|**routingPolicy** | [**Map<String, NetworkConnectionRoutingPolicyValue>**](NetworkConnectionRoutingPolicyValue.md) | | | diff --git a/docs/NetworkConnectionRoutingPolicy.md b/docs/NetworkConnectionRoutingPolicy.md deleted file mode 100644 index 803275f..0000000 --- a/docs/NetworkConnectionRoutingPolicy.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# NetworkConnectionRoutingPolicy - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**crypto** | [**NetworkConnectionRoutingPolicyCrypto**](NetworkConnectionRoutingPolicyCrypto.md) | | [optional] | -|**sen** | [**NetworkConnectionRoutingPolicySen**](NetworkConnectionRoutingPolicySen.md) | | [optional] | -|**signet** | [**NetworkConnectionRoutingPolicySignet**](NetworkConnectionRoutingPolicySignet.md) | | [optional] | -|**senTest** | [**NetworkConnectionRoutingPolicySenTest**](NetworkConnectionRoutingPolicySenTest.md) | | [optional] | -|**signetTest** | [**NetworkConnectionRoutingPolicySignetTest**](NetworkConnectionRoutingPolicySignetTest.md) | | [optional] | - - - diff --git a/docs/NetworkConnectionRoutingPolicyCrypto.md b/docs/NetworkConnectionRoutingPolicyCrypto.md deleted file mode 100644 index 299554f..0000000 --- a/docs/NetworkConnectionRoutingPolicyCrypto.md +++ /dev/null @@ -1,46 +0,0 @@ - - -# NetworkConnectionRoutingPolicyCrypto - -## oneOf schemas -* [CustomCryptoRoutingDest](CustomCryptoRoutingDest.md) -* [DefaultNetworkRoutingDest](DefaultNetworkRoutingDest.md) -* [NoneNetworkRoutingDest](NoneNetworkRoutingDest.md) - -## Example -```java -// Import classes: -import com.fireblocks.sdk.model.NetworkConnectionRoutingPolicyCrypto; -import com.fireblocks.sdk.model.CustomCryptoRoutingDest; -import com.fireblocks.sdk.model.DefaultNetworkRoutingDest; -import com.fireblocks.sdk.model.NoneNetworkRoutingDest; - -public class Example { - public static void main(String[] args) { - NetworkConnectionRoutingPolicyCrypto exampleNetworkConnectionRoutingPolicyCrypto = new NetworkConnectionRoutingPolicyCrypto(); - - // create a new CustomCryptoRoutingDest - CustomCryptoRoutingDest exampleCustomCryptoRoutingDest = new CustomCryptoRoutingDest(); - // set NetworkConnectionRoutingPolicyCrypto to CustomCryptoRoutingDest - exampleNetworkConnectionRoutingPolicyCrypto.setActualInstance(exampleCustomCryptoRoutingDest); - // to get back the CustomCryptoRoutingDest set earlier - CustomCryptoRoutingDest testCustomCryptoRoutingDest = (CustomCryptoRoutingDest) exampleNetworkConnectionRoutingPolicyCrypto.getActualInstance(); - - // create a new DefaultNetworkRoutingDest - DefaultNetworkRoutingDest exampleDefaultNetworkRoutingDest = new DefaultNetworkRoutingDest(); - // set NetworkConnectionRoutingPolicyCrypto to DefaultNetworkRoutingDest - exampleNetworkConnectionRoutingPolicyCrypto.setActualInstance(exampleDefaultNetworkRoutingDest); - // to get back the DefaultNetworkRoutingDest set earlier - DefaultNetworkRoutingDest testDefaultNetworkRoutingDest = (DefaultNetworkRoutingDest) exampleNetworkConnectionRoutingPolicyCrypto.getActualInstance(); - - // create a new NoneNetworkRoutingDest - NoneNetworkRoutingDest exampleNoneNetworkRoutingDest = new NoneNetworkRoutingDest(); - // set NetworkConnectionRoutingPolicyCrypto to NoneNetworkRoutingDest - exampleNetworkConnectionRoutingPolicyCrypto.setActualInstance(exampleNoneNetworkRoutingDest); - // to get back the NoneNetworkRoutingDest set earlier - NoneNetworkRoutingDest testNoneNetworkRoutingDest = (NoneNetworkRoutingDest) exampleNetworkConnectionRoutingPolicyCrypto.getActualInstance(); - } -} -``` - - diff --git a/docs/NetworkConnectionRoutingPolicySen.md b/docs/NetworkConnectionRoutingPolicySen.md deleted file mode 100644 index a005732..0000000 --- a/docs/NetworkConnectionRoutingPolicySen.md +++ /dev/null @@ -1,46 +0,0 @@ - - -# NetworkConnectionRoutingPolicySen - -## oneOf schemas -* [CustomFiatRoutingDest](CustomFiatRoutingDest.md) -* [DefaultNetworkRoutingDest](DefaultNetworkRoutingDest.md) -* [NoneNetworkRoutingDest](NoneNetworkRoutingDest.md) - -## Example -```java -// Import classes: -import com.fireblocks.sdk.model.NetworkConnectionRoutingPolicySen; -import com.fireblocks.sdk.model.CustomFiatRoutingDest; -import com.fireblocks.sdk.model.DefaultNetworkRoutingDest; -import com.fireblocks.sdk.model.NoneNetworkRoutingDest; - -public class Example { - public static void main(String[] args) { - NetworkConnectionRoutingPolicySen exampleNetworkConnectionRoutingPolicySen = new NetworkConnectionRoutingPolicySen(); - - // create a new CustomFiatRoutingDest - CustomFiatRoutingDest exampleCustomFiatRoutingDest = new CustomFiatRoutingDest(); - // set NetworkConnectionRoutingPolicySen to CustomFiatRoutingDest - exampleNetworkConnectionRoutingPolicySen.setActualInstance(exampleCustomFiatRoutingDest); - // to get back the CustomFiatRoutingDest set earlier - CustomFiatRoutingDest testCustomFiatRoutingDest = (CustomFiatRoutingDest) exampleNetworkConnectionRoutingPolicySen.getActualInstance(); - - // create a new DefaultNetworkRoutingDest - DefaultNetworkRoutingDest exampleDefaultNetworkRoutingDest = new DefaultNetworkRoutingDest(); - // set NetworkConnectionRoutingPolicySen to DefaultNetworkRoutingDest - exampleNetworkConnectionRoutingPolicySen.setActualInstance(exampleDefaultNetworkRoutingDest); - // to get back the DefaultNetworkRoutingDest set earlier - DefaultNetworkRoutingDest testDefaultNetworkRoutingDest = (DefaultNetworkRoutingDest) exampleNetworkConnectionRoutingPolicySen.getActualInstance(); - - // create a new NoneNetworkRoutingDest - NoneNetworkRoutingDest exampleNoneNetworkRoutingDest = new NoneNetworkRoutingDest(); - // set NetworkConnectionRoutingPolicySen to NoneNetworkRoutingDest - exampleNetworkConnectionRoutingPolicySen.setActualInstance(exampleNoneNetworkRoutingDest); - // to get back the NoneNetworkRoutingDest set earlier - NoneNetworkRoutingDest testNoneNetworkRoutingDest = (NoneNetworkRoutingDest) exampleNetworkConnectionRoutingPolicySen.getActualInstance(); - } -} -``` - - diff --git a/docs/NetworkConnectionRoutingPolicySenTest.md b/docs/NetworkConnectionRoutingPolicySenTest.md deleted file mode 100644 index bc5c3c6..0000000 --- a/docs/NetworkConnectionRoutingPolicySenTest.md +++ /dev/null @@ -1,46 +0,0 @@ - - -# NetworkConnectionRoutingPolicySenTest - -## oneOf schemas -* [CustomFiatRoutingDest](CustomFiatRoutingDest.md) -* [DefaultNetworkRoutingDest](DefaultNetworkRoutingDest.md) -* [NoneNetworkRoutingDest](NoneNetworkRoutingDest.md) - -## Example -```java -// Import classes: -import com.fireblocks.sdk.model.NetworkConnectionRoutingPolicySenTest; -import com.fireblocks.sdk.model.CustomFiatRoutingDest; -import com.fireblocks.sdk.model.DefaultNetworkRoutingDest; -import com.fireblocks.sdk.model.NoneNetworkRoutingDest; - -public class Example { - public static void main(String[] args) { - NetworkConnectionRoutingPolicySenTest exampleNetworkConnectionRoutingPolicySenTest = new NetworkConnectionRoutingPolicySenTest(); - - // create a new CustomFiatRoutingDest - CustomFiatRoutingDest exampleCustomFiatRoutingDest = new CustomFiatRoutingDest(); - // set NetworkConnectionRoutingPolicySenTest to CustomFiatRoutingDest - exampleNetworkConnectionRoutingPolicySenTest.setActualInstance(exampleCustomFiatRoutingDest); - // to get back the CustomFiatRoutingDest set earlier - CustomFiatRoutingDest testCustomFiatRoutingDest = (CustomFiatRoutingDest) exampleNetworkConnectionRoutingPolicySenTest.getActualInstance(); - - // create a new DefaultNetworkRoutingDest - DefaultNetworkRoutingDest exampleDefaultNetworkRoutingDest = new DefaultNetworkRoutingDest(); - // set NetworkConnectionRoutingPolicySenTest to DefaultNetworkRoutingDest - exampleNetworkConnectionRoutingPolicySenTest.setActualInstance(exampleDefaultNetworkRoutingDest); - // to get back the DefaultNetworkRoutingDest set earlier - DefaultNetworkRoutingDest testDefaultNetworkRoutingDest = (DefaultNetworkRoutingDest) exampleNetworkConnectionRoutingPolicySenTest.getActualInstance(); - - // create a new NoneNetworkRoutingDest - NoneNetworkRoutingDest exampleNoneNetworkRoutingDest = new NoneNetworkRoutingDest(); - // set NetworkConnectionRoutingPolicySenTest to NoneNetworkRoutingDest - exampleNetworkConnectionRoutingPolicySenTest.setActualInstance(exampleNoneNetworkRoutingDest); - // to get back the NoneNetworkRoutingDest set earlier - NoneNetworkRoutingDest testNoneNetworkRoutingDest = (NoneNetworkRoutingDest) exampleNetworkConnectionRoutingPolicySenTest.getActualInstance(); - } -} -``` - - diff --git a/docs/NetworkConnectionRoutingPolicySignet.md b/docs/NetworkConnectionRoutingPolicySignet.md deleted file mode 100644 index 0fe2f44..0000000 --- a/docs/NetworkConnectionRoutingPolicySignet.md +++ /dev/null @@ -1,46 +0,0 @@ - - -# NetworkConnectionRoutingPolicySignet - -## oneOf schemas -* [CustomFiatRoutingDest](CustomFiatRoutingDest.md) -* [DefaultNetworkRoutingDest](DefaultNetworkRoutingDest.md) -* [NoneNetworkRoutingDest](NoneNetworkRoutingDest.md) - -## Example -```java -// Import classes: -import com.fireblocks.sdk.model.NetworkConnectionRoutingPolicySignet; -import com.fireblocks.sdk.model.CustomFiatRoutingDest; -import com.fireblocks.sdk.model.DefaultNetworkRoutingDest; -import com.fireblocks.sdk.model.NoneNetworkRoutingDest; - -public class Example { - public static void main(String[] args) { - NetworkConnectionRoutingPolicySignet exampleNetworkConnectionRoutingPolicySignet = new NetworkConnectionRoutingPolicySignet(); - - // create a new CustomFiatRoutingDest - CustomFiatRoutingDest exampleCustomFiatRoutingDest = new CustomFiatRoutingDest(); - // set NetworkConnectionRoutingPolicySignet to CustomFiatRoutingDest - exampleNetworkConnectionRoutingPolicySignet.setActualInstance(exampleCustomFiatRoutingDest); - // to get back the CustomFiatRoutingDest set earlier - CustomFiatRoutingDest testCustomFiatRoutingDest = (CustomFiatRoutingDest) exampleNetworkConnectionRoutingPolicySignet.getActualInstance(); - - // create a new DefaultNetworkRoutingDest - DefaultNetworkRoutingDest exampleDefaultNetworkRoutingDest = new DefaultNetworkRoutingDest(); - // set NetworkConnectionRoutingPolicySignet to DefaultNetworkRoutingDest - exampleNetworkConnectionRoutingPolicySignet.setActualInstance(exampleDefaultNetworkRoutingDest); - // to get back the DefaultNetworkRoutingDest set earlier - DefaultNetworkRoutingDest testDefaultNetworkRoutingDest = (DefaultNetworkRoutingDest) exampleNetworkConnectionRoutingPolicySignet.getActualInstance(); - - // create a new NoneNetworkRoutingDest - NoneNetworkRoutingDest exampleNoneNetworkRoutingDest = new NoneNetworkRoutingDest(); - // set NetworkConnectionRoutingPolicySignet to NoneNetworkRoutingDest - exampleNetworkConnectionRoutingPolicySignet.setActualInstance(exampleNoneNetworkRoutingDest); - // to get back the NoneNetworkRoutingDest set earlier - NoneNetworkRoutingDest testNoneNetworkRoutingDest = (NoneNetworkRoutingDest) exampleNetworkConnectionRoutingPolicySignet.getActualInstance(); - } -} -``` - - diff --git a/docs/NetworkConnectionRoutingPolicySignetTest.md b/docs/NetworkConnectionRoutingPolicySignetTest.md deleted file mode 100644 index 693b980..0000000 --- a/docs/NetworkConnectionRoutingPolicySignetTest.md +++ /dev/null @@ -1,46 +0,0 @@ - - -# NetworkConnectionRoutingPolicySignetTest - -## oneOf schemas -* [CustomFiatRoutingDest](CustomFiatRoutingDest.md) -* [DefaultNetworkRoutingDest](DefaultNetworkRoutingDest.md) -* [NoneNetworkRoutingDest](NoneNetworkRoutingDest.md) - -## Example -```java -// Import classes: -import com.fireblocks.sdk.model.NetworkConnectionRoutingPolicySignetTest; -import com.fireblocks.sdk.model.CustomFiatRoutingDest; -import com.fireblocks.sdk.model.DefaultNetworkRoutingDest; -import com.fireblocks.sdk.model.NoneNetworkRoutingDest; - -public class Example { - public static void main(String[] args) { - NetworkConnectionRoutingPolicySignetTest exampleNetworkConnectionRoutingPolicySignetTest = new NetworkConnectionRoutingPolicySignetTest(); - - // create a new CustomFiatRoutingDest - CustomFiatRoutingDest exampleCustomFiatRoutingDest = new CustomFiatRoutingDest(); - // set NetworkConnectionRoutingPolicySignetTest to CustomFiatRoutingDest - exampleNetworkConnectionRoutingPolicySignetTest.setActualInstance(exampleCustomFiatRoutingDest); - // to get back the CustomFiatRoutingDest set earlier - CustomFiatRoutingDest testCustomFiatRoutingDest = (CustomFiatRoutingDest) exampleNetworkConnectionRoutingPolicySignetTest.getActualInstance(); - - // create a new DefaultNetworkRoutingDest - DefaultNetworkRoutingDest exampleDefaultNetworkRoutingDest = new DefaultNetworkRoutingDest(); - // set NetworkConnectionRoutingPolicySignetTest to DefaultNetworkRoutingDest - exampleNetworkConnectionRoutingPolicySignetTest.setActualInstance(exampleDefaultNetworkRoutingDest); - // to get back the DefaultNetworkRoutingDest set earlier - DefaultNetworkRoutingDest testDefaultNetworkRoutingDest = (DefaultNetworkRoutingDest) exampleNetworkConnectionRoutingPolicySignetTest.getActualInstance(); - - // create a new NoneNetworkRoutingDest - NoneNetworkRoutingDest exampleNoneNetworkRoutingDest = new NoneNetworkRoutingDest(); - // set NetworkConnectionRoutingPolicySignetTest to NoneNetworkRoutingDest - exampleNetworkConnectionRoutingPolicySignetTest.setActualInstance(exampleNoneNetworkRoutingDest); - // to get back the NoneNetworkRoutingDest set earlier - NoneNetworkRoutingDest testNoneNetworkRoutingDest = (NoneNetworkRoutingDest) exampleNetworkConnectionRoutingPolicySignetTest.getActualInstance(); - } -} -``` - - diff --git a/docs/NetworkConnectionRoutingPolicyValue.md b/docs/NetworkConnectionRoutingPolicyValue.md new file mode 100644 index 0000000..292ea16 --- /dev/null +++ b/docs/NetworkConnectionRoutingPolicyValue.md @@ -0,0 +1,46 @@ + + +# NetworkConnectionRoutingPolicyValue + +## oneOf schemas +* [CustomRoutingDest](CustomRoutingDest.md) +* [DefaultNetworkRoutingDest](DefaultNetworkRoutingDest.md) +* [NoneNetworkRoutingDest](NoneNetworkRoutingDest.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.NetworkConnectionRoutingPolicyValue; +import com.fireblocks.sdk.model.CustomRoutingDest; +import com.fireblocks.sdk.model.DefaultNetworkRoutingDest; +import com.fireblocks.sdk.model.NoneNetworkRoutingDest; + +public class Example { + public static void main(String[] args) { + NetworkConnectionRoutingPolicyValue exampleNetworkConnectionRoutingPolicyValue = new NetworkConnectionRoutingPolicyValue(); + + // create a new CustomRoutingDest + CustomRoutingDest exampleCustomRoutingDest = new CustomRoutingDest(); + // set NetworkConnectionRoutingPolicyValue to CustomRoutingDest + exampleNetworkConnectionRoutingPolicyValue.setActualInstance(exampleCustomRoutingDest); + // to get back the CustomRoutingDest set earlier + CustomRoutingDest testCustomRoutingDest = (CustomRoutingDest) exampleNetworkConnectionRoutingPolicyValue.getActualInstance(); + + // create a new DefaultNetworkRoutingDest + DefaultNetworkRoutingDest exampleDefaultNetworkRoutingDest = new DefaultNetworkRoutingDest(); + // set NetworkConnectionRoutingPolicyValue to DefaultNetworkRoutingDest + exampleNetworkConnectionRoutingPolicyValue.setActualInstance(exampleDefaultNetworkRoutingDest); + // to get back the DefaultNetworkRoutingDest set earlier + DefaultNetworkRoutingDest testDefaultNetworkRoutingDest = (DefaultNetworkRoutingDest) exampleNetworkConnectionRoutingPolicyValue.getActualInstance(); + + // create a new NoneNetworkRoutingDest + NoneNetworkRoutingDest exampleNoneNetworkRoutingDest = new NoneNetworkRoutingDest(); + // set NetworkConnectionRoutingPolicyValue to NoneNetworkRoutingDest + exampleNetworkConnectionRoutingPolicyValue.setActualInstance(exampleNoneNetworkRoutingDest); + // to get back the NoneNetworkRoutingDest set earlier + NoneNetworkRoutingDest testNoneNetworkRoutingDest = (NoneNetworkRoutingDest) exampleNetworkConnectionRoutingPolicyValue.getActualInstance(); + } +} +``` + + diff --git a/docs/NetworkConnectionsApi.md b/docs/NetworkConnectionsApi.md index e33eb70..c0065d4 100644 --- a/docs/NetworkConnectionsApi.md +++ b/docs/NetworkConnectionsApi.md @@ -1,6 +1,6 @@ # NetworkConnectionsApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -35,21 +35,26 @@ The Fireblocks Network allows for flexibility around incoming deposits. A receiv import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NetworkConnectionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NetworkConnectionsApi apiInstance = new NetworkConnectionsApi(defaultClient); String connectionId = "connectionId_example"; // String | The ID of the network connection - String assetType = "CRYPTO"; // String | The destination asset type + String assetType = "assetType_example"; // String | The destination asset type try { - CompletableFuture> response = apiInstance.checkThirdPartyRouting(connectionId, assetType); + CompletableFuture> response = fireblocks.networkConnections().checkThirdPartyRouting(connectionId, assetType); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -77,7 +82,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **connectionId** | **String**| The ID of the network connection | | -| **assetType** | **String**| The destination asset type | [enum: CRYPTO, SIGNET, SEN, SIGNET_TEST, SEN_TEST] | +| **assetType** | **String**| The destination asset type | | ### Return type @@ -115,21 +120,26 @@ Initiates a new network connection. **Note:** This API call is subject to Flexi import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NetworkConnectionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NetworkConnectionsApi apiInstance = new NetworkConnectionsApi(defaultClient); NetworkConnection networkConnection = new NetworkConnection(); // NetworkConnection | 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 = apiInstance.createNetworkConnection(networkConnection, idempotencyKey); + CompletableFuture> response = fireblocks.networkConnections().createNetworkConnection(networkConnection, 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()); @@ -195,21 +205,26 @@ Creates a new Network ID. **Note:** This API call is subject to Flexible Routin import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NetworkConnectionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NetworkConnectionsApi apiInstance = new NetworkConnectionsApi(defaultClient); CreateNetworkIdRequest createNetworkIdRequest = new CreateNetworkIdRequest(); // CreateNetworkIdRequest | 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 = apiInstance.createNetworkId(createNetworkIdRequest, idempotencyKey); + CompletableFuture> response = fireblocks.networkConnections().createNetworkId(createNetworkIdRequest, 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()); @@ -275,20 +290,25 @@ Deletes an existing network connection specified by its connection ID. **Note:* import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NetworkConnectionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NetworkConnectionsApi apiInstance = new NetworkConnectionsApi(defaultClient); String connectionId = "connectionId_example"; // String | The ID of the network connection to delete try { - CompletableFuture> response = apiInstance.deleteNetworkConnection(connectionId); + CompletableFuture> response = fireblocks.networkConnections().deleteNetworkConnection(connectionId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -353,20 +373,25 @@ Deletes a network by its ID. **Note:** This API call is subject to Flexible Rou import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NetworkConnectionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NetworkConnectionsApi apiInstance = new NetworkConnectionsApi(defaultClient); String networkId = "networkId_example"; // String | The ID of the network try { - CompletableFuture> response = apiInstance.deleteNetworkId(networkId); + CompletableFuture> response = fireblocks.networkConnections().deleteNetworkId(networkId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -431,20 +456,25 @@ Gets a network connection by ID. **Note:** This API call is subject to Flexible import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NetworkConnectionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NetworkConnectionsApi apiInstance = new NetworkConnectionsApi(defaultClient); String connectionId = "connectionId_example"; // String | The ID of the connection try { - CompletableFuture> response = apiInstance.getNetwork(connectionId); + CompletableFuture> response = fireblocks.networkConnections().getNetwork(connectionId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -509,19 +539,24 @@ Returns all network connections. **Note:** This API call is subject to Flexible import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NetworkConnectionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NetworkConnectionsApi apiInstance = new NetworkConnectionsApi(defaultClient); try { - CompletableFuture>> response = apiInstance.getNetworkConnections(); + CompletableFuture>> response = fireblocks.networkConnections().getNetworkConnections(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -583,20 +618,25 @@ Retrieves a network by its ID. **Note:** This API call is subject to Flexible R import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NetworkConnectionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NetworkConnectionsApi apiInstance = new NetworkConnectionsApi(defaultClient); String networkId = "networkId_example"; // String | The ID of the network try { - CompletableFuture> response = apiInstance.getNetworkId(networkId); + CompletableFuture> response = fireblocks.networkConnections().getNetworkId(networkId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -661,19 +701,24 @@ Retrieves a list of all local and discoverable remote network IDs. **Note:** Th import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NetworkConnectionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NetworkConnectionsApi apiInstance = new NetworkConnectionsApi(defaultClient); try { - CompletableFuture>> response = apiInstance.getNetworkIds(); + CompletableFuture>> response = fireblocks.networkConnections().getNetworkIds(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -735,21 +780,26 @@ Update whether or not the network ID is discoverable by others. **Note:** This import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NetworkConnectionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NetworkConnectionsApi apiInstance = new NetworkConnectionsApi(defaultClient); SetNetworkIdDiscoverabilityRequest setNetworkIdDiscoverabilityRequest = new SetNetworkIdDiscoverabilityRequest(); // SetNetworkIdDiscoverabilityRequest | String networkId = "networkId_example"; // String | The ID of the network try { - CompletableFuture> response = apiInstance.setNetworkIdDiscoverability(setNetworkIdDiscoverabilityRequest, networkId); + CompletableFuture> response = fireblocks.networkConnections().setNetworkIdDiscoverability(setNetworkIdDiscoverabilityRequest, networkId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -815,21 +865,26 @@ Updates name of a specified network ID. **Note:** This API call is subject to F import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NetworkConnectionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NetworkConnectionsApi apiInstance = new NetworkConnectionsApi(defaultClient); SetNetworkIdNameRequest setNetworkIdNameRequest = new SetNetworkIdNameRequest(); // SetNetworkIdNameRequest | String networkId = "networkId_example"; // String | The ID of the network try { - CompletableFuture> response = apiInstance.setNetworkIdName(setNetworkIdNameRequest, networkId); + CompletableFuture> response = fireblocks.networkConnections().setNetworkIdName(setNetworkIdNameRequest, networkId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -895,21 +950,26 @@ Updates the routing policy of a specified network ID. **Note:** This API call i import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NetworkConnectionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NetworkConnectionsApi apiInstance = new NetworkConnectionsApi(defaultClient); String networkId = "networkId_example"; // String | The ID of the network SetNetworkIdRoutingPolicyRequest setNetworkIdRoutingPolicyRequest = new SetNetworkIdRoutingPolicyRequest(); // SetNetworkIdRoutingPolicyRequest | try { - CompletableFuture> response = apiInstance.setNetworkIdRoutingPolicy(networkId, setNetworkIdRoutingPolicyRequest); + CompletableFuture> response = fireblocks.networkConnections().setNetworkIdRoutingPolicy(networkId, setNetworkIdRoutingPolicyRequest); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -975,21 +1035,26 @@ Updates an existing network connection's routing policy. **Note:** This API import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NetworkConnectionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NetworkConnectionsApi apiInstance = new NetworkConnectionsApi(defaultClient); String connectionId = "connectionId_example"; // String | The ID of the network connection SetRoutingPolicyRequest setRoutingPolicyRequest = new SetRoutingPolicyRequest(); // SetRoutingPolicyRequest | try { - CompletableFuture> response = apiInstance.setRoutingPolicy(connectionId, setRoutingPolicyRequest); + CompletableFuture> response = fireblocks.networkConnections().setRoutingPolicy(connectionId, setRoutingPolicyRequest); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); diff --git a/docs/NetworkIdResponse.md b/docs/NetworkIdResponse.md index c120be6..24df903 100644 --- a/docs/NetworkIdResponse.md +++ b/docs/NetworkIdResponse.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**id** | **String** | | | |**name** | **String** | | | -|**routingPolicy** | [**NetworkIdRoutingPolicy**](NetworkIdRoutingPolicy.md) | | [optional] | +|**routingPolicy** | [**Map<String, NetworkIdRoutingPolicyValue>**](NetworkIdRoutingPolicyValue.md) | | [optional] | |**isDiscoverable** | **Boolean** | The specific network is discoverable. | [optional] | diff --git a/docs/NetworkIdRoutingPolicy.md b/docs/NetworkIdRoutingPolicy.md deleted file mode 100644 index 9b0ec4d..0000000 --- a/docs/NetworkIdRoutingPolicy.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# NetworkIdRoutingPolicy - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**crypto** | [**NetworkIdRoutingPolicyCrypto**](NetworkIdRoutingPolicyCrypto.md) | | [optional] | -|**sen** | [**NetworkIdRoutingPolicySen**](NetworkIdRoutingPolicySen.md) | | [optional] | -|**signet** | [**NetworkIdRoutingPolicySen**](NetworkIdRoutingPolicySen.md) | | [optional] | -|**senTest** | [**NetworkIdRoutingPolicySenTest**](NetworkIdRoutingPolicySenTest.md) | | [optional] | -|**signetTest** | [**NetworkIdRoutingPolicySenTest**](NetworkIdRoutingPolicySenTest.md) | | [optional] | - - - diff --git a/docs/NetworkIdRoutingPolicyCrypto.md b/docs/NetworkIdRoutingPolicyCrypto.md deleted file mode 100644 index fbb81a1..0000000 --- a/docs/NetworkIdRoutingPolicyCrypto.md +++ /dev/null @@ -1,37 +0,0 @@ - - -# NetworkIdRoutingPolicyCrypto - -## oneOf schemas -* [CustomCryptoRoutingDest](CustomCryptoRoutingDest.md) -* [NoneNetworkRoutingDest](NoneNetworkRoutingDest.md) - -## Example -```java -// Import classes: -import com.fireblocks.sdk.model.NetworkIdRoutingPolicyCrypto; -import com.fireblocks.sdk.model.CustomCryptoRoutingDest; -import com.fireblocks.sdk.model.NoneNetworkRoutingDest; - -public class Example { - public static void main(String[] args) { - NetworkIdRoutingPolicyCrypto exampleNetworkIdRoutingPolicyCrypto = new NetworkIdRoutingPolicyCrypto(); - - // create a new CustomCryptoRoutingDest - CustomCryptoRoutingDest exampleCustomCryptoRoutingDest = new CustomCryptoRoutingDest(); - // set NetworkIdRoutingPolicyCrypto to CustomCryptoRoutingDest - exampleNetworkIdRoutingPolicyCrypto.setActualInstance(exampleCustomCryptoRoutingDest); - // to get back the CustomCryptoRoutingDest set earlier - CustomCryptoRoutingDest testCustomCryptoRoutingDest = (CustomCryptoRoutingDest) exampleNetworkIdRoutingPolicyCrypto.getActualInstance(); - - // create a new NoneNetworkRoutingDest - NoneNetworkRoutingDest exampleNoneNetworkRoutingDest = new NoneNetworkRoutingDest(); - // set NetworkIdRoutingPolicyCrypto to NoneNetworkRoutingDest - exampleNetworkIdRoutingPolicyCrypto.setActualInstance(exampleNoneNetworkRoutingDest); - // to get back the NoneNetworkRoutingDest set earlier - NoneNetworkRoutingDest testNoneNetworkRoutingDest = (NoneNetworkRoutingDest) exampleNetworkIdRoutingPolicyCrypto.getActualInstance(); - } -} -``` - - diff --git a/docs/NetworkIdRoutingPolicySen.md b/docs/NetworkIdRoutingPolicySen.md deleted file mode 100644 index 286c5d2..0000000 --- a/docs/NetworkIdRoutingPolicySen.md +++ /dev/null @@ -1,37 +0,0 @@ - - -# NetworkIdRoutingPolicySen - -## oneOf schemas -* [CustomFiatRoutingDest](CustomFiatRoutingDest.md) -* [NoneNetworkRoutingDest](NoneNetworkRoutingDest.md) - -## Example -```java -// Import classes: -import com.fireblocks.sdk.model.NetworkIdRoutingPolicySen; -import com.fireblocks.sdk.model.CustomFiatRoutingDest; -import com.fireblocks.sdk.model.NoneNetworkRoutingDest; - -public class Example { - public static void main(String[] args) { - NetworkIdRoutingPolicySen exampleNetworkIdRoutingPolicySen = new NetworkIdRoutingPolicySen(); - - // create a new CustomFiatRoutingDest - CustomFiatRoutingDest exampleCustomFiatRoutingDest = new CustomFiatRoutingDest(); - // set NetworkIdRoutingPolicySen to CustomFiatRoutingDest - exampleNetworkIdRoutingPolicySen.setActualInstance(exampleCustomFiatRoutingDest); - // to get back the CustomFiatRoutingDest set earlier - CustomFiatRoutingDest testCustomFiatRoutingDest = (CustomFiatRoutingDest) exampleNetworkIdRoutingPolicySen.getActualInstance(); - - // create a new NoneNetworkRoutingDest - NoneNetworkRoutingDest exampleNoneNetworkRoutingDest = new NoneNetworkRoutingDest(); - // set NetworkIdRoutingPolicySen to NoneNetworkRoutingDest - exampleNetworkIdRoutingPolicySen.setActualInstance(exampleNoneNetworkRoutingDest); - // to get back the NoneNetworkRoutingDest set earlier - NoneNetworkRoutingDest testNoneNetworkRoutingDest = (NoneNetworkRoutingDest) exampleNetworkIdRoutingPolicySen.getActualInstance(); - } -} -``` - - diff --git a/docs/NetworkIdRoutingPolicySenTest.md b/docs/NetworkIdRoutingPolicySenTest.md deleted file mode 100644 index 3616556..0000000 --- a/docs/NetworkIdRoutingPolicySenTest.md +++ /dev/null @@ -1,37 +0,0 @@ - - -# NetworkIdRoutingPolicySenTest - -## oneOf schemas -* [CustomFiatRoutingDest](CustomFiatRoutingDest.md) -* [NoneNetworkRoutingDest](NoneNetworkRoutingDest.md) - -## Example -```java -// Import classes: -import com.fireblocks.sdk.model.NetworkIdRoutingPolicySenTest; -import com.fireblocks.sdk.model.CustomFiatRoutingDest; -import com.fireblocks.sdk.model.NoneNetworkRoutingDest; - -public class Example { - public static void main(String[] args) { - NetworkIdRoutingPolicySenTest exampleNetworkIdRoutingPolicySenTest = new NetworkIdRoutingPolicySenTest(); - - // create a new CustomFiatRoutingDest - CustomFiatRoutingDest exampleCustomFiatRoutingDest = new CustomFiatRoutingDest(); - // set NetworkIdRoutingPolicySenTest to CustomFiatRoutingDest - exampleNetworkIdRoutingPolicySenTest.setActualInstance(exampleCustomFiatRoutingDest); - // to get back the CustomFiatRoutingDest set earlier - CustomFiatRoutingDest testCustomFiatRoutingDest = (CustomFiatRoutingDest) exampleNetworkIdRoutingPolicySenTest.getActualInstance(); - - // create a new NoneNetworkRoutingDest - NoneNetworkRoutingDest exampleNoneNetworkRoutingDest = new NoneNetworkRoutingDest(); - // set NetworkIdRoutingPolicySenTest to NoneNetworkRoutingDest - exampleNetworkIdRoutingPolicySenTest.setActualInstance(exampleNoneNetworkRoutingDest); - // to get back the NoneNetworkRoutingDest set earlier - NoneNetworkRoutingDest testNoneNetworkRoutingDest = (NoneNetworkRoutingDest) exampleNetworkIdRoutingPolicySenTest.getActualInstance(); - } -} -``` - - diff --git a/docs/NetworkIdRoutingPolicyValue.md b/docs/NetworkIdRoutingPolicyValue.md new file mode 100644 index 0000000..4f18c9c --- /dev/null +++ b/docs/NetworkIdRoutingPolicyValue.md @@ -0,0 +1,37 @@ + + +# NetworkIdRoutingPolicyValue + +## oneOf schemas +* [CustomRoutingDest](CustomRoutingDest.md) +* [NoneNetworkRoutingDest](NoneNetworkRoutingDest.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.NetworkIdRoutingPolicyValue; +import com.fireblocks.sdk.model.CustomRoutingDest; +import com.fireblocks.sdk.model.NoneNetworkRoutingDest; + +public class Example { + public static void main(String[] args) { + NetworkIdRoutingPolicyValue exampleNetworkIdRoutingPolicyValue = new NetworkIdRoutingPolicyValue(); + + // create a new CustomRoutingDest + CustomRoutingDest exampleCustomRoutingDest = new CustomRoutingDest(); + // set NetworkIdRoutingPolicyValue to CustomRoutingDest + exampleNetworkIdRoutingPolicyValue.setActualInstance(exampleCustomRoutingDest); + // to get back the CustomRoutingDest set earlier + CustomRoutingDest testCustomRoutingDest = (CustomRoutingDest) exampleNetworkIdRoutingPolicyValue.getActualInstance(); + + // create a new NoneNetworkRoutingDest + NoneNetworkRoutingDest exampleNoneNetworkRoutingDest = new NoneNetworkRoutingDest(); + // set NetworkIdRoutingPolicyValue to NoneNetworkRoutingDest + exampleNetworkIdRoutingPolicyValue.setActualInstance(exampleNoneNetworkRoutingDest); + // to get back the NoneNetworkRoutingDest set earlier + NoneNetworkRoutingDest testNoneNetworkRoutingDest = (NoneNetworkRoutingDest) exampleNetworkIdRoutingPolicyValue.getActualInstance(); + } +} +``` + + diff --git a/docs/NftsApi.md b/docs/NftsApi.md index 74417b0..55f2a4a 100644 --- a/docs/NftsApi.md +++ b/docs/NftsApi.md @@ -1,6 +1,6 @@ # NftsApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -32,20 +32,25 @@ Returns the requested token data. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NftsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NftsApi apiInstance = new NftsApi(defaultClient); String id = "NFT-abcdefabcdefabcdefabcdefabcdefabcdefabcd"; // String | NFT ID try { - CompletableFuture> response = apiInstance.getNFT(id); + CompletableFuture> response = fireblocks.nfts().getNFT(id); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -109,24 +114,29 @@ Returns the requested tokens data. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NftsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NftsApi apiInstance = new NftsApi(defaultClient); String ids = "ids_example"; // String | A comma separated list of NFT IDs. Up to 100 are allowed in a single request. String pageCursor = "pageCursor_example"; // String | Page cursor to fetch BigDecimal pageSize = new BigDecimal(78); // BigDecimal | Items per page (max 100) List sort = Arrays.asList(); // List | Sort by param, it can be one param or a list of params separated by comma String order = "DESC"; // String | Order direction, it can be `ASC` for ascending or `DESC` for descending try { - CompletableFuture> response = apiInstance.getNFTs(ids, pageCursor, pageSize, sort, order); + CompletableFuture> response = fireblocks.nfts().getNFTs(ids, pageCursor, pageSize, sort, order); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -194,17 +204,22 @@ Returns all tokens and their data in your workspace. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NftsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NftsApi apiInstance = new NftsApi(defaultClient); String blockchainDescriptor = "ETH"; // String | Blockchain descriptor filter String vaultAccountIds = "vaultAccountIds_example"; // String | A comma separated list of Vault Account IDs. Up to 100 are allowed in a single request. This field will be ignored when walletType=END_USER_WALLET or ncwId is provided. String ncwId = "ncwId_example"; // String | Tenant's Non-Custodial Wallet ID @@ -220,7 +235,7 @@ public class Example { String search = "search_example"; // String | Search owned tokens and their collections. Possible criteria for search: token name and id within the contract/collection, collection name, blockchain descriptor and name. String spam = "true"; // String | Token ownership spam status. try { - CompletableFuture> response = apiInstance.getOwnershipTokens(blockchainDescriptor, vaultAccountIds, ncwId, ncwAccountIds, walletType, ids, collectionIds, pageCursor, pageSize, sort, order, status, search, spam); + CompletableFuture> response = fireblocks.nfts().getOwnershipTokens(blockchainDescriptor, vaultAccountIds, ncwId, ncwAccountIds, walletType, ids, collectionIds, pageCursor, pageSize, sort, order, status, search, spam); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -297,17 +312,22 @@ Returns all collections in your workspace import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NftsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NftsApi apiInstance = new NftsApi(defaultClient); String ncwId = "ncwId_example"; // String | Tenant's Non-Custodial Wallet ID String walletType = "VAULT_ACCOUNT"; // String | Wallet type, it can be `VAULT_ACCOUNT` or `END_USER_WALLET` String search = "search_example"; // String | Search owned collections. Possible criteria for search: collection name, collection contract address. @@ -317,7 +337,7 @@ public class Example { String order = "DESC"; // String | Order direction, it can be `ASC` for ascending or `DESC` for descending String status = "LISTED"; // String | Token ownership status try { - CompletableFuture> response = apiInstance.listOwnedCollections(ncwId, walletType, search, pageCursor, pageSize, sort, order, status); + CompletableFuture> response = fireblocks.nfts().listOwnedCollections(ncwId, walletType, search, pageCursor, pageSize, sort, order, status); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -388,17 +408,22 @@ Returns all owned distinct tokens (for your tenant) and their data in your works import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NftsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NftsApi apiInstance = new NftsApi(defaultClient); String ncwId = "ncwId_example"; // String | Tenant's Non-Custodial Wallet ID String walletType = "VAULT_ACCOUNT"; // String | Wallet type, it can be `VAULT_ACCOUNT` or `END_USER_WALLET` String pageCursor = "pageCursor_example"; // String | Page cursor to fetch @@ -409,7 +434,7 @@ public class Example { String search = "search_example"; // String | Search owned tokens by token name String spam = "true"; // String | Token ownership spam status. try { - CompletableFuture> response = apiInstance.listOwnedTokens(ncwId, walletType, pageCursor, pageSize, sort, order, status, search, spam); + CompletableFuture> response = fireblocks.nfts().listOwnedTokens(ncwId, walletType, pageCursor, pageSize, sort, order, status, search, spam); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -481,21 +506,26 @@ Updates the latest token metadata. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NftsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NftsApi apiInstance = new NftsApi(defaultClient); String id = "NFT-abcdefabcdefabcdefabcdefabcdefabcdefabcd"; // String | NFT ID 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 = apiInstance.refreshNFTMetadata(id, idempotencyKey); + CompletableFuture> response = fireblocks.nfts().refreshNFTMetadata(id, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -559,22 +589,27 @@ Updates all tokens and balances per blockchain and vault account. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NftsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NftsApi apiInstance = new NftsApi(defaultClient); String blockchainDescriptor = "ETH"; // String | Blockchain descriptor filter String vaultAccountId = "vaultAccountId_example"; // String | Vault account filter 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 = apiInstance.updateOwnershipTokens(blockchainDescriptor, vaultAccountId, idempotencyKey); + CompletableFuture> response = fireblocks.nfts().updateOwnershipTokens(blockchainDescriptor, vaultAccountId, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -639,22 +674,27 @@ Updates token status for a tenant, in all tenant vaults. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NftsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NftsApi apiInstance = new NftsApi(defaultClient); UpdateTokenOwnershipStatusDto updateTokenOwnershipStatusDto = new UpdateTokenOwnershipStatusDto(); // UpdateTokenOwnershipStatusDto | String id = "NFT-abcdefabcdefabcdefabcdefabcdefabcdefabcd"; // String | NFT ID 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 = apiInstance.updateTokenOwnershipStatus(updateTokenOwnershipStatusDto, id, idempotencyKey); + CompletableFuture> response = fireblocks.nfts().updateTokenOwnershipStatus(updateTokenOwnershipStatusDto, id, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -719,21 +759,26 @@ Updates tokens spam property for a tenant's token ownerships, in all tenant import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NftsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NftsApi apiInstance = new NftsApi(defaultClient); List tokenOwnershipSpamUpdatePayload = Arrays.asList(); // List | 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 = apiInstance.updateTokensOwnershipSpam(tokenOwnershipSpamUpdatePayload, idempotencyKey); + CompletableFuture> response = fireblocks.nfts().updateTokensOwnershipSpam(tokenOwnershipSpamUpdatePayload, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -799,21 +844,26 @@ Updates tokens status for a tenant, in all tenant vaults. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.NftsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - NftsApi apiInstance = new NftsApi(defaultClient); List tokenOwnershipStatusUpdatePayload = Arrays.asList(); // List | 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 = apiInstance.updateTokensOwnershipStatus(tokenOwnershipStatusUpdatePayload, idempotencyKey); + CompletableFuture> response = fireblocks.nfts().updateTokensOwnershipStatus(tokenOwnershipStatusUpdatePayload, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { diff --git a/docs/OffExchangesApi.md b/docs/OffExchangesApi.md index ceac226..e708fd1 100644 --- a/docs/OffExchangesApi.md +++ b/docs/OffExchangesApi.md @@ -1,6 +1,6 @@ # OffExchangesApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -27,21 +27,26 @@ add collateral, create deposit request import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.OffExchangesApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - OffExchangesApi apiInstance = new OffExchangesApi(defaultClient); AddCollateralRequestBody addCollateralRequestBody = new AddCollateralRequestBody(); // AddCollateralRequestBody | 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 = apiInstance.addOffExchange(addCollateralRequestBody, idempotencyKey); + CompletableFuture> response = fireblocks.offExchanges().addOffExchange(addCollateralRequestBody, 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()); @@ -107,20 +112,25 @@ Returns a collateral account by mainExchangeAccountId. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.OffExchangesApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - OffExchangesApi apiInstance = new OffExchangesApi(defaultClient); String mainExchangeAccountId = "mainExchangeAccountId_example"; // String | The id of the main exchange account for which the requested collateral account is associated with try { - CompletableFuture> response = apiInstance.getOffExchangeCollateralAccounts(mainExchangeAccountId); + CompletableFuture> response = fireblocks.offExchanges().getOffExchangeCollateralAccounts(mainExchangeAccountId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -185,20 +195,25 @@ get settlements transactions from exchange import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.OffExchangesApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - OffExchangesApi apiInstance = new OffExchangesApi(defaultClient); String mainExchangeAccountId = "mainExchangeAccountId_example"; // String | try { - CompletableFuture> response = apiInstance.getOffExchangeSettlementTransactions(mainExchangeAccountId); + CompletableFuture> response = fireblocks.offExchanges().getOffExchangeSettlementTransactions(mainExchangeAccountId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -263,21 +278,26 @@ remove collateral, create withdraw request import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.OffExchangesApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - OffExchangesApi apiInstance = new OffExchangesApi(defaultClient); RemoveCollateralRequestBody removeCollateralRequestBody = new RemoveCollateralRequestBody(); // RemoveCollateralRequestBody | 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 = apiInstance.removeOffExchange(removeCollateralRequestBody, idempotencyKey); + CompletableFuture> response = fireblocks.offExchanges().removeOffExchange(removeCollateralRequestBody, 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()); @@ -343,21 +363,26 @@ create settlement for a trader import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.OffExchangesApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - OffExchangesApi apiInstance = new OffExchangesApi(defaultClient); SettlementRequestBody settlementRequestBody = new SettlementRequestBody(); // SettlementRequestBody | 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 = apiInstance.settleOffExchangeTrades(settlementRequestBody, idempotencyKey); + CompletableFuture> response = fireblocks.offExchanges().settleOffExchangeTrades(settlementRequestBody, 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()); diff --git a/docs/OneTimeAddressAccount.md b/docs/OneTimeAddressAccount.md new file mode 100644 index 0000000..468880e --- /dev/null +++ b/docs/OneTimeAddressAccount.md @@ -0,0 +1,14 @@ + + +# OneTimeAddressAccount + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**oneTimeAddress** | **String** | | | +|**tag** | **String** | | [optional] | + + + diff --git a/docs/OperationExecutionFailure.md b/docs/OperationExecutionFailure.md new file mode 100644 index 0000000..349ca4a --- /dev/null +++ b/docs/OperationExecutionFailure.md @@ -0,0 +1,14 @@ + + +# OperationExecutionFailure + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**reason** | **String** | | | +|**data** | **Map<String, Object>** | | [optional] | + + + diff --git a/docs/OtaBetaApi.md b/docs/OtaBetaApi.md index 5f553fa..f870071 100644 --- a/docs/OtaBetaApi.md +++ b/docs/OtaBetaApi.md @@ -1,6 +1,6 @@ # OtaBetaApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -24,19 +24,24 @@ Returns current OTA status import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.OtaBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - OtaBetaApi apiInstance = new OtaBetaApi(defaultClient); try { - CompletableFuture> response = apiInstance.getOtaStatus(); + CompletableFuture> response = fireblocks.otaBeta().getOtaStatus(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -85,7 +90,7 @@ No authorization required ## setOtaStatus -> CompletableFuture> setOtaStatus setOtaStatus(setOtaStatusRequest, idempotencyKey) +> CompletableFuture> setOtaStatus setOtaStatus(setOtaStatusRequest, idempotencyKey) Enable or disable transactions to OTA @@ -98,23 +103,29 @@ Enable or disable transactions to OTA import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.OtaBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - OtaBetaApi apiInstance = new OtaBetaApi(defaultClient); SetOtaStatusRequest setOtaStatusRequest = new SetOtaStatusRequest(); // SetOtaStatusRequest | 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 = apiInstance.setOtaStatus(setOtaStatusRequest, idempotencyKey); + CompletableFuture> response = fireblocks.otaBeta().setOtaStatus(setOtaStatusRequest, 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 OtaBetaApi#setOtaStatus"); @@ -143,8 +154,8 @@ public class Example { ### Return type +CompletableFuture> -CompletableFuture> ### Authorization @@ -153,12 +164,12 @@ No authorization required ### HTTP request headers - **Content-Type**: application/json -- **Accept**: Not defined +- **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **202** | Successfully updated OTA status | - | +| **202** | Successfully updated OTA status | * X-Request-ID -
| | **400** | Bad request | - | | **409** | Similar request already pending | - | | **500** | Internal server error | - | diff --git a/docs/PaymentsPayoutApi.md b/docs/PaymentsPayoutApi.md index 256f11f..1a7c427 100644 --- a/docs/PaymentsPayoutApi.md +++ b/docs/PaymentsPayoutApi.md @@ -1,6 +1,6 @@ # PaymentsPayoutApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -25,21 +25,26 @@ Create a payout instruction set import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.PaymentsPayoutApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - PaymentsPayoutApi apiInstance = new PaymentsPayoutApi(defaultClient); CreatePayoutRequest createPayoutRequest = new CreatePayoutRequest(); // CreatePayoutRequest | 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 = apiInstance.createPayout(createPayoutRequest, idempotencyKey); + CompletableFuture> response = fireblocks.paymentsPayout().createPayout(createPayoutRequest, 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()); @@ -107,21 +112,26 @@ Execute a payout instruction set import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.PaymentsPayoutApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - PaymentsPayoutApi apiInstance = new PaymentsPayoutApi(defaultClient); String payoutId = "1fe3b61f-7e1f-4a19-aff0-4f0a524d44d7"; // String | the payout id received from the creation of the payout instruction set 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 = apiInstance.executePayoutAction(payoutId, idempotencyKey); + CompletableFuture> response = fireblocks.paymentsPayout().executePayoutAction(payoutId, 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()); @@ -189,20 +199,25 @@ Get the status of a payout instruction set import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.PaymentsPayoutApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - PaymentsPayoutApi apiInstance = new PaymentsPayoutApi(defaultClient); String payoutId = "1fe3b61f-7e1f-4a19-aff0-4f0a524d44d7"; // String | the payout id received from the creation of the payout instruction set try { - CompletableFuture> response = apiInstance.getPayout(payoutId); + CompletableFuture> response = fireblocks.paymentsPayout().getPayout(payoutId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); diff --git a/docs/PolicyEditorBetaApi.md b/docs/PolicyEditorBetaApi.md index 8248809..ec1b551 100644 --- a/docs/PolicyEditorBetaApi.md +++ b/docs/PolicyEditorBetaApi.md @@ -1,6 +1,6 @@ # PolicyEditorBetaApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -27,19 +27,24 @@ Returns the active policy and its validation. </br> **Note:** These endpoi import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.PolicyEditorBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - PolicyEditorBetaApi apiInstance = new PolicyEditorBetaApi(defaultClient); try { - CompletableFuture> response = apiInstance.getActivePolicy(); + CompletableFuture> response = fireblocks.policyEditorBeta().getActivePolicy(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -101,19 +106,24 @@ Returns the active draft and its validation. </br> **Note:** These endpoin import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.PolicyEditorBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - PolicyEditorBetaApi apiInstance = new PolicyEditorBetaApi(defaultClient); try { - CompletableFuture> response = apiInstance.getDraft(); + CompletableFuture> response = fireblocks.policyEditorBeta().getDraft(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -175,21 +185,26 @@ Send publish request of certain draft id and returns the response. </br> * import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.PolicyEditorBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - PolicyEditorBetaApi apiInstance = new PolicyEditorBetaApi(defaultClient); PublishDraftRequest publishDraftRequest = new PublishDraftRequest(); // PublishDraftRequest | 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 = apiInstance.publishDraft(publishDraftRequest, idempotencyKey); + CompletableFuture> response = fireblocks.policyEditorBeta().publishDraft(publishDraftRequest, 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()); @@ -255,21 +270,26 @@ Send publish request of set of policy rules and returns the response. </br> import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.PolicyEditorBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - PolicyEditorBetaApi apiInstance = new PolicyEditorBetaApi(defaultClient); PolicyRules policyRules = new PolicyRules(); // PolicyRules | 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 = apiInstance.publishPolicyRules(policyRules, idempotencyKey); + CompletableFuture> response = fireblocks.policyEditorBeta().publishPolicyRules(policyRules, 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()); @@ -335,21 +355,26 @@ Update the draft and return its validation. </br> **Note:** These endpoint import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.PolicyEditorBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - PolicyEditorBetaApi apiInstance = new PolicyEditorBetaApi(defaultClient); PolicyRules policyRules = new PolicyRules(); // PolicyRules | 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 = apiInstance.updateDraft(policyRules, idempotencyKey); + CompletableFuture> response = fireblocks.policyEditorBeta().updateDraft(policyRules, 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()); diff --git a/docs/PreScreening.md b/docs/PreScreening.md new file mode 100644 index 0000000..abf0fb5 --- /dev/null +++ b/docs/PreScreening.md @@ -0,0 +1,13 @@ + + +# PreScreening + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enabled** | **Boolean** | | | + + + diff --git a/docs/RedeemFundsToLinkedDDAResponse.md b/docs/RedeemFundsToLinkedDDAResponse.md new file mode 100644 index 0000000..b6abde4 --- /dev/null +++ b/docs/RedeemFundsToLinkedDDAResponse.md @@ -0,0 +1,13 @@ + + +# RedeemFundsToLinkedDDAResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**success** | **Boolean** | Indicates whether the funds were successfully redeemed to the linked DDA | | + + + diff --git a/docs/RegisterNewAssetRequest.md b/docs/RegisterNewAssetRequest.md new file mode 100644 index 0000000..e135305 --- /dev/null +++ b/docs/RegisterNewAssetRequest.md @@ -0,0 +1,15 @@ + + +# RegisterNewAssetRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**blockchainId** | **String** | Native asset of blockchain | | +|**address** | **String** | Asset address | | +|**symbol** | **String** | Asset symbol | [optional] | + + + diff --git a/docs/RenameVaultAccountResponse.md b/docs/RenameVaultAccountResponse.md new file mode 100644 index 0000000..3cb7316 --- /dev/null +++ b/docs/RenameVaultAccountResponse.md @@ -0,0 +1,14 @@ + + +# RenameVaultAccountResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The new name of the vault account | [optional] | +|**id** | **String** | The ID of the vault account | [optional] | + + + diff --git a/docs/ResendWebhooksByTransactionIdResponse.md b/docs/ResendWebhooksByTransactionIdResponse.md new file mode 100644 index 0000000..53f8327 --- /dev/null +++ b/docs/ResendWebhooksByTransactionIdResponse.md @@ -0,0 +1,13 @@ + + +# ResendWebhooksByTransactionIdResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**success** | **Boolean** | Indicates whether the webhooks were successfully resent | | + + + diff --git a/docs/ResetDeviceApi.md b/docs/ResetDeviceApi.md index 0f1916d..5b36806 100644 --- a/docs/ResetDeviceApi.md +++ b/docs/ResetDeviceApi.md @@ -1,6 +1,6 @@ # ResetDeviceApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -23,21 +23,26 @@ resets device import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.ResetDeviceApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - ResetDeviceApi apiInstance = new ResetDeviceApi(defaultClient); String id = "id_example"; // String | The ID of the user 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 = apiInstance.resetDevice(id, idempotencyKey); + CompletableFuture> response = fireblocks.resetDevice().resetDevice(id, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -83,7 +88,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | User sent for creation | * X-Request-ID -
| +| **200** | User sent for creation | * X-Request-ID -
| | **401** | Unauthorized. Missing / invalid JWT token in Authorization header. | * X-Request-ID -
| | **403** | Lacking permissions. | * X-Request-ID -
| | **5XX** | Internal error. | * X-Request-ID -
| diff --git a/docs/ScreeningOperationExecution.md b/docs/ScreeningOperationExecution.md new file mode 100644 index 0000000..64b1184 --- /dev/null +++ b/docs/ScreeningOperationExecution.md @@ -0,0 +1,16 @@ + + +# ScreeningOperationExecution + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**output** | [**ScreeningOperationExecutionOutput**](ScreeningOperationExecutionOutput.md) | | [optional] | +|**startedAt** | **BigDecimal** | | | +|**finishedAt** | **BigDecimal** | | [optional] | +|**failure** | [**ScreeningOperationFailure**](ScreeningOperationFailure.md) | | [optional] | + + + diff --git a/docs/ScreeningOperationExecutionOutput.md b/docs/ScreeningOperationExecutionOutput.md new file mode 100644 index 0000000..81cc736 --- /dev/null +++ b/docs/ScreeningOperationExecutionOutput.md @@ -0,0 +1,13 @@ + + +# ScreeningOperationExecutionOutput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**verdicts** | [**List<ScreeningVerdict>**](ScreeningVerdict.md) | | | + + + diff --git a/docs/ScreeningOperationFailure.md b/docs/ScreeningOperationFailure.md new file mode 100644 index 0000000..76cbde2 --- /dev/null +++ b/docs/ScreeningOperationFailure.md @@ -0,0 +1,23 @@ + + +# ScreeningOperationFailure + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**reason** | [**ReasonEnum**](#ReasonEnum) | | | +|**data** | [**ScreeningOperationExecutionOutput**](ScreeningOperationExecutionOutput.md) | | [optional] | + + + +## Enum: ReasonEnum + +| Name | Value | +|---- | -----| +| AML_PROCESS_FAILED | "AML_PROCESS_FAILED" | +| SCREENING_REJECTED | "SCREENING_REJECTED" | + + + diff --git a/docs/ScreeningOperationType.md b/docs/ScreeningOperationType.md new file mode 100644 index 0000000..cec8e2a --- /dev/null +++ b/docs/ScreeningOperationType.md @@ -0,0 +1,11 @@ + + +# ScreeningOperationType + +## Enum + + +* `SCREENING` (value: `"SCREENING"`) + + + diff --git a/docs/ScreeningValidationFailure.md b/docs/ScreeningValidationFailure.md new file mode 100644 index 0000000..2231a4d --- /dev/null +++ b/docs/ScreeningValidationFailure.md @@ -0,0 +1,22 @@ + + +# ScreeningValidationFailure + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**reason** | [**ReasonEnum**](#ReasonEnum) | | | +|**data** | **Map<String, Object>** | | [optional] | + + + +## Enum: ReasonEnum + +| Name | Value | +|---- | -----| +| SCREENING_DISABLED_IN_TENANT | "SCREENING_DISABLED_IN_TENANT" | + + + diff --git a/docs/ScreeningVerdict.md b/docs/ScreeningVerdict.md new file mode 100644 index 0000000..639df89 --- /dev/null +++ b/docs/ScreeningVerdict.md @@ -0,0 +1,30 @@ + + +# ScreeningVerdict + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**verdict** | [**VerdictEnum**](#VerdictEnum) | | | +|**executionOperationId** | **String** | | | +|**account** | [**Destination**](Destination.md) | | | +|**assetId** | **String** | | | +|**amount** | **String** | | | +|**matchedRule** | [**ScreeningVerdictMatchedRule**](ScreeningVerdictMatchedRule.md) | | [optional] | + + + +## Enum: VerdictEnum + +| Name | Value | +|---- | -----| +| PASSED | "PASSED" | +| PASSED_WITH_ALERT | "PASSED_WITH_ALERT" | +| REJECTED | "REJECTED" | +| FAILED | "FAILED" | +| BYPASSED | "BYPASSED" | + + + diff --git a/docs/ScreeningVerdictMatchedRule.md b/docs/ScreeningVerdictMatchedRule.md new file mode 100644 index 0000000..602358c --- /dev/null +++ b/docs/ScreeningVerdictMatchedRule.md @@ -0,0 +1,14 @@ + + +# ScreeningVerdictMatchedRule + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**action** | **String** | | [optional] | +|**category** | **List<String>** | | [optional] | + + + diff --git a/docs/SetAdminQuorumThresholdResponse.md b/docs/SetAdminQuorumThresholdResponse.md new file mode 100644 index 0000000..b494742 --- /dev/null +++ b/docs/SetAdminQuorumThresholdResponse.md @@ -0,0 +1,13 @@ + + +# SetAdminQuorumThresholdResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | The message which indicates the result of the operation. | | + + + diff --git a/docs/SetNetworkIdRoutingPolicyRequest.md b/docs/SetNetworkIdRoutingPolicyRequest.md index 517df58..f74483f 100644 --- a/docs/SetNetworkIdRoutingPolicyRequest.md +++ b/docs/SetNetworkIdRoutingPolicyRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**routingPolicy** | [**NetworkIdRoutingPolicy**](NetworkIdRoutingPolicy.md) | | | +|**routingPolicy** | [**Map<String, NetworkIdRoutingPolicyValue>**](NetworkIdRoutingPolicyValue.md) | | | diff --git a/docs/SetOtaStatusResponse.md b/docs/SetOtaStatusResponse.md new file mode 100644 index 0000000..ee1e15b --- /dev/null +++ b/docs/SetOtaStatusResponse.md @@ -0,0 +1,37 @@ + + +# SetOtaStatusResponse + +## oneOf schemas +* [SetOtaStatusResponseOneOf](SetOtaStatusResponseOneOf.md) +* [String](String.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.SetOtaStatusResponse; +import com.fireblocks.sdk.model.SetOtaStatusResponseOneOf; +import com.fireblocks.sdk.model.String; + +public class Example { + public static void main(String[] args) { + SetOtaStatusResponse exampleSetOtaStatusResponse = new SetOtaStatusResponse(); + + // create a new SetOtaStatusResponseOneOf + SetOtaStatusResponseOneOf exampleSetOtaStatusResponseOneOf = new SetOtaStatusResponseOneOf(); + // set SetOtaStatusResponse to SetOtaStatusResponseOneOf + exampleSetOtaStatusResponse.setActualInstance(exampleSetOtaStatusResponseOneOf); + // to get back the SetOtaStatusResponseOneOf set earlier + SetOtaStatusResponseOneOf testSetOtaStatusResponseOneOf = (SetOtaStatusResponseOneOf) exampleSetOtaStatusResponse.getActualInstance(); + + // create a new String + String exampleString = new String(); + // set SetOtaStatusResponse to String + exampleSetOtaStatusResponse.setActualInstance(exampleString); + // to get back the String set earlier + String testString = (String) exampleSetOtaStatusResponse.getActualInstance(); + } +} +``` + + diff --git a/docs/SetOtaStatusResponseOneOf.md b/docs/SetOtaStatusResponseOneOf.md new file mode 100644 index 0000000..af6fe91 --- /dev/null +++ b/docs/SetOtaStatusResponseOneOf.md @@ -0,0 +1,13 @@ + + +# SetOtaStatusResponseOneOf + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | Message indicating the result of the operation for example when no config change is needed | [optional] | + + + diff --git a/docs/SetRoutingPolicyRequest.md b/docs/SetRoutingPolicyRequest.md index ee8f14f..3cc69d4 100644 --- a/docs/SetRoutingPolicyRequest.md +++ b/docs/SetRoutingPolicyRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**routingPolicy** | [**NetworkConnectionRoutingPolicy**](NetworkConnectionRoutingPolicy.md) | | | +|**routingPolicy** | [**Map<String, NetworkConnectionRoutingPolicyValue>**](NetworkConnectionRoutingPolicyValue.md) | | | diff --git a/docs/SmartTransferApi.md b/docs/SmartTransferApi.md index a51b253..56452f1 100644 --- a/docs/SmartTransferApi.md +++ b/docs/SmartTransferApi.md @@ -1,6 +1,6 @@ # SmartTransferApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -38,21 +38,26 @@ Cancel Smart Transfer ticket import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.SmartTransferApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - SmartTransferApi apiInstance = new SmartTransferApi(defaultClient); String ticketId = "ticketId_example"; // String | 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 = apiInstance.cancelTicket(ticketId, idempotencyKey); + CompletableFuture> response = fireblocks.smartTransfer().cancelTicket(ticketId, 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()); @@ -120,21 +125,26 @@ Creates new Smart Transfer ticket import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.SmartTransferApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - SmartTransferApi apiInstance = new SmartTransferApi(defaultClient); SmartTransferCreateTicket smartTransferCreateTicket = new SmartTransferCreateTicket(); // SmartTransferCreateTicket | 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 = apiInstance.createTicket(smartTransferCreateTicket, idempotencyKey); + CompletableFuture> response = fireblocks.smartTransfer().createTicket(smartTransferCreateTicket, 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()); @@ -201,22 +211,27 @@ Creates new smart transfer ticket term (when the ticket status is DRAFT) import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.SmartTransferApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - SmartTransferApi apiInstance = new SmartTransferApi(defaultClient); SmartTransferCreateTicketTerm smartTransferCreateTicketTerm = new SmartTransferCreateTicketTerm(); // SmartTransferCreateTicketTerm | String ticketId = "ticketId_example"; // String | 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 = apiInstance.createTicketTerm(smartTransferCreateTicketTerm, ticketId, idempotencyKey); + CompletableFuture> response = fireblocks.smartTransfer().createTicketTerm(smartTransferCreateTicketTerm, ticketId, 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()); @@ -284,20 +299,25 @@ Find Smart Transfer ticket by id import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.SmartTransferApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - SmartTransferApi apiInstance = new SmartTransferApi(defaultClient); String ticketId = "ticketId_example"; // String | try { - CompletableFuture> response = apiInstance.findTicketById(ticketId); + CompletableFuture> response = fireblocks.smartTransfer().findTicketById(ticketId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -363,21 +383,26 @@ Find Smart Transfer ticket term by id import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.SmartTransferApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - SmartTransferApi apiInstance = new SmartTransferApi(defaultClient); String ticketId = "ticketId_example"; // String | String termId = "termId_example"; // String | try { - CompletableFuture> response = apiInstance.findTicketTermById(ticketId, termId); + CompletableFuture> response = fireblocks.smartTransfer().findTicketTermById(ticketId, termId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -444,21 +469,26 @@ Manually fulfill ticket, in case when all terms (legs) are funded manually import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.SmartTransferApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - SmartTransferApi apiInstance = new SmartTransferApi(defaultClient); String ticketId = "ticketId_example"; // String | 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 = apiInstance.fulfillTicket(ticketId, idempotencyKey); + CompletableFuture> response = fireblocks.smartTransfer().fulfillTicket(ticketId, 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()); @@ -526,23 +556,28 @@ Set funding source for ticket term (in case of ASYNC tickets, this will execute import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.SmartTransferApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - SmartTransferApi apiInstance = new SmartTransferApi(defaultClient); SmartTransferFundTerm smartTransferFundTerm = new SmartTransferFundTerm(); // SmartTransferFundTerm | String ticketId = "ticketId_example"; // String | String termId = "termId_example"; // String | 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 = apiInstance.fundTicketTerm(smartTransferFundTerm, ticketId, termId, idempotencyKey); + CompletableFuture> response = fireblocks.smartTransfer().fundTicketTerm(smartTransferFundTerm, ticketId, termId, 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()); @@ -612,19 +647,24 @@ Get Smart Transfer user groups import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.SmartTransferApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - SmartTransferApi apiInstance = new SmartTransferApi(defaultClient); try { - CompletableFuture> response = apiInstance.getSmartTransferUserGroups(); + CompletableFuture> response = fireblocks.smartTransfer().getSmartTransferUserGroups(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -687,23 +727,28 @@ Manually set ticket term transaction import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.SmartTransferApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - SmartTransferApi apiInstance = new SmartTransferApi(defaultClient); SmartTransferManuallyFundTerm smartTransferManuallyFundTerm = new SmartTransferManuallyFundTerm(); // SmartTransferManuallyFundTerm | String ticketId = "ticketId_example"; // String | String termId = "termId_example"; // String | 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 = apiInstance.manuallyFundTicketTerm(smartTransferManuallyFundTerm, ticketId, termId, idempotencyKey); + CompletableFuture> response = fireblocks.smartTransfer().manuallyFundTicketTerm(smartTransferManuallyFundTerm, ticketId, termId, 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()); @@ -773,21 +818,26 @@ Delete ticket term when ticket is in DRAFT status import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.SmartTransferApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - SmartTransferApi apiInstance = new SmartTransferApi(defaultClient); String ticketId = "ticketId_example"; // String | String termId = "termId_example"; // String | try { - CompletableFuture> response = apiInstance.removeTicketTerm(ticketId, termId); + CompletableFuture> response = fireblocks.smartTransfer().removeTicketTerm(ticketId, termId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -853,17 +903,22 @@ Finds Smart Transfer tickets that match the submitted criteria import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.SmartTransferApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - SmartTransferApi apiInstance = new SmartTransferApi(defaultClient); String q = "q_example"; // String | Search string - counterparty name or asset or ticketId. Optional List statuses = Arrays.asList(); // List | Ticket statuses for Smart Transfer tickets. Optional String networkId = "networkId_example"; // String | NetworkId that is used in the ticket . Optional @@ -875,7 +930,7 @@ public class Example { String after = "after_example"; // String | ID of the record after which to fetch $limit records BigDecimal limit = new BigDecimal(78); // BigDecimal | Number of records to fetch. By default, it is 100 try { - CompletableFuture> response = apiInstance.searchTickets(q, statuses, networkId, createdByMe, expiresAfter, expiresBefore, type, externalRefId, after, limit); + CompletableFuture> response = fireblocks.smartTransfer().searchTickets(q, statuses, networkId, createdByMe, expiresAfter, expiresBefore, type, externalRefId, after, limit); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -949,22 +1004,27 @@ Set external id Smart Transfer ticket import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.SmartTransferApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - SmartTransferApi apiInstance = new SmartTransferApi(defaultClient); SmartTransferSetTicketExternalId smartTransferSetTicketExternalId = new SmartTransferSetTicketExternalId(); // SmartTransferSetTicketExternalId | String ticketId = "ticketId_example"; // String | 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 = apiInstance.setExternalRefId(smartTransferSetTicketExternalId, ticketId, idempotencyKey); + CompletableFuture> response = fireblocks.smartTransfer().setExternalRefId(smartTransferSetTicketExternalId, ticketId, 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()); @@ -1033,22 +1093,27 @@ Set expiration date on Smart Transfer ticket import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.SmartTransferApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - SmartTransferApi apiInstance = new SmartTransferApi(defaultClient); SmartTransferSetTicketExpiration smartTransferSetTicketExpiration = new SmartTransferSetTicketExpiration(); // SmartTransferSetTicketExpiration | String ticketId = "ticketId_example"; // String | 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 = apiInstance.setTicketExpiration(smartTransferSetTicketExpiration, ticketId, idempotencyKey); + CompletableFuture> response = fireblocks.smartTransfer().setTicketExpiration(smartTransferSetTicketExpiration, ticketId, 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()); @@ -1117,21 +1182,26 @@ Set Smart Transfer user group import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.SmartTransferApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - SmartTransferApi apiInstance = new SmartTransferApi(defaultClient); SmartTransferSetUserGroups smartTransferSetUserGroups = new SmartTransferSetUserGroups(); // SmartTransferSetUserGroups | 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 = apiInstance.setUserGroups(smartTransferSetUserGroups, idempotencyKey); + CompletableFuture> response = fireblocks.smartTransfer().setUserGroups(smartTransferSetUserGroups, 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()); @@ -1198,22 +1268,27 @@ Submit Smart Transfer ticket - change status into ready for approval if auto app import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.SmartTransferApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - SmartTransferApi apiInstance = new SmartTransferApi(defaultClient); SmartTransferSubmitTicket smartTransferSubmitTicket = new SmartTransferSubmitTicket(); // SmartTransferSubmitTicket | String ticketId = "ticketId_example"; // String | 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 = apiInstance.submitTicket(smartTransferSubmitTicket, ticketId, idempotencyKey); + CompletableFuture> response = fireblocks.smartTransfer().submitTicket(smartTransferSubmitTicket, ticketId, 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()); @@ -1282,23 +1357,28 @@ Update ticket term (when ticket status is DRAFT) import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.SmartTransferApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - SmartTransferApi apiInstance = new SmartTransferApi(defaultClient); SmartTransferUpdateTicketTerm smartTransferUpdateTicketTerm = new SmartTransferUpdateTicketTerm(); // SmartTransferUpdateTicketTerm | String ticketId = "ticketId_example"; // String | String termId = "termId_example"; // String | 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 = apiInstance.updateTicketTerm(smartTransferUpdateTicketTerm, ticketId, termId, idempotencyKey); + CompletableFuture> response = fireblocks.smartTransfer().updateTicketTerm(smartTransferUpdateTicketTerm, ticketId, termId, 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()); diff --git a/docs/StakingBetaApi.md b/docs/StakingBetaApi.md index 57437ab..6ecf3f0 100644 --- a/docs/StakingBetaApi.md +++ b/docs/StakingBetaApi.md @@ -1,6 +1,6 @@ # StakingBetaApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -31,21 +31,26 @@ Approve the terms of service of the staking provider. This must be called before import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.StakingBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - StakingBetaApi apiInstance = new StakingBetaApi(defaultClient); String providerId = "kiln"; // String | The unique identifier of the staking provider 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 = apiInstance.approveTermsOfServiceByProviderId(providerId, idempotencyKey); + CompletableFuture> response = fireblocks.stakingBeta().approveTermsOfServiceByProviderId(providerId, 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()); @@ -110,23 +115,28 @@ Perform a chain-specific staking action (e.g. stake, unstake, withdraw). import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.StakingBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - StakingBetaApi apiInstance = new StakingBetaApi(defaultClient); ExecuteActionRequest executeActionRequest = new ExecuteActionRequest(); // ExecuteActionRequest | String chainDescriptor = "ETH"; // String | The protocol identifier (e.g. \"ETH\"/\"SOL\") to use String actionId = "stake"; // String | The operation that can be executed on a vault/position 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 = apiInstance.executeAction(executeActionRequest, chainDescriptor, actionId, idempotencyKey); + CompletableFuture> response = fireblocks.stakingBeta().executeAction(executeActionRequest, chainDescriptor, actionId, 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()); @@ -193,20 +203,25 @@ Return detailed information on all staking positions, including the staked amoun import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.StakingBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - StakingBetaApi apiInstance = new StakingBetaApi(defaultClient); String chainDescriptor = "chainDescriptor_example"; // String | Use \"ETH\" / \"SOL\" in order to obtain information related to the specific blockchain network or retrieve information about all chains that have data available by providing no argument. try { - CompletableFuture>> response = apiInstance.getAllDelegations(chainDescriptor); + CompletableFuture>> response = fireblocks.stakingBeta().getAllDelegations(chainDescriptor); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -270,20 +285,25 @@ Return chain-specific, staking-related information summary (e.g. epoch details, import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.StakingBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - StakingBetaApi apiInstance = new StakingBetaApi(defaultClient); String chainDescriptor = "ETH"; // String | The protocol identifier (e.g. \"ETH\"/\"SOL\") to use try { - CompletableFuture> response = apiInstance.getChainInfo(chainDescriptor); + CompletableFuture> response = fireblocks.stakingBeta().getChainInfo(chainDescriptor); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -347,19 +367,24 @@ Return an alphabetical list of supported chains. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.StakingBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - StakingBetaApi apiInstance = new StakingBetaApi(defaultClient); try { - CompletableFuture>> response = apiInstance.getChains(); + CompletableFuture>> response = fireblocks.stakingBeta().getChains(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -420,20 +445,25 @@ Return detailed information on a staking position, including the staked amount, import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.StakingBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - StakingBetaApi apiInstance = new StakingBetaApi(defaultClient); String id = "id_example"; // String | The unique identifier of the staking position try { - CompletableFuture> response = apiInstance.getDelegationById(id); + CompletableFuture> response = fireblocks.stakingBeta().getDelegationById(id); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -497,19 +527,24 @@ Return information on all the available staking providers. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.StakingBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - StakingBetaApi apiInstance = new StakingBetaApi(defaultClient); try { - CompletableFuture>> response = apiInstance.getProviders(); + CompletableFuture>> response = fireblocks.stakingBeta().getProviders(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -570,19 +605,24 @@ Return a summary of all vaults, categorized by their status (active, inactive), import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.StakingBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - StakingBetaApi apiInstance = new StakingBetaApi(defaultClient); try { - CompletableFuture> response = apiInstance.getSummary(); + CompletableFuture> response = fireblocks.stakingBeta().getSummary(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -643,19 +683,24 @@ Return a summary for each vault, categorized by their status (active, inactive), import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.StakingBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - StakingBetaApi apiInstance = new StakingBetaApi(defaultClient); try { - CompletableFuture>> response = apiInstance.getSummaryByVault(); + CompletableFuture>> response = fireblocks.stakingBeta().getSummaryByVault(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); diff --git a/docs/TransactionsApi.md b/docs/TransactionsApi.md index 9b8457e..d8cc1ef 100644 --- a/docs/TransactionsApi.md +++ b/docs/TransactionsApi.md @@ -1,6 +1,6 @@ # TransactionsApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -35,22 +35,27 @@ Cancels a transaction by ID. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.TransactionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - TransactionsApi apiInstance = new TransactionsApi(defaultClient); String txId = "txId_example"; // String | The ID of the transaction to cancel UUID xEndUserWalletId = UUID.randomUUID(); // UUID | Unique ID of the End-User wallet to the API request. Required for end-user wallet operations. 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 = apiInstance.cancelTransaction(txId, xEndUserWalletId, idempotencyKey); + CompletableFuture> response = fireblocks.transactions().cancelTransaction(txId, xEndUserWalletId, 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()); @@ -117,22 +122,27 @@ Creates a new transaction. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.TransactionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - TransactionsApi apiInstance = new TransactionsApi(defaultClient); TransactionRequest transactionRequest = new TransactionRequest(); // TransactionRequest | UUID xEndUserWalletId = UUID.randomUUID(); // UUID | Unique ID of the End-User wallet to the API request. Required for end-user wallet operations. 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 = apiInstance.createTransaction(transactionRequest, xEndUserWalletId, idempotencyKey); + CompletableFuture> response = fireblocks.transactions().createTransaction(transactionRequest, xEndUserWalletId, 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()); @@ -199,23 +209,28 @@ Drops a stuck ETH transaction and creates a replacement transaction. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.TransactionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - TransactionsApi apiInstance = new TransactionsApi(defaultClient); String txId = "txId_example"; // String | The ID of the transaction DropTransactionRequest dropTransactionRequest = new DropTransactionRequest(); // DropTransactionRequest | UUID xEndUserWalletId = UUID.randomUUID(); // UUID | Unique ID of the End-User wallet to the API request. Required for end-user wallet operations. 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 = apiInstance.dropTransaction(txId, dropTransactionRequest, xEndUserWalletId, idempotencyKey); + CompletableFuture> response = fireblocks.transactions().dropTransaction(txId, dropTransactionRequest, xEndUserWalletId, 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()); @@ -283,20 +298,25 @@ Gets the estimated required fee for an asset. For UTXO based assets, the respons import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.TransactionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - TransactionsApi apiInstance = new TransactionsApi(defaultClient); String assetId = "assetId_example"; // String | The asset for which to estimate the fee try { - CompletableFuture> response = apiInstance.estimateNetworkFee(assetId); + CompletableFuture> response = fireblocks.transactions().estimateNetworkFee(assetId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -361,21 +381,26 @@ Estimates the transaction fee for a transaction request. * Note: Supports all Fi import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.TransactionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - TransactionsApi apiInstance = new TransactionsApi(defaultClient); TransactionRequest transactionRequest = new TransactionRequest(); // TransactionRequest | 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 = apiInstance.estimateTransactionFee(transactionRequest, idempotencyKey); + CompletableFuture> response = fireblocks.transactions().estimateTransactionFee(transactionRequest, 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()); @@ -441,22 +466,27 @@ Freezes a transaction by ID. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.TransactionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - TransactionsApi apiInstance = new TransactionsApi(defaultClient); String txId = "txId_example"; // String | The ID of the transaction to freeze UUID xEndUserWalletId = UUID.randomUUID(); // UUID | Unique ID of the End-User wallet to the API request. Required for end-user wallet operations. 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 = apiInstance.freezeTransaction(txId, xEndUserWalletId, idempotencyKey); + CompletableFuture> response = fireblocks.transactions().freezeTransaction(txId, xEndUserWalletId, 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()); @@ -522,20 +552,25 @@ Returns a transaction by ID. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.TransactionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - TransactionsApi apiInstance = new TransactionsApi(defaultClient); String txId = "00000000-0000-0000-0000-000000000000"; // String | The ID of the transaction to return try { - CompletableFuture> response = apiInstance.getTransaction(txId); + CompletableFuture> response = fireblocks.transactions().getTransaction(txId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -601,20 +636,25 @@ Returns transaction by external transaction ID. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.TransactionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - TransactionsApi apiInstance = new TransactionsApi(defaultClient); String externalTxId = "00000000-0000-0000-0000-000000000000"; // String | The external ID of the transaction to return try { - CompletableFuture> response = apiInstance.getTransactionByExternalId(externalTxId); + CompletableFuture> response = fireblocks.transactions().getTransactionByExternalId(externalTxId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -679,17 +719,22 @@ Lists the transaction history for your workspace. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.TransactionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - TransactionsApi apiInstance = new TransactionsApi(defaultClient); String before = "before_example"; // String | Unix timestamp in milliseconds. Returns only transactions created before the specified date String after = "after_example"; // String | Unix timestamp in milliseconds. Returns only transactions created after the specified date String status = "status_example"; // String | You can filter by one of the statuses. @@ -705,7 +750,7 @@ public class Example { String sourceWalletId = "sourceWalletId_example"; // String | Returns only results where the source is a specific end user wallet String destWalletId = "destWalletId_example"; // String | Returns only results where the destination is a specific end user wallet try { - CompletableFuture>> response = apiInstance.getTransactions(before, after, status, orderBy, sort, limit, sourceType, sourceId, destType, destId, assets, txHash, sourceWalletId, destWalletId); + CompletableFuture>> response = fireblocks.transactions().getTransactions(before, after, status, orderBy, sort, limit, sourceType, sourceId, destType, destId, assets, txHash, sourceWalletId, destWalletId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -783,22 +828,27 @@ Overrides the required number of confirmations for transaction completion by tra import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.TransactionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - TransactionsApi apiInstance = new TransactionsApi(defaultClient); String txHash = "txHash_example"; // String | The TxHash SetConfirmationsThresholdRequest setConfirmationsThresholdRequest = new SetConfirmationsThresholdRequest(); // SetConfirmationsThresholdRequest | 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 = apiInstance.setConfirmationThresholdByTransactionHash(txHash, setConfirmationsThresholdRequest, idempotencyKey); + CompletableFuture> response = fireblocks.transactions().setConfirmationThresholdByTransactionHash(txHash, setConfirmationsThresholdRequest, 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()); @@ -865,22 +915,27 @@ Overrides the required number of confirmations for transaction completion by tra import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.TransactionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - TransactionsApi apiInstance = new TransactionsApi(defaultClient); String txId = "txId_example"; // String | The ID of the transaction SetConfirmationsThresholdRequest setConfirmationsThresholdRequest = new SetConfirmationsThresholdRequest(); // SetConfirmationsThresholdRequest | 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 = apiInstance.setTransactionConfirmationThreshold(txId, setConfirmationsThresholdRequest, idempotencyKey); + CompletableFuture> response = fireblocks.transactions().setTransactionConfirmationThreshold(txId, setConfirmationsThresholdRequest, 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()); @@ -947,22 +1002,27 @@ Unfreezes a transaction by ID and makes the transaction available again. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.TransactionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - TransactionsApi apiInstance = new TransactionsApi(defaultClient); String txId = "txId_example"; // String | The ID of the transaction to unfreeze UUID xEndUserWalletId = UUID.randomUUID(); // UUID | Unique ID of the End-User wallet to the API request. Required for end-user wallet operations. 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 = apiInstance.unfreezeTransaction(txId, xEndUserWalletId, idempotencyKey); + CompletableFuture> response = fireblocks.transactions().unfreezeTransaction(txId, xEndUserWalletId, 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()); @@ -1028,21 +1088,26 @@ Checks if an address is valid (for XRP, DOT, XLM, and EOS). import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.TransactionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - TransactionsApi apiInstance = new TransactionsApi(defaultClient); String assetId = "assetId_example"; // String | The asset of the address String address = "address_example"; // String | The address to validate try { - CompletableFuture> response = apiInstance.validateAddress(assetId, address); + CompletableFuture> response = fireblocks.transactions().validateAddress(assetId, address); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); diff --git a/docs/TransferConfigOperation.md b/docs/TransferConfigOperation.md new file mode 100644 index 0000000..3ba87b7 --- /dev/null +++ b/docs/TransferConfigOperation.md @@ -0,0 +1,17 @@ + + +# TransferConfigOperation + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**operationId** | **String** | | | +|**type** | **TransferOperationType** | | | +|**params** | [**TransferOperationConfigParams**](TransferOperationConfigParams.md) | | | +|**status** | **ConfigOperationStatus** | | | +|**validationFailure** | [**TransferValidationFailure**](TransferValidationFailure.md) | | [optional] | + + + diff --git a/docs/TransferOperationConfigParams.md b/docs/TransferOperationConfigParams.md new file mode 100644 index 0000000..d5ec460 --- /dev/null +++ b/docs/TransferOperationConfigParams.md @@ -0,0 +1,16 @@ + + +# TransferOperationConfigParams + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**amount** | **String** | | [optional] | +|**assetId** | **String** | | [optional] | +|**source** | [**Account**](Account.md) | | [optional] | +|**destination** | [**Destination**](Destination.md) | | | + + + diff --git a/docs/TransferOperationExecution.md b/docs/TransferOperationExecution.md new file mode 100644 index 0000000..08f5f73 --- /dev/null +++ b/docs/TransferOperationExecution.md @@ -0,0 +1,18 @@ + + +# TransferOperationExecution + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**input** | [**TransferOperationConfigParams**](TransferOperationConfigParams.md) | | | +|**output** | [**TransferOperationExecutionOutput**](TransferOperationExecutionOutput.md) | | [optional] | +|**txId** | **String** | | [optional] | +|**startedAt** | **BigDecimal** | | | +|**finishedAt** | **BigDecimal** | | [optional] | +|**failure** | [**TransferOperationFailure**](TransferOperationFailure.md) | | [optional] | + + + diff --git a/docs/TransferOperationExecutionOutput.md b/docs/TransferOperationExecutionOutput.md new file mode 100644 index 0000000..0713fc8 --- /dev/null +++ b/docs/TransferOperationExecutionOutput.md @@ -0,0 +1,14 @@ + + +# TransferOperationExecutionOutput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**amount** | [**AssetAmount**](AssetAmount.md) | | | +|**fee** | [**AssetAmount**](AssetAmount.md) | | | + + + diff --git a/docs/TransferOperationExecutionParams.md b/docs/TransferOperationExecutionParams.md new file mode 100644 index 0000000..a702fc9 --- /dev/null +++ b/docs/TransferOperationExecutionParams.md @@ -0,0 +1,14 @@ + + +# TransferOperationExecutionParams + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**configOperationId** | **String** | | | +|**executionParams** | [**TransferOperationExecutionParamsExecutionParams**](TransferOperationExecutionParamsExecutionParams.md) | | [optional] | + + + diff --git a/docs/TransferOperationExecutionParamsExecutionParams.md b/docs/TransferOperationExecutionParamsExecutionParams.md new file mode 100644 index 0000000..8b95c5c --- /dev/null +++ b/docs/TransferOperationExecutionParamsExecutionParams.md @@ -0,0 +1,16 @@ + + +# TransferOperationExecutionParamsExecutionParams + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**amount** | **String** | | [optional] | +|**assetId** | **String** | | [optional] | +|**source** | [**Account**](Account.md) | | [optional] | +|**destination** | [**Destination**](Destination.md) | | [optional] | + + + diff --git a/docs/TransferOperationFailure.md b/docs/TransferOperationFailure.md new file mode 100644 index 0000000..f4b0fd5 --- /dev/null +++ b/docs/TransferOperationFailure.md @@ -0,0 +1,24 @@ + + +# TransferOperationFailure + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**reason** | [**ReasonEnum**](#ReasonEnum) | | | +|**data** | [**TransferOperationFailureData**](TransferOperationFailureData.md) | | [optional] | + + + +## Enum: ReasonEnum + +| Name | Value | +|---- | -----| +| INVALID_AMOUNT | "INVALID_AMOUNT" | +| SUBMISSION_FAILED | "SUBMISSION_FAILED" | +| TRANSACTION_FAILED | "TRANSACTION_FAILED" | + + + diff --git a/docs/TransferOperationFailureData.md b/docs/TransferOperationFailureData.md new file mode 100644 index 0000000..5792943 --- /dev/null +++ b/docs/TransferOperationFailureData.md @@ -0,0 +1,15 @@ + + +# TransferOperationFailureData + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**txId** | **String** | | | +|**txStatus** | **String** | | | +|**txSubStatus** | **String** | | [optional] | + + + diff --git a/docs/TransferOperationPreview.md b/docs/TransferOperationPreview.md new file mode 100644 index 0000000..c1b68cd --- /dev/null +++ b/docs/TransferOperationPreview.md @@ -0,0 +1,15 @@ + + +# TransferOperationPreview + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**input** | [**TransferOperationConfigParams**](TransferOperationConfigParams.md) | | | +|**output** | [**TransferOperationPreviewOutput**](TransferOperationPreviewOutput.md) | | [optional] | +|**failure** | [**TransferOperationFailure**](TransferOperationFailure.md) | | [optional] | + + + diff --git a/docs/TransferOperationPreviewOutput.md b/docs/TransferOperationPreviewOutput.md new file mode 100644 index 0000000..e949148 --- /dev/null +++ b/docs/TransferOperationPreviewOutput.md @@ -0,0 +1,16 @@ + + +# TransferOperationPreviewOutput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**amount** | [**AssetAmount**](AssetAmount.md) | | | +|**fee** | [**AssetAmount**](AssetAmount.md) | | | +|**isSignRequired** | **Boolean** | | | +|**timeSeconds** | **BigDecimal** | | | + + + diff --git a/docs/TransferOperationType.md b/docs/TransferOperationType.md new file mode 100644 index 0000000..85eb72a --- /dev/null +++ b/docs/TransferOperationType.md @@ -0,0 +1,11 @@ + + +# TransferOperationType + +## Enum + + +* `TRANSFER` (value: `"TRANSFER"`) + + + diff --git a/docs/TransferValidationFailure.md b/docs/TransferValidationFailure.md new file mode 100644 index 0000000..081b0f2 --- /dev/null +++ b/docs/TransferValidationFailure.md @@ -0,0 +1,34 @@ + + +# TransferValidationFailure + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**reason** | [**ReasonEnum**](#ReasonEnum) | | | +|**data** | **Map<String, Object>** | | [optional] | + + + +## Enum: ReasonEnum + +| Name | Value | +|---- | -----| +| ACCOUNT_NOT_FOUND | "ACCOUNT_NOT_FOUND" | +| ACCOUNT_TYPE_NOT_SUPPORTED | "ACCOUNT_TYPE_NOT_SUPPORTED" | +| INSUFFICIENT_BALANCE | "INSUFFICIENT_BALANCE" | +| ASSET_NOT_FOUND | "ASSET_NOT_FOUND" | +| ASSETS_CONTINUITY_MISMATCH | "ASSETS_CONTINUITY_MISMATCH" | +| EXCHANGE_BASKETS_MISMATCH | "EXCHANGE_BASKETS_MISMATCH" | +| ACCOUNTS_CONTINUITY_MISMATCH | "ACCOUNTS_CONTINUITY_MISMATCH" | +| ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED | "ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED" | +| EQUAL_ACCOUNTS_NOT_ALLOWED | "EQUAL_ACCOUNTS_NOT_ALLOWED" | +| EQUAL_ASSETS_NOT_ALLOWED | "EQUAL_ASSETS_NOT_ALLOWED" | +| INVALID_AMOUNT | "INVALID_AMOUNT" | +| UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED | "UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED" | +| MANAGED_OPERATION_PARAMS_INVALID_SCHEMA | "MANAGED_OPERATION_PARAMS_INVALID_SCHEMA" | + + + diff --git a/docs/TravelRuleBetaApi.md b/docs/TravelRuleBetaApi.md index 83b2cea..0744e98 100644 --- a/docs/TravelRuleBetaApi.md +++ b/docs/TravelRuleBetaApi.md @@ -1,6 +1,6 @@ # TravelRuleBetaApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -27,21 +27,26 @@ Get VASP Details. Returns information about a VASP that has the specified DID. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.TravelRuleBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - TravelRuleBetaApi apiInstance = new TravelRuleBetaApi(defaultClient); String did = "did_example"; // String | String fields = "fields_example"; // String | CSV of fields to return (all, \"blank\" or see list of all field names below) try { - CompletableFuture> response = apiInstance.getVASPByDID(did, fields); + CompletableFuture> response = fireblocks.travelRuleBeta().getVASPByDID(did, fields); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -108,23 +113,28 @@ Get All VASPs. Returns a list of VASPs. VASPs can be searched and sorted and re import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.TravelRuleBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - TravelRuleBetaApi apiInstance = new TravelRuleBetaApi(defaultClient); String order = "order_example"; // String | Field to order by BigDecimal perPage = new BigDecimal(78); // BigDecimal | Records per page BigDecimal page = new BigDecimal(78); // BigDecimal | Page number String fields = "fields_example"; // String | CSV of fields to return (all, \"blank\" or see list of all field names below) try { - CompletableFuture> response = apiInstance.getVASPs(order, perPage, page, fields); + CompletableFuture> response = fireblocks.travelRuleBeta().getVASPs(order, perPage, page, fields); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -191,21 +201,26 @@ Update VASP Details. Updates a VASP with the provided parameters. Use this endp import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.TravelRuleBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - TravelRuleBetaApi apiInstance = new TravelRuleBetaApi(defaultClient); TravelRuleUpdateVASPDetails travelRuleUpdateVASPDetails = new TravelRuleUpdateVASPDetails(); // TravelRuleUpdateVASPDetails | 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 = apiInstance.updateVasp(travelRuleUpdateVASPDetails, idempotencyKey); + CompletableFuture> response = fireblocks.travelRuleBeta().updateVasp(travelRuleUpdateVASPDetails, 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()); @@ -272,21 +287,26 @@ Validate Full Travel Rule transactions. Checks for all required information on import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.TravelRuleBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - TravelRuleBetaApi apiInstance = new TravelRuleBetaApi(defaultClient); TravelRuleValidateFullTransactionRequest travelRuleValidateFullTransactionRequest = new TravelRuleValidateFullTransactionRequest(); // TravelRuleValidateFullTransactionRequest | 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 = apiInstance.validateFullTravelRuleTransaction(travelRuleValidateFullTransactionRequest, idempotencyKey); + CompletableFuture> response = fireblocks.travelRuleBeta().validateFullTravelRuleTransaction(travelRuleValidateFullTransactionRequest, 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()); @@ -353,21 +373,26 @@ Validate Travel Rule transactions. Checks what beneficiary VASP details are req import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.TravelRuleBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - TravelRuleBetaApi apiInstance = new TravelRuleBetaApi(defaultClient); TravelRuleValidateTransactionRequest travelRuleValidateTransactionRequest = new TravelRuleValidateTransactionRequest(); // TravelRuleValidateTransactionRequest | 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 = apiInstance.validateTravelRuleTransaction(travelRuleValidateTransactionRequest, idempotencyKey); + CompletableFuture> response = fireblocks.travelRuleBeta().validateTravelRuleTransaction(travelRuleValidateTransactionRequest, 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()); diff --git a/docs/UserGroupsBetaApi.md b/docs/UserGroupsBetaApi.md index 0e46479..9129f97 100644 --- a/docs/UserGroupsBetaApi.md +++ b/docs/UserGroupsBetaApi.md @@ -1,6 +1,6 @@ # UserGroupsBetaApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -27,21 +27,26 @@ Create a new user group.</br> **Note**: - This endpoint is now in Beta, d import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.UserGroupsBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - UserGroupsBetaApi apiInstance = new UserGroupsBetaApi(defaultClient); UserGroupCreateRequest userGroupCreateRequest = new UserGroupCreateRequest(); // UserGroupCreateRequest | 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 = apiInstance.createUserGroup(userGroupCreateRequest, idempotencyKey); + CompletableFuture> response = fireblocks.userGroupsBeta().createUserGroup(userGroupCreateRequest, 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()); @@ -107,20 +112,25 @@ Delete a user group by ID.</br> **Note**: - This endpoint is now in Beta, import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.UserGroupsBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - UserGroupsBetaApi apiInstance = new UserGroupsBetaApi(defaultClient); String groupId = "groupId_example"; // String | The ID of the user group try { - CompletableFuture> response = apiInstance.deleteUserGroup(groupId); + CompletableFuture> response = fireblocks.userGroupsBeta().deleteUserGroup(groupId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -184,20 +194,25 @@ Get a user group by ID.</br> **Note**: - This endpoint is now in Beta, di import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.UserGroupsBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - UserGroupsBetaApi apiInstance = new UserGroupsBetaApi(defaultClient); String groupId = "groupId_example"; // String | The ID of the user group try { - CompletableFuture> response = apiInstance.getUserGroup(groupId); + CompletableFuture> response = fireblocks.userGroupsBeta().getUserGroup(groupId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -262,19 +277,24 @@ Get all user groups in your workspace. </br> **Note**: - This endpoint is import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.UserGroupsBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - UserGroupsBetaApi apiInstance = new UserGroupsBetaApi(defaultClient); try { - CompletableFuture>> response = apiInstance.getUserGroups(); + CompletableFuture>> response = fireblocks.userGroupsBeta().getUserGroups(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -336,22 +356,27 @@ Update a user group by ID.</br> **Note**: - This endpoint is now in Beta, import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.UserGroupsBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - UserGroupsBetaApi apiInstance = new UserGroupsBetaApi(defaultClient); UserGroupUpdateRequest userGroupUpdateRequest = new UserGroupUpdateRequest(); // UserGroupUpdateRequest | String groupId = "groupId_example"; // String | The ID of the user group 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 = apiInstance.updateUserGroup(userGroupUpdateRequest, groupId, idempotencyKey); + CompletableFuture> response = fireblocks.userGroupsBeta().updateUserGroup(userGroupUpdateRequest, groupId, 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()); diff --git a/docs/UserRole.md b/docs/UserRole.md new file mode 100644 index 0000000..b329857 --- /dev/null +++ b/docs/UserRole.md @@ -0,0 +1,31 @@ + + +# UserRole + +## Enum + + +* `OWNER` (value: `"OWNER"`) + +* `ADMIN` (value: `"ADMIN"`) + +* `SIGNER` (value: `"SIGNER"`) + +* `COLLATERALS_SIGNER` (value: `"COLLATERALS_SIGNER"`) + +* `EDITOR` (value: `"EDITOR"`) + +* `APPROVER` (value: `"APPROVER"`) + +* `VIEWER` (value: `"VIEWER"`) + +* `NON_SIGNING_ADMIN` (value: `"NON_SIGNING_ADMIN"`) + +* `AUDITOR` (value: `"AUDITOR"`) + +* `NCW_ADMIN` (value: `"NCW_ADMIN"`) + +* `NCW_SIGNER` (value: `"NCW_SIGNER"`) + + + diff --git a/docs/UserStatus.md b/docs/UserStatus.md new file mode 100644 index 0000000..c4e538f --- /dev/null +++ b/docs/UserStatus.md @@ -0,0 +1,17 @@ + + +# UserStatus + +## Enum + + +* `PENDING_ACTIVATION` (value: `"PENDING_ACTIVATION"`) + +* `PENDING_DEVICE_PAIRING` (value: `"PENDING_DEVICE_PAIRING"`) + +* `PENDING_DEVICE_SETUP` (value: `"PENDING_DEVICE_SETUP"`) + +* `READY` (value: `"READY"`) + + + diff --git a/docs/UserType.md b/docs/UserType.md new file mode 100644 index 0000000..8c751a0 --- /dev/null +++ b/docs/UserType.md @@ -0,0 +1,13 @@ + + +# UserType + +## Enum + + +* `API` (value: `"API"`) + +* `CONSOLE` (value: `"CONSOLE"`) + + + diff --git a/docs/UsersApi.md b/docs/UsersApi.md index d5591f9..a24791a 100644 --- a/docs/UsersApi.md +++ b/docs/UsersApi.md @@ -1,6 +1,6 @@ # UsersApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -23,19 +23,24 @@ List all users for the workspace. Please note that this endpoint is available o import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.UsersApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - UsersApi apiInstance = new UsersApi(defaultClient); try { - CompletableFuture>> response = apiInstance.getUsers(); + CompletableFuture>> response = fireblocks.users().getUsers(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); diff --git a/docs/VaultsApi.md b/docs/VaultsApi.md index 4cab45b..d0985e4 100644 --- a/docs/VaultsApi.md +++ b/docs/VaultsApi.md @@ -1,6 +1,6 @@ # VaultsApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -47,22 +47,27 @@ Initiates activation for a wallet in a vault account. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); String vaultAccountId = "vaultAccountId_example"; // String | The ID of the vault account to return, or 'default' for the default vault account String assetId = "assetId_example"; // String | The ID of the asset 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 = apiInstance.activateAssetForVaultAccount(vaultAccountId, assetId, idempotencyKey); + CompletableFuture> response = fireblocks.vaults().activateAssetForVaultAccount(vaultAccountId, assetId, 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()); @@ -129,23 +134,28 @@ Converts an existing segwit address to the legacy format. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); String vaultAccountId = "vaultAccountId_example"; // String | The ID of the vault account String assetId = "assetId_example"; // String | The ID of the asset String addressId = "addressId_example"; // String | The segwit address to translate 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 = apiInstance.createLegacyAddress(vaultAccountId, assetId, addressId, idempotencyKey); + CompletableFuture> response = fireblocks.vaults().createLegacyAddress(vaultAccountId, assetId, addressId, 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()); @@ -213,21 +223,26 @@ Create multiple vault accounts by running an async job. </br> **Note**: - import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); CreateMultipleAccountsRequest createMultipleAccountsRequest = new CreateMultipleAccountsRequest(); // CreateMultipleAccountsRequest | 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 = apiInstance.createMultipleAccounts(createMultipleAccountsRequest, idempotencyKey); + CompletableFuture> response = fireblocks.vaults().createMultipleAccounts(createMultipleAccountsRequest, 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()); @@ -293,21 +308,26 @@ Creates a new vault account with the requested name. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); CreateVaultAccountRequest createVaultAccountRequest = new CreateVaultAccountRequest(); // CreateVaultAccountRequest | 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 = apiInstance.createVaultAccount(createVaultAccountRequest, idempotencyKey); + CompletableFuture> response = fireblocks.vaults().createVaultAccount(createVaultAccountRequest, 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()); @@ -373,23 +393,28 @@ Creates a wallet for a specific asset in a vault account. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); String vaultAccountId = "vaultAccountId_example"; // String | The ID of the vault account to return, or 'default' for the default vault account String assetId = "assetId_example"; // String | The ID of the asset CreateAssetsRequest createAssetsRequest = new CreateAssetsRequest(); // CreateAssetsRequest | 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 = apiInstance.createVaultAccountAsset(vaultAccountId, assetId, createAssetsRequest, idempotencyKey); + CompletableFuture> response = fireblocks.vaults().createVaultAccountAsset(vaultAccountId, assetId, createAssetsRequest, 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()); @@ -457,23 +482,28 @@ Creates a new deposit address for an asset of a vault account. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); String vaultAccountId = "vaultAccountId_example"; // String | The ID of the vault account to return String assetId = "assetId_example"; // String | The ID of the asset CreateAddressRequest createAddressRequest = new CreateAddressRequest(); // CreateAddressRequest | 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 = apiInstance.createVaultAccountAssetAddress(vaultAccountId, assetId, createAddressRequest, idempotencyKey); + CompletableFuture> response = fireblocks.vaults().createVaultAccountAssetAddress(vaultAccountId, assetId, createAddressRequest, 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()); @@ -541,17 +571,22 @@ Gets all asset wallets at all of the vault accounts in your workspace. An asset import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); BigDecimal totalAmountLargerThan = new BigDecimal(78); // BigDecimal | When specified, only asset wallets with total balance larger than this amount are returned. String assetId = "assetId_example"; // String | When specified, only asset wallets cross vault accounts that have this asset ID are returned. String orderBy = "ASC"; // String | @@ -559,7 +594,7 @@ public class Example { String after = "after_example"; // String | Fetches the next paginated response after this element. This element is a cursor and is returned at the response of the previous page. BigDecimal limit = new BigDecimal("200"); // BigDecimal | The maximum number of asset wallets in a single response. The default is 200 and the maximum is 1000. try { - CompletableFuture> response = apiInstance.getAssetWallets(totalAmountLargerThan, assetId, orderBy, before, after, limit); + CompletableFuture> response = fireblocks.vaults().getAssetWallets(totalAmountLargerThan, assetId, orderBy, before, after, limit); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -615,7 +650,7 @@ No authorization required ## getMaxSpendableAmount -> CompletableFuture> getMaxSpendableAmount getMaxSpendableAmount(vaultAccountId, assetId, manualSignging) +> CompletableFuture> getMaxSpendableAmount getMaxSpendableAmount(vaultAccountId, assetId, manualSignging) Get the maximum spendable amount in a single transaction. @@ -628,24 +663,30 @@ Get the maximum amount of a particular asset that can be spent in a single trans import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); String vaultAccountId = "vaultAccountId_example"; // String | The ID of the vault account, or 'default' for the default vault account String assetId = "assetId_example"; // String | The ID of the asset Boolean manualSignging = true; // Boolean | False by default. The maximum number of inputs depends if the transaction will be signed by an automated co-signer server or on a mobile device. try { - CompletableFuture> response = apiInstance.getMaxSpendableAmount(vaultAccountId, assetId, manualSignging); + CompletableFuture> response = fireblocks.vaults().getMaxSpendableAmount(vaultAccountId, assetId, manualSignging); 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 VaultsApi#getMaxSpendableAmount"); @@ -675,8 +716,8 @@ public class Example { ### Return type +CompletableFuture> -CompletableFuture> ### Authorization @@ -709,17 +750,22 @@ Gets all vault accounts in your workspace. This endpoint returns a limited amoun import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); String namePrefix = "namePrefix_example"; // String | String nameSuffix = "nameSuffix_example"; // String | BigDecimal minAmountThreshold = new BigDecimal(78); // BigDecimal | Specifying minAmountThreshold will filter accounts with balances greater than this value, otherwise, it will return all accounts. @@ -729,7 +775,7 @@ public class Example { String after = "after_example"; // String | BigDecimal limit = new BigDecimal("200"); // BigDecimal | try { - CompletableFuture> response = apiInstance.getPagedVaultAccounts(namePrefix, nameSuffix, minAmountThreshold, assetId, orderBy, before, after, limit); + CompletableFuture> response = fireblocks.vaults().getPagedVaultAccounts(namePrefix, nameSuffix, minAmountThreshold, assetId, orderBy, before, after, limit); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -800,22 +846,27 @@ Gets the public key information based on derivation path and signing algorithm. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); String derivationPath = "derivationPath_example"; // String | String algorithm = "algorithm_example"; // String | Boolean compressed = true; // Boolean | try { - CompletableFuture> response = apiInstance.getPublicKeyInfo(derivationPath, algorithm, compressed); + CompletableFuture> response = fireblocks.vaults().getPublicKeyInfo(derivationPath, algorithm, compressed); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -882,24 +933,29 @@ Gets the public key information for the vault account. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); String vaultAccountId = "vaultAccountId_example"; // String | String assetId = "assetId_example"; // String | BigDecimal change = new BigDecimal(78); // BigDecimal | BigDecimal addressIndex = new BigDecimal(78); // BigDecimal | Boolean compressed = true; // Boolean | try { - CompletableFuture> response = apiInstance.getPublicKeyInfoForAddress(vaultAccountId, assetId, change, addressIndex, compressed); + CompletableFuture> response = fireblocks.vaults().getPublicKeyInfoForAddress(vaultAccountId, assetId, change, addressIndex, compressed); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -968,21 +1024,26 @@ Returns unspent inputs information of an asset in a vault account. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); String vaultAccountId = "vaultAccountId_example"; // String | The ID of the vault account String assetId = "assetId_example"; // String | The ID of the asset try { - CompletableFuture>> response = apiInstance.getUnspentInputs(vaultAccountId, assetId); + CompletableFuture>> response = fireblocks.vaults().getUnspentInputs(vaultAccountId, assetId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -1048,20 +1109,25 @@ Returns the requested vault account. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); String vaultAccountId = "vaultAccountId_example"; // String | The ID of the vault account to return type: string try { - CompletableFuture> response = apiInstance.getVaultAccount(vaultAccountId); + CompletableFuture> response = fireblocks.vaults().getVaultAccount(vaultAccountId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -1126,21 +1192,26 @@ Returns a wallet for a specific asset of a vault account. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); String vaultAccountId = "vaultAccountId_example"; // String | The ID of the vault account to return String assetId = "assetId_example"; // String | The ID of the asset try { - CompletableFuture> response = apiInstance.getVaultAccountAsset(vaultAccountId, assetId); + CompletableFuture> response = fireblocks.vaults().getVaultAccountAsset(vaultAccountId, assetId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -1206,24 +1277,29 @@ Returns a paginated response of the addresses for a given vault account and asse import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); String vaultAccountId = "vaultAccountId_example"; // String | The ID of the vault account to return String assetId = "assetId_example"; // String | The ID of the asset BigDecimal limit = new BigDecimal(78); // BigDecimal | String before = "before_example"; // String | String after = "after_example"; // String | try { - CompletableFuture> response = apiInstance.getVaultAccountAssetAddressesPaginated(vaultAccountId, assetId, limit, before, after); + CompletableFuture> response = fireblocks.vaults().getVaultAccountAssetAddressesPaginated(vaultAccountId, assetId, limit, before, after); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -1292,21 +1368,26 @@ Gets the assets amount summary for all accounts or filtered accounts. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); String accountNamePrefix = "accountNamePrefix_example"; // String | String accountNameSuffix = "accountNameSuffix_example"; // String | try { - CompletableFuture>> response = apiInstance.getVaultAssets(accountNamePrefix, accountNameSuffix); + CompletableFuture>> response = fireblocks.vaults().getVaultAssets(accountNamePrefix, accountNameSuffix); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -1372,20 +1453,25 @@ Gets the vault balance summary for an asset. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); String assetId = "assetId_example"; // String | try { - CompletableFuture> response = apiInstance.getVaultBalanceByAsset(assetId); + CompletableFuture> response = fireblocks.vaults().getVaultBalanceByAsset(assetId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -1450,21 +1536,26 @@ Hides the requested vault account from the web console view. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); String vaultAccountId = "vaultAccountId_example"; // String | The vault account to hide 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 = apiInstance.hideVaultAccount(vaultAccountId, idempotencyKey); + CompletableFuture> response = fireblocks.vaults().hideVaultAccount(vaultAccountId, 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()); @@ -1530,24 +1621,29 @@ Sets an AML/KYT customer reference ID for a specific address. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); SetCustomerRefIdForAddressRequest setCustomerRefIdForAddressRequest = new SetCustomerRefIdForAddressRequest(); // SetCustomerRefIdForAddressRequest | String vaultAccountId = "vaultAccountId_example"; // String | The ID of the vault account String assetId = "assetId_example"; // String | The ID of the asset String addressId = "addressId_example"; // String | The address for which to add a description. For XRP, use
:, for all other assets, use only the address 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 = apiInstance.setCustomerRefIdForAddress(setCustomerRefIdForAddressRequest, vaultAccountId, assetId, addressId, idempotencyKey); + CompletableFuture> response = fireblocks.vaults().setCustomerRefIdForAddress(setCustomerRefIdForAddressRequest, vaultAccountId, assetId, addressId, 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()); @@ -1616,22 +1712,27 @@ Sets the autofueling property of the vault account to enabled or disabled. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); SetAutoFuelRequest setAutoFuelRequest = new SetAutoFuelRequest(); // SetAutoFuelRequest | String vaultAccountId = "vaultAccountId_example"; // String | The vault account ID 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 = apiInstance.setVaultAccountAutoFuel(setAutoFuelRequest, vaultAccountId, idempotencyKey); + CompletableFuture> response = fireblocks.vaults().setVaultAccountAutoFuel(setAutoFuelRequest, vaultAccountId, 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()); @@ -1698,22 +1799,27 @@ Assigns an AML/KYT customer reference ID for the vault account. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); SetCustomerRefIdRequest setCustomerRefIdRequest = new SetCustomerRefIdRequest(); // SetCustomerRefIdRequest | String vaultAccountId = "vaultAccountId_example"; // String | The vault account ID 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 = apiInstance.setVaultAccountCustomerRefId(setCustomerRefIdRequest, vaultAccountId, idempotencyKey); + CompletableFuture> response = fireblocks.vaults().setVaultAccountCustomerRefId(setCustomerRefIdRequest, vaultAccountId, 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()); @@ -1780,21 +1886,26 @@ Makes a hidden vault account visible in web console view. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); String vaultAccountId = "vaultAccountId_example"; // String | The vault account to unhide 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 = apiInstance.unhideVaultAccount(vaultAccountId, idempotencyKey); + CompletableFuture> response = fireblocks.vaults().unhideVaultAccount(vaultAccountId, 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()); @@ -1847,7 +1958,7 @@ No authorization required ## updateVaultAccount -> CompletableFuture> updateVaultAccount updateVaultAccount(updateVaultAccountRequest, vaultAccountId, idempotencyKey) +> CompletableFuture> updateVaultAccount updateVaultAccount(updateVaultAccountRequest, vaultAccountId, idempotencyKey) Rename a vault account @@ -1860,24 +1971,30 @@ Renames the requested vault account. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); UpdateVaultAccountRequest updateVaultAccountRequest = new UpdateVaultAccountRequest(); // UpdateVaultAccountRequest | String vaultAccountId = "vaultAccountId_example"; // String | The ID of the vault account to edit 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 = apiInstance.updateVaultAccount(updateVaultAccountRequest, vaultAccountId, idempotencyKey); + CompletableFuture> response = fireblocks.vaults().updateVaultAccount(updateVaultAccountRequest, vaultAccountId, 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 VaultsApi#updateVaultAccount"); @@ -1907,8 +2024,8 @@ public class Example { ### Return type +CompletableFuture> -CompletableFuture> ### Authorization @@ -1941,24 +2058,29 @@ Updates the description of an existing address of an asset in a vault account. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); String vaultAccountId = "vaultAccountId_example"; // String | The ID of the vault account String assetId = "assetId_example"; // String | The ID of the asset String addressId = "addressId_example"; // String | The address for which to add a description. For XRP, use
:, for all other assets, use only the address UpdateVaultAccountAssetAddressRequest updateVaultAccountAssetAddressRequest = new UpdateVaultAccountAssetAddressRequest(); // UpdateVaultAccountAssetAddressRequest | 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 = apiInstance.updateVaultAccountAssetAddress(vaultAccountId, assetId, addressId, updateVaultAccountAssetAddressRequest, idempotencyKey); + CompletableFuture> response = fireblocks.vaults().updateVaultAccountAssetAddress(vaultAccountId, assetId, addressId, updateVaultAccountAssetAddressRequest, 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()); @@ -2027,22 +2149,27 @@ Updates the balance of a specific asset in a vault account. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.VaultsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - VaultsApi apiInstance = new VaultsApi(defaultClient); String vaultAccountId = "vaultAccountId_example"; // String | The ID of the vault account to return String assetId = "assetId_example"; // String | The ID of the asset 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 = apiInstance.updateVaultAccountAssetBalance(vaultAccountId, assetId, idempotencyKey); + CompletableFuture> response = fireblocks.vaults().updateVaultAccountAssetBalance(vaultAccountId, assetId, 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()); diff --git a/docs/Web3ConnectionsApi.md b/docs/Web3ConnectionsApi.md index 247b408..d62c7dd 100644 --- a/docs/Web3ConnectionsApi.md +++ b/docs/Web3ConnectionsApi.md @@ -1,6 +1,6 @@ # Web3ConnectionsApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -26,21 +26,26 @@ Initiate a new Web3 connection. * Note: After this succeeds, make a request to import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.Web3ConnectionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - Web3ConnectionsApi apiInstance = new Web3ConnectionsApi(defaultClient); CreateRequest createRequest = new CreateRequest(); // CreateRequest | 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 = apiInstance.create(createRequest, idempotencyKey); + CompletableFuture> response = fireblocks.web3Connections().create(createRequest, 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()); @@ -107,24 +112,29 @@ Get open Web3 connections. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.Web3ConnectionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - Web3ConnectionsApi apiInstance = new Web3ConnectionsApi(defaultClient); String order = "ASC"; // String | List order; ascending or descending. GetFilterParameter filter = new GetFilterParameter(); // GetFilterParameter | Parsed filter object String sort = "id"; // String | Property to sort Web3 connections by. BigDecimal pageSize = new BigDecimal("10"); // BigDecimal | Amount of results to return in the next page. String next = "next_example"; // String | Cursor to the next page try { - CompletableFuture> response = apiInstance.get(order, filter, sort, pageSize, next); + CompletableFuture> response = fireblocks.web3Connections().get(order, filter, sort, pageSize, next); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -194,20 +204,25 @@ Remove a Web3 connection import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.Web3ConnectionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - Web3ConnectionsApi apiInstance = new Web3ConnectionsApi(defaultClient); String id = "id_example"; // String | The ID of the existing Web3 connection to remove. try { - CompletableFuture> response = apiInstance.remove(id); + CompletableFuture> response = fireblocks.web3Connections().remove(id); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -272,22 +287,27 @@ Submit a response to *approve* or *reject* an initiated Web3 connection. * Note: import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.Web3ConnectionsApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - Web3ConnectionsApi apiInstance = new Web3ConnectionsApi(defaultClient); RespondToConnectionRequest respondToConnectionRequest = new RespondToConnectionRequest(); // RespondToConnectionRequest | String id = "id_example"; // String | The ID of the initiated Web3 connection to approve. 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 = apiInstance.submit(respondToConnectionRequest, id, idempotencyKey); + CompletableFuture> response = fireblocks.web3Connections().submit(respondToConnectionRequest, id, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { diff --git a/docs/WebhooksApi.md b/docs/WebhooksApi.md index b7baa07..2c5259c 100644 --- a/docs/WebhooksApi.md +++ b/docs/WebhooksApi.md @@ -1,6 +1,6 @@ # WebhooksApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -11,7 +11,7 @@ All URIs are relative to *https://api.fireblocks.io/v1* ## resendTransactionWebhooks -> CompletableFuture> resendTransactionWebhooks resendTransactionWebhooks(resendTransactionWebhooksRequest, txId, idempotencyKey) +> CompletableFuture> resendTransactionWebhooks resendTransactionWebhooks(resendTransactionWebhooksRequest, txId, idempotencyKey) Resend failed webhooks for a transaction by ID @@ -24,24 +24,30 @@ Resends failed webhook notifications for a transaction by ID. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.WebhooksApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - WebhooksApi apiInstance = new WebhooksApi(defaultClient); ResendTransactionWebhooksRequest resendTransactionWebhooksRequest = new ResendTransactionWebhooksRequest(); // ResendTransactionWebhooksRequest | String txId = "txId_example"; // String | The ID of the transaction for webhooks 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 = apiInstance.resendTransactionWebhooks(resendTransactionWebhooksRequest, txId, idempotencyKey); + CompletableFuture> response = fireblocks.webhooks().resendTransactionWebhooks(resendTransactionWebhooksRequest, txId, 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 WebhooksApi#resendTransactionWebhooks"); @@ -71,8 +77,8 @@ public class Example { ### Return type +CompletableFuture> -CompletableFuture> ### Authorization @@ -105,20 +111,25 @@ Resends all failed webhook notifications. import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.WebhooksApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - WebhooksApi apiInstance = new WebhooksApi(defaultClient); 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 = apiInstance.resendWebhooks(idempotencyKey); + CompletableFuture> response = fireblocks.webhooks().resendWebhooks(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()); diff --git a/docs/WhitelistIpAddressesApi.md b/docs/WhitelistIpAddressesApi.md index 2ce7965..02601d6 100644 --- a/docs/WhitelistIpAddressesApi.md +++ b/docs/WhitelistIpAddressesApi.md @@ -1,6 +1,6 @@ # WhitelistIpAddressesApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -10,7 +10,7 @@ All URIs are relative to *https://api.fireblocks.io/v1* ## getWhitelistIpAddresses -> CompletableFuture> getWhitelistIpAddresses getWhitelistIpAddresses(userId) +> CompletableFuture> getWhitelistIpAddresses getWhitelistIpAddresses(userId) gets ip addresses @@ -23,22 +23,28 @@ gets ip addresses import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.WhitelistIpAddressesApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - WhitelistIpAddressesApi apiInstance = new WhitelistIpAddressesApi(defaultClient); String userId = "userId_example"; // String | The ID of the user try { - CompletableFuture> response = apiInstance.getWhitelistIpAddresses(userId); + CompletableFuture> response = fireblocks.whitelistIpAddresses().getWhitelistIpAddresses(userId); 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 WhitelistIpAddressesApi#getWhitelistIpAddresses"); @@ -66,8 +72,8 @@ public class Example { ### Return type +CompletableFuture> -CompletableFuture> ### Authorization diff --git a/docs/WorkflowConfigStatus.md b/docs/WorkflowConfigStatus.md new file mode 100644 index 0000000..84402b8 --- /dev/null +++ b/docs/WorkflowConfigStatus.md @@ -0,0 +1,17 @@ + + +# WorkflowConfigStatus + +## Enum + + +* `PENDING` (value: `"PENDING"`) + +* `VALIDATION_IN_PROGRESS` (value: `"VALIDATION_IN_PROGRESS"`) + +* `VALIDATION_FAILED` (value: `"VALIDATION_FAILED"`) + +* `READY_FOR_EXECUTION` (value: `"READY_FOR_EXECUTION"`) + + + diff --git a/docs/WorkflowConfigurationId.md b/docs/WorkflowConfigurationId.md new file mode 100644 index 0000000..7f6cdfe --- /dev/null +++ b/docs/WorkflowConfigurationId.md @@ -0,0 +1,13 @@ + + +# WorkflowConfigurationId + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**configId** | **String** | | | + + + diff --git a/docs/WorkflowExecutionOperation.md b/docs/WorkflowExecutionOperation.md new file mode 100644 index 0000000..f8627c4 --- /dev/null +++ b/docs/WorkflowExecutionOperation.md @@ -0,0 +1,55 @@ + + +# WorkflowExecutionOperation + +## oneOf schemas +* [ExecutionConversionOperation](ExecutionConversionOperation.md) +* [ExecutionDisbursementOperation](ExecutionDisbursementOperation.md) +* [ExecutionScreeningOperation](ExecutionScreeningOperation.md) +* [ExecutionTransferOperation](ExecutionTransferOperation.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.WorkflowExecutionOperation; +import com.fireblocks.sdk.model.ExecutionConversionOperation; +import com.fireblocks.sdk.model.ExecutionDisbursementOperation; +import com.fireblocks.sdk.model.ExecutionScreeningOperation; +import com.fireblocks.sdk.model.ExecutionTransferOperation; + +public class Example { + public static void main(String[] args) { + WorkflowExecutionOperation exampleWorkflowExecutionOperation = new WorkflowExecutionOperation(); + + // create a new ExecutionConversionOperation + ExecutionConversionOperation exampleExecutionConversionOperation = new ExecutionConversionOperation(); + // set WorkflowExecutionOperation to ExecutionConversionOperation + exampleWorkflowExecutionOperation.setActualInstance(exampleExecutionConversionOperation); + // to get back the ExecutionConversionOperation set earlier + ExecutionConversionOperation testExecutionConversionOperation = (ExecutionConversionOperation) exampleWorkflowExecutionOperation.getActualInstance(); + + // create a new ExecutionDisbursementOperation + ExecutionDisbursementOperation exampleExecutionDisbursementOperation = new ExecutionDisbursementOperation(); + // set WorkflowExecutionOperation to ExecutionDisbursementOperation + exampleWorkflowExecutionOperation.setActualInstance(exampleExecutionDisbursementOperation); + // to get back the ExecutionDisbursementOperation set earlier + ExecutionDisbursementOperation testExecutionDisbursementOperation = (ExecutionDisbursementOperation) exampleWorkflowExecutionOperation.getActualInstance(); + + // create a new ExecutionScreeningOperation + ExecutionScreeningOperation exampleExecutionScreeningOperation = new ExecutionScreeningOperation(); + // set WorkflowExecutionOperation to ExecutionScreeningOperation + exampleWorkflowExecutionOperation.setActualInstance(exampleExecutionScreeningOperation); + // to get back the ExecutionScreeningOperation set earlier + ExecutionScreeningOperation testExecutionScreeningOperation = (ExecutionScreeningOperation) exampleWorkflowExecutionOperation.getActualInstance(); + + // create a new ExecutionTransferOperation + ExecutionTransferOperation exampleExecutionTransferOperation = new ExecutionTransferOperation(); + // set WorkflowExecutionOperation to ExecutionTransferOperation + exampleWorkflowExecutionOperation.setActualInstance(exampleExecutionTransferOperation); + // to get back the ExecutionTransferOperation set earlier + ExecutionTransferOperation testExecutionTransferOperation = (ExecutionTransferOperation) exampleWorkflowExecutionOperation.getActualInstance(); + } +} +``` + + diff --git a/docs/WorkspaceApi.md b/docs/WorkspaceApi.md deleted file mode 100644 index 899b49c..0000000 --- a/docs/WorkspaceApi.md +++ /dev/null @@ -1,86 +0,0 @@ -# WorkspaceApi - -All URIs are relative to *https://api.fireblocks.io/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**freezeWorkspace**](WorkspaceApi.md#freezeWorkspace) | **POST** /workspace/freeze | Freeze Workspace | - - - -## freezeWorkspace - -> CompletableFuture> freezeWorkspace freezeWorkspace(idempotencyKey) - -Freeze Workspace - -Freezes a Workspace so that ALL operations by ANY user are blocked. You should only perform this action when the workspace faces imminent risk, such as when you have a security breach. To unfreeze a workspace, the workspace Owner must submit a request to Fireblocks Support. **NOTE:** - This operation can only be performed by the workspace Owner - Your workspace continues to receive incoming transfers during this time. - -### Example - -```java -// Import classes: -import com.fireblocks.sdk.ApiClient; -import com.fireblocks.sdk.ApiException; -import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; -import com.fireblocks.sdk.api.WorkspaceApi; -import java.util.concurrent.CompletableFuture; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); - - WorkspaceApi apiInstance = new WorkspaceApi(defaultClient); - 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 = apiInstance.freezeWorkspace(idempotencyKey); - System.out.println("Status code: " + response.get().getStatusCode()); - System.out.println("Response headers: " + response.get().getHeaders()); - } catch (InterruptedException | ExecutionException e) { - ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling WorkspaceApi#freezeWorkspace"); - System.err.println("Status code: " + apiException.getCode()); - System.err.println("Response headers: " + apiException.getResponseHeaders()); - System.err.println("Reason: " + apiException.getResponseBody()); - e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WorkspaceApi#freezeWorkspace"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **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**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | indicates that the workspace is now frozen | * X-Request-ID -
| -| **0** | Error Response | * X-Request-ID -
| - diff --git a/docs/WorkspaceStatusBetaApi.md b/docs/WorkspaceStatusBetaApi.md index f904a34..38a7703 100644 --- a/docs/WorkspaceStatusBetaApi.md +++ b/docs/WorkspaceStatusBetaApi.md @@ -1,6 +1,6 @@ # WorkspaceStatusBetaApi -All URIs are relative to *https://api.fireblocks.io/v1* +All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| @@ -23,19 +23,24 @@ Returns current workspace status import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.Configuration; -import com.fireblocks.sdk.models.*; +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.WorkspaceStatusBetaApi; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; public class Example { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.fireblocks.io/v1"); + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); - WorkspaceStatusBetaApi apiInstance = new WorkspaceStatusBetaApi(defaultClient); try { - CompletableFuture> response = apiInstance.getWorkspaceStatus(); + CompletableFuture> response = fireblocks.workspaceStatusBeta().getWorkspaceStatus(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); diff --git a/pom.xml b/pom.xml index 30cc26f..0ac2361 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 0.0.1-beta + 1.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 9d7066c..8e44f3f 100644 --- a/src/main/java/com/fireblocks/sdk/Configuration.java +++ b/src/main/java/com/fireblocks/sdk/Configuration.java @@ -14,7 +14,7 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Configuration { - public static final String VERSION = "0.0.1-beta"; + public static final String VERSION = "1.0.0"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/com/fireblocks/sdk/Fireblocks.java b/src/main/java/com/fireblocks/sdk/Fireblocks.java index ccc653b..4da1bf3 100644 --- a/src/main/java/com/fireblocks/sdk/Fireblocks.java +++ b/src/main/java/com/fireblocks/sdk/Fireblocks.java @@ -36,7 +36,6 @@ public class Fireblocks { private final String apiKey; private final String userAgent; - private AdminQuorumApi adminQuorum; private ApiUserApi apiUser; private AssetsApi assets; private AuditLogsApi auditLogs; @@ -68,7 +67,6 @@ public class Fireblocks { private Web3ConnectionsApi web3Connections; private WebhooksApi webhooks; private WhitelistIpAddressesApi whitelistIpAddresses; - private WorkspaceApi workspace; private WorkspaceStatusBetaApi workspaceStatusBeta; public Fireblocks(ConfigurationOptions conf) { @@ -209,13 +207,6 @@ public void onComplete() { .sign(signingAlgorithm); } - public AdminQuorumApi adminQuorum() { - if (adminQuorum == null) { - adminQuorum = new AdminQuorumApi(apiClient); - } - return adminQuorum; - } - public ApiUserApi apiUser() { if (apiUser == null) { apiUser = new ApiUserApi(apiClient); @@ -433,13 +424,6 @@ public WhitelistIpAddressesApi whitelistIpAddresses() { return whitelistIpAddresses; } - public WorkspaceApi workspace() { - if (workspace == null) { - workspace = new WorkspaceApi(apiClient); - } - return workspace; - } - public WorkspaceStatusBetaApi workspaceStatusBeta() { if (workspaceStatusBeta == null) { workspaceStatusBeta = new WorkspaceStatusBetaApi(apiClient); diff --git a/src/main/java/com/fireblocks/sdk/api/AdminQuorumApi.java b/src/main/java/com/fireblocks/sdk/api/AdminQuorumApi.java deleted file mode 100644 index b16aeb0..0000000 --- a/src/main/java/com/fireblocks/sdk/api/AdminQuorumApi.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@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.databind.ObjectMapper; -import com.fireblocks.sdk.ApiClient; -import com.fireblocks.sdk.ApiException; -import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.model.SetAdminQuorumThresholdRequest; -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.concurrent.CompletableFuture; -import java.util.function.Consumer; - -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdminQuorumApi { - 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 AdminQuorumApi() { - this(new ApiClient()); - } - - public AdminQuorumApi(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()); - } - - private String formatExceptionMessage(String operationId, int statusCode, String body) { - if (body == null || body.isEmpty()) { - body = "[no body]"; - } - return operationId + " call failed with: " + statusCode + " - " + body; - } - - /** - * Update admin quorum threshold Update admin quorum threshold - * - * @param setAdminQuorumThresholdRequest (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<Void>> - * @throws ApiException if fails to make API call - */ - public CompletableFuture> setAdminQuorumThreshold( - SetAdminQuorumThresholdRequest setAdminQuorumThresholdRequest, String idempotencyKey) - throws ApiException { - try { - HttpRequest.Builder localVarRequestBuilder = - setAdminQuorumThresholdRequestBuilder( - setAdminQuorumThresholdRequest, 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( - "setAdminQuorumThreshold", localVarResponse)); - } - return CompletableFuture.completedFuture( - new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null)); - }); - } catch (ApiException e) { - return CompletableFuture.failedFuture(e); - } - } - - private HttpRequest.Builder setAdminQuorumThresholdRequestBuilder( - SetAdminQuorumThresholdRequest setAdminQuorumThresholdRequest, String idempotencyKey) - throws ApiException { - // verify the required parameter 'setAdminQuorumThresholdRequest' is set - if (setAdminQuorumThresholdRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'setAdminQuorumThresholdRequest' when calling" - + " setAdminQuorumThreshold"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/admin_quorum"; - - 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(setAdminQuorumThresholdRequest); - localVarRequestBuilder.method( - "PUT", 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/api/ApiUserApi.java b/src/main/java/com/fireblocks/sdk/api/ApiUserApi.java index 50059d7..3002969 100644 --- a/src/main/java/com/fireblocks/sdk/api/ApiUserApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ApiUserApi.java @@ -13,11 +13,13 @@ 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.model.CreateAPIUser; +import com.fireblocks.sdk.model.GetAPIUsersResponse; import java.io.IOException; import java.io.InputStream; import java.net.URI; @@ -136,10 +138,10 @@ private HttpRequest.Builder createApiUserRequestBuilder( /** * get api users get api users from the current tenant * - * @return CompletableFuture<ApiResponse<Void>> + * @return CompletableFuture<ApiResponse<GetAPIUsersResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> getApiUsers() throws ApiException { + public CompletableFuture> getApiUsers() throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = getApiUsersRequestBuilder(); return memberVarHttpClient @@ -153,11 +155,21 @@ public CompletableFuture> getApiUsers() throws ApiException { return CompletableFuture.failedFuture( getApiException("getApiUsers", localVarResponse)); } - return CompletableFuture.completedFuture( - new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null)); + 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< + GetAPIUsersResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } }); } catch (ApiException e) { return CompletableFuture.failedFuture(e); diff --git a/src/main/java/com/fireblocks/sdk/api/AuditLogsApi.java b/src/main/java/com/fireblocks/sdk/api/AuditLogsApi.java index 036057b..5bee7fa 100644 --- a/src/main/java/com/fireblocks/sdk/api/AuditLogsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/AuditLogsApi.java @@ -19,6 +19,7 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.Pair; +import com.fireblocks.sdk.model.GetAuditLogsResponse; import com.fireblocks.sdk.model.GetAuditLogsResponseDTO; import java.io.IOException; import java.io.InputStream; @@ -76,11 +77,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * * @param timePeriod The last time period to fetch audit logs (optional) * @param cursor The next id to start fetch audit logs from (optional) - * @return CompletableFuture<ApiResponse<Void>> + * @return CompletableFuture<ApiResponse<GetAuditLogsResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> getAuditLogs(String timePeriod, String cursor) - throws ApiException { + public CompletableFuture> getAuditLogs( + String timePeriod, String cursor) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = getAuditLogsRequestBuilder(timePeriod, cursor); @@ -95,11 +96,21 @@ public CompletableFuture> getAuditLogs(String timePeriod, Stri return CompletableFuture.failedFuture( getApiException("getAuditLogs", localVarResponse)); } - return CompletableFuture.completedFuture( - new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null)); + 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< + GetAuditLogsResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } }); } catch (ApiException e) { return CompletableFuture.failedFuture(e); diff --git a/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java b/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java index c1276e6..de0c510 100644 --- a/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java @@ -18,7 +18,9 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.AssetResponse; import com.fireblocks.sdk.model.AssetTypeResponse; +import com.fireblocks.sdk.model.RegisterNewAssetRequest; import java.io.IOException; import java.io.InputStream; import java.net.URI; @@ -131,4 +133,85 @@ private HttpRequest.Builder getSupportedAssetsRequestBuilder() throws ApiExcepti } return localVarRequestBuilder; } + /** + * Register an asset Register a new asset to a workspace and return the newly created + * asset's details. Currently supported for EVM based chains only. + * + * @param registerNewAssetRequest (optional) + * @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<AssetResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> registerNewAsset( + RegisterNewAssetRequest registerNewAssetRequest, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + registerNewAssetRequestBuilder(registerNewAssetRequest, 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("registerNewAsset", 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< + AssetResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder registerNewAssetRequestBuilder( + RegisterNewAssetRequest registerNewAssetRequest, String idempotencyKey) + throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/assets"; + + 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(registerNewAssetRequest); + 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; + } } diff --git a/src/main/java/com/fireblocks/sdk/api/ConsoleUserApi.java b/src/main/java/com/fireblocks/sdk/api/ConsoleUserApi.java index 2ddac41..5da3b6c 100644 --- a/src/main/java/com/fireblocks/sdk/api/ConsoleUserApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ConsoleUserApi.java @@ -13,11 +13,13 @@ 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.model.CreateConsoleUser; +import com.fireblocks.sdk.model.GetConsoleUsersResponse; import java.io.IOException; import java.io.InputStream; import java.net.URI; @@ -136,10 +138,11 @@ private HttpRequest.Builder createConsoleUserRequestBuilder( /** * get console users get console users from the current tenant * - * @return CompletableFuture<ApiResponse<Void>> + * @return CompletableFuture<ApiResponse<GetConsoleUsersResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> getConsoleUsers() throws ApiException { + public CompletableFuture> getConsoleUsers() + throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = getConsoleUsersRequestBuilder(); return memberVarHttpClient @@ -153,11 +156,21 @@ public CompletableFuture> getConsoleUsers() throws ApiExceptio return CompletableFuture.failedFuture( getApiException("getConsoleUsers", localVarResponse)); } - return CompletableFuture.completedFuture( - new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null)); + 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< + GetConsoleUsersResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } }); } catch (ApiException e) { return CompletableFuture.failedFuture(e); diff --git a/src/main/java/com/fireblocks/sdk/api/ExchangeAccountsApi.java b/src/main/java/com/fireblocks/sdk/api/ExchangeAccountsApi.java index 54d6e2c..ec8b188 100644 --- a/src/main/java/com/fireblocks/sdk/api/ExchangeAccountsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ExchangeAccountsApi.java @@ -20,10 +20,12 @@ import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.model.ConvertAssetsRequest; +import com.fireblocks.sdk.model.ConvertAssetsResponse; import com.fireblocks.sdk.model.CreateInternalTransferRequest; import com.fireblocks.sdk.model.ExchangeAccount; import com.fireblocks.sdk.model.ExchangeAccountsPaged; import com.fireblocks.sdk.model.ExchangeAsset; +import com.fireblocks.sdk.model.InternalTransferResponse; import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; @@ -88,10 +90,10 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @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<Void>> + * @return CompletableFuture<ApiResponse<ConvertAssetsResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> convertAssets( + public CompletableFuture> convertAssets( String exchangeAccountId, ConvertAssetsRequest convertAssetsRequest, String idempotencyKey) @@ -111,11 +113,21 @@ public CompletableFuture> convertAssets( return CompletableFuture.failedFuture( getApiException("convertAssets", localVarResponse)); } - return CompletableFuture.completedFuture( - new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null)); + 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< + ConvertAssetsResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } }); } catch (ApiException e) { return CompletableFuture.failedFuture(e); @@ -430,10 +442,10 @@ private HttpRequest.Builder getPagedExchangeAccountsRequestBuilder( * @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<Void>> + * @return CompletableFuture<ApiResponse<InternalTransferResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> internalTransfer( + public CompletableFuture> internalTransfer( String exchangeAccountId, CreateInternalTransferRequest createInternalTransferRequest, String idempotencyKey) @@ -453,11 +465,21 @@ public CompletableFuture> internalTransfer( return CompletableFuture.failedFuture( getApiException("internalTransfer", localVarResponse)); } - return CompletableFuture.completedFuture( - new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null)); + 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< + InternalTransferResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } }); } catch (ApiException e) { return CompletableFuture.failedFuture(e); diff --git a/src/main/java/com/fireblocks/sdk/api/FiatAccountsApi.java b/src/main/java/com/fireblocks/sdk/api/FiatAccountsApi.java index 18027aa..8b32909 100644 --- a/src/main/java/com/fireblocks/sdk/api/FiatAccountsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/FiatAccountsApi.java @@ -18,8 +18,10 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.DepositFundsFromLinkedDDAResponse; import com.fireblocks.sdk.model.FiatAccount; import com.fireblocks.sdk.model.Funds; +import com.fireblocks.sdk.model.RedeemFundsToLinkedDDAResponse; import java.io.IOException; import java.io.InputStream; import java.net.URI; @@ -77,11 +79,12 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @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<Void>> + * @return CompletableFuture<ApiResponse<DepositFundsFromLinkedDDAResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> depositFundsFromLinkedDDA( - String accountId, Funds funds, String idempotencyKey) throws ApiException { + public CompletableFuture> + depositFundsFromLinkedDDA(String accountId, Funds funds, String idempotencyKey) + throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = depositFundsFromLinkedDDARequestBuilder(accountId, funds, idempotencyKey); @@ -97,11 +100,21 @@ public CompletableFuture> depositFundsFromLinkedDDA( getApiException( "depositFundsFromLinkedDDA", localVarResponse)); } - return CompletableFuture.completedFuture( - new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null)); + 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< + DepositFundsFromLinkedDDAResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } }); } catch (ApiException e) { return CompletableFuture.failedFuture(e); @@ -285,10 +298,10 @@ private HttpRequest.Builder getFiatAccountsRequestBuilder() throws ApiException * @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<Void>> + * @return CompletableFuture<ApiResponse<RedeemFundsToLinkedDDAResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> redeemFundsToLinkedDDA( + public CompletableFuture> redeemFundsToLinkedDDA( String accountId, Funds funds, String idempotencyKey) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = @@ -305,11 +318,21 @@ public CompletableFuture> redeemFundsToLinkedDDA( getApiException( "redeemFundsToLinkedDDA", localVarResponse)); } - return CompletableFuture.completedFuture( - new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null)); + 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< + RedeemFundsToLinkedDDAResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } }); } catch (ApiException e) { return CompletableFuture.failedFuture(e); diff --git a/src/main/java/com/fireblocks/sdk/api/GasStationsApi.java b/src/main/java/com/fireblocks/sdk/api/GasStationsApi.java index 0ee9491..84ff19f 100644 --- a/src/main/java/com/fireblocks/sdk/api/GasStationsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/GasStationsApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.EditGasStationConfigurationResponse; import com.fireblocks.sdk.model.GasStationConfiguration; import com.fireblocks.sdk.model.GasStationPropertiesResponse; import java.io.IOException; @@ -210,12 +211,13 @@ private HttpRequest.Builder getGasStationInfoRequestBuilder() throws ApiExceptio * @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<Void>> + * @return CompletableFuture<ApiResponse<EditGasStationConfigurationResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> updateGasStationConfiguration( - GasStationConfiguration gasStationConfiguration, String idempotencyKey) - throws ApiException { + public CompletableFuture> + updateGasStationConfiguration( + GasStationConfiguration gasStationConfiguration, String idempotencyKey) + throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = updateGasStationConfigurationRequestBuilder( @@ -233,11 +235,21 @@ public CompletableFuture> updateGasStationConfiguration( "updateGasStationConfiguration", localVarResponse)); } - return CompletableFuture.completedFuture( - new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null)); + 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< + EditGasStationConfigurationResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } }); } catch (ApiException e) { return CompletableFuture.failedFuture(e); @@ -291,12 +303,15 @@ private HttpRequest.Builder updateGasStationConfigurationRequestBuilder( * @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<Void>> + * @return CompletableFuture<ApiResponse<EditGasStationConfigurationResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> updateGasStationConfigurationByAssetId( - GasStationConfiguration gasStationConfiguration, String assetId, String idempotencyKey) - throws ApiException { + public CompletableFuture> + updateGasStationConfigurationByAssetId( + GasStationConfiguration gasStationConfiguration, + String assetId, + String idempotencyKey) + throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = updateGasStationConfigurationByAssetIdRequestBuilder( @@ -314,11 +329,21 @@ public CompletableFuture> updateGasStationConfigurationByAsset "updateGasStationConfigurationByAssetId", localVarResponse)); } - return CompletableFuture.completedFuture( - new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null)); + 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< + EditGasStationConfigurationResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } }); } catch (ApiException e) { return CompletableFuture.failedFuture(e); diff --git a/src/main/java/com/fireblocks/sdk/api/OtaBetaApi.java b/src/main/java/com/fireblocks/sdk/api/OtaBetaApi.java index f523805..33a00cb 100644 --- a/src/main/java/com/fireblocks/sdk/api/OtaBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/OtaBetaApi.java @@ -20,6 +20,7 @@ import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.GetOtaStatus200Response; import com.fireblocks.sdk.model.SetOtaStatusRequest; +import com.fireblocks.sdk.model.SetOtaStatusResponse; import java.io.IOException; import java.io.InputStream; import java.net.URI; @@ -136,10 +137,10 @@ private HttpRequest.Builder getOtaStatusRequestBuilder() throws ApiException { * @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<Void>> + * @return CompletableFuture<ApiResponse<SetOtaStatusResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> setOtaStatus( + public CompletableFuture> setOtaStatus( SetOtaStatusRequest setOtaStatusRequest, String idempotencyKey) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = @@ -155,11 +156,21 @@ public CompletableFuture> setOtaStatus( return CompletableFuture.failedFuture( getApiException("setOtaStatus", localVarResponse)); } - return CompletableFuture.completedFuture( - new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null)); + 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< + SetOtaStatusResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } }); } catch (ApiException e) { return CompletableFuture.failedFuture(e); diff --git a/src/main/java/com/fireblocks/sdk/api/VaultsApi.java b/src/main/java/com/fireblocks/sdk/api/VaultsApi.java index ec34682..9d59401 100644 --- a/src/main/java/com/fireblocks/sdk/api/VaultsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/VaultsApi.java @@ -25,10 +25,12 @@ import com.fireblocks.sdk.model.CreateMultipleAccountsRequest; import com.fireblocks.sdk.model.CreateVaultAccountRequest; import com.fireblocks.sdk.model.CreateVaultAssetResponse; +import com.fireblocks.sdk.model.GetMaxSpendableAmountResponse; import com.fireblocks.sdk.model.JobCreated; import com.fireblocks.sdk.model.PaginatedAddressResponse; import com.fireblocks.sdk.model.PaginatedAssetWalletResponse; import com.fireblocks.sdk.model.PublicKeyInformation; +import com.fireblocks.sdk.model.RenameVaultAccountResponse; import com.fireblocks.sdk.model.SetAutoFuelRequest; import com.fireblocks.sdk.model.SetCustomerRefIdForAddressRequest; import com.fireblocks.sdk.model.SetCustomerRefIdRequest; @@ -805,10 +807,10 @@ private HttpRequest.Builder getAssetWalletsRequestBuilder( * @param manualSignging False by default. The maximum number of inputs depends if the * transaction will be signed by an automated co-signer server or on a mobile device. * (optional) - * @return CompletableFuture<ApiResponse<Void>> + * @return CompletableFuture<ApiResponse<GetMaxSpendableAmountResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> getMaxSpendableAmount( + public CompletableFuture> getMaxSpendableAmount( String vaultAccountId, String assetId, Boolean manualSignging) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = @@ -825,11 +827,21 @@ public CompletableFuture> getMaxSpendableAmount( getApiException( "getMaxSpendableAmount", localVarResponse)); } - return CompletableFuture.completedFuture( - new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null)); + 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< + GetMaxSpendableAmountResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } }); } catch (ApiException e) { return CompletableFuture.failedFuture(e); @@ -2270,10 +2282,10 @@ private HttpRequest.Builder unhideVaultAccountRequestBuilder( * @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<Void>> + * @return CompletableFuture<ApiResponse<RenameVaultAccountResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> updateVaultAccount( + public CompletableFuture> updateVaultAccount( UpdateVaultAccountRequest updateVaultAccountRequest, String vaultAccountId, String idempotencyKey) @@ -2294,11 +2306,21 @@ public CompletableFuture> updateVaultAccount( getApiException( "updateVaultAccount", localVarResponse)); } - return CompletableFuture.completedFuture( - new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null)); + 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< + RenameVaultAccountResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } }); } catch (ApiException e) { return CompletableFuture.failedFuture(e); diff --git a/src/main/java/com/fireblocks/sdk/api/WebhooksApi.java b/src/main/java/com/fireblocks/sdk/api/WebhooksApi.java index a8c8e0c..e38ccfb 100644 --- a/src/main/java/com/fireblocks/sdk/api/WebhooksApi.java +++ b/src/main/java/com/fireblocks/sdk/api/WebhooksApi.java @@ -19,6 +19,7 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.ResendTransactionWebhooksRequest; +import com.fireblocks.sdk.model.ResendWebhooksByTransactionIdResponse; import com.fireblocks.sdk.model.ResendWebhooksResponse; import java.io.IOException; import java.io.InputStream; @@ -77,14 +78,15 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @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<Void>> + * @return CompletableFuture<ApiResponse<ResendWebhooksByTransactionIdResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> resendTransactionWebhooks( - ResendTransactionWebhooksRequest resendTransactionWebhooksRequest, - String txId, - String idempotencyKey) - throws ApiException { + public CompletableFuture> + resendTransactionWebhooks( + ResendTransactionWebhooksRequest resendTransactionWebhooksRequest, + String txId, + String idempotencyKey) + throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = resendTransactionWebhooksRequestBuilder( @@ -101,11 +103,21 @@ public CompletableFuture> resendTransactionWebhooks( getApiException( "resendTransactionWebhooks", localVarResponse)); } - return CompletableFuture.completedFuture( - new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null)); + 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< + ResendWebhooksByTransactionIdResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } }); } catch (ApiException e) { return CompletableFuture.failedFuture(e); diff --git a/src/main/java/com/fireblocks/sdk/api/WhitelistIpAddressesApi.java b/src/main/java/com/fireblocks/sdk/api/WhitelistIpAddressesApi.java index 7d33f26..d3582c4 100644 --- a/src/main/java/com/fireblocks/sdk/api/WhitelistIpAddressesApi.java +++ b/src/main/java/com/fireblocks/sdk/api/WhitelistIpAddressesApi.java @@ -13,10 +13,13 @@ 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.model.GetWhitelistIpAddressesResponse; +import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.net.http.HttpClient; @@ -68,11 +71,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * gets ip addresses gets ip addresses * * @param userId The ID of the user (required) - * @return CompletableFuture<ApiResponse<Void>> + * @return CompletableFuture<ApiResponse<GetWhitelistIpAddressesResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> getWhitelistIpAddresses(String userId) - throws ApiException { + public CompletableFuture> getWhitelistIpAddresses( + String userId) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = getWhitelistIpAddressesRequestBuilder(userId); @@ -88,11 +91,21 @@ public CompletableFuture> getWhitelistIpAddresses(String userI getApiException( "getWhitelistIpAddresses", localVarResponse)); } - return CompletableFuture.completedFuture( - new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null)); + 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< + GetWhitelistIpAddressesResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } }); } catch (ApiException e) { return CompletableFuture.failedFuture(e); diff --git a/src/main/java/com/fireblocks/sdk/api/WorkspaceApi.java b/src/main/java/com/fireblocks/sdk/api/WorkspaceApi.java deleted file mode 100644 index 62527db..0000000 --- a/src/main/java/com/fireblocks/sdk/api/WorkspaceApi.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@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.databind.ObjectMapper; -import com.fireblocks.sdk.ApiClient; -import com.fireblocks.sdk.ApiException; -import com.fireblocks.sdk.ApiResponse; -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.concurrent.CompletableFuture; -import java.util.function.Consumer; - -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class WorkspaceApi { - 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 WorkspaceApi() { - this(new ApiClient()); - } - - public WorkspaceApi(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()); - } - - private String formatExceptionMessage(String operationId, int statusCode, String body) { - if (body == null || body.isEmpty()) { - body = "[no body]"; - } - return operationId + " call failed with: " + statusCode + " - " + body; - } - - /** - * Freeze Workspace Freezes a Workspace so that ALL operations by ANY user are blocked. You - * should only perform this action when the workspace faces imminent risk, such as when you have - * a security breach. To unfreeze a workspace, the workspace Owner must submit a request to - * Fireblocks Support. **NOTE:** - This operation can only be performed by the workspace Owner - - * Your workspace continues to receive incoming transfers during this time. - * - * @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<Void>> - * @throws ApiException if fails to make API call - */ - public CompletableFuture> freezeWorkspace(String idempotencyKey) - throws ApiException { - try { - HttpRequest.Builder localVarRequestBuilder = - freezeWorkspaceRequestBuilder(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("freezeWorkspace", localVarResponse)); - } - return CompletableFuture.completedFuture( - new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null)); - }); - } catch (ApiException e) { - return CompletableFuture.failedFuture(e); - } - } - - private HttpRequest.Builder freezeWorkspaceRequestBuilder(String idempotencyKey) - throws ApiException { - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/workspace/freeze"; - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - if (idempotencyKey != null) { - localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); - } - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("POST", 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/model/APIUser.java b/src/main/java/com/fireblocks/sdk/model/APIUser.java new file mode 100644 index 0000000..2b29c1f --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/APIUser.java @@ -0,0 +1,341 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** APIUser */ +@JsonPropertyOrder({ + APIUser.JSON_PROPERTY_ID, + APIUser.JSON_PROPERTY_NAME, + APIUser.JSON_PROPERTY_ROLE, + APIUser.JSON_PROPERTY_ENABLED, + APIUser.JSON_PROPERTY_STATUS, + APIUser.JSON_PROPERTY_USER_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class APIUser { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_ROLE = "role"; + private UserRole role; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_STATUS = "status"; + private UserStatus status; + + public static final String JSON_PROPERTY_USER_TYPE = "userType"; + private UserType userType; + + public APIUser() {} + + public APIUser id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the user + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + public APIUser name(String name) { + this.name = name; + return this; + } + + /** + * The name of the user + * + * @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(String name) { + this.name = name; + } + + public APIUser role(UserRole role) { + this.role = role; + return this; + } + + /** + * Get role + * + * @return role + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UserRole getRole() { + return role; + } + + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRole(UserRole role) { + this.role = role; + } + + public APIUser enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the user is enabled + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public APIUser status(UserStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UserStatus getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(UserStatus status) { + this.status = status; + } + + public APIUser userType(UserType userType) { + this.userType = userType; + return this; + } + + /** + * Get userType + * + * @return userType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UserType getUserType() { + return userType; + } + + @JsonProperty(JSON_PROPERTY_USER_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUserType(UserType userType) { + this.userType = userType; + } + + /** Return true if this APIUser object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIUser apIUser = (APIUser) o; + return Objects.equals(this.id, apIUser.id) + && Objects.equals(this.name, apIUser.name) + && Objects.equals(this.role, apIUser.role) + && Objects.equals(this.enabled, apIUser.enabled) + && Objects.equals(this.status, apIUser.status) + && Objects.equals(this.userType, apIUser.userType); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, role, enabled, status, userType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIUser {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" userType: ").append(toIndentedString(userType)).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, + URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `role` to the URL query string + if (getRole() != null) { + joiner.add( + String.format( + "%srole%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getRole()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `enabled` to the URL query string + if (getEnabled() != null) { + joiner.add( + String.format( + "%senabled%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getEnabled()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `userType` to the URL query string + if (getUserType() != null) { + joiner.add( + String.format( + "%suserType%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getUserType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/Account.java b/src/main/java/com/fireblocks/sdk/model/Account.java new file mode 100644 index 0000000..bd575a4 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/Account.java @@ -0,0 +1,181 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** Account */ +@JsonPropertyOrder({Account.JSON_PROPERTY_ACCOUNT_ID, Account.JSON_PROPERTY_ACCOUNT_TYPE}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Account { + public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; + private String accountId; + + public static final String JSON_PROPERTY_ACCOUNT_TYPE = "accountType"; + private AccountType accountType; + + public Account() {} + + public Account accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get accountId + * + * @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(String accountId) { + this.accountId = accountId; + } + + public Account accountType(AccountType accountType) { + this.accountType = accountType; + return this; + } + + /** + * Get accountType + * + * @return accountType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AccountType getAccountType() { + return accountType; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountType(AccountType accountType) { + this.accountType = accountType; + } + + /** Return true if this Account object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Account account = (Account) o; + return Objects.equals(this.accountId, account.accountId) + && Objects.equals(this.accountType, account.accountType); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, accountType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Account {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).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 `accountId` to the URL query string + if (getAccountId() != null) { + joiner.add( + String.format( + "%saccountId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getAccountId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `accountType` to the URL query string + if (getAccountType() != null) { + joiner.add( + String.format( + "%saccountType%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getAccountType()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AccountType.java b/src/main/java/com/fireblocks/sdk/model/AccountType.java new file mode 100644 index 0000000..97f4a15 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AccountType.java @@ -0,0 +1,70 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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; + +/** Gets or Sets AccountType */ +public enum AccountType { + EXCHANGE_ACCOUNT("EXCHANGE_ACCOUNT"), + + UNMANAGED_WALLET("UNMANAGED_WALLET"), + + VAULT_ACCOUNT("VAULT_ACCOUNT"), + + NETWORK_CONNECTION("NETWORK_CONNECTION"), + + FIAT_ACCOUNT("FIAT_ACCOUNT"); + + private String value; + + AccountType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AccountType fromValue(String value) { + for (AccountType b : AccountType.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/AssetAmount.java b/src/main/java/com/fireblocks/sdk/model/AssetAmount.java new file mode 100644 index 0000000..0aea871 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetAmount.java @@ -0,0 +1,178 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** AssetAmount */ +@JsonPropertyOrder({AssetAmount.JSON_PROPERTY_AMOUNT, AssetAmount.JSON_PROPERTY_ASSET_ID}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AssetAmount { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private String amount; + + public static final String JSON_PROPERTY_ASSET_ID = "assetId"; + private String assetId; + + public AssetAmount() {} + + public AssetAmount amount(String amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * + * @return amount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(String amount) { + this.amount = amount; + } + + public AssetAmount assetId(String assetId) { + this.assetId = assetId; + return this; + } + + /** + * Get assetId + * + * @return assetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAssetId() { + return assetId; + } + + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAssetId(String assetId) { + this.assetId = assetId; + } + + /** Return true if this AssetAmount object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetAmount assetAmount = (AssetAmount) o; + return Objects.equals(this.amount, assetAmount.amount) + && Objects.equals(this.assetId, assetAmount.assetId); + } + + @Override + public int hashCode() { + return Objects.hash(amount, assetId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetAmount {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" assetId: ").append(toIndentedString(assetId)).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 `amount` to the URL query string + if (getAmount() != null) { + joiner.add( + String.format( + "%samount%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `assetId` to the URL query string + if (getAssetId() != null) { + joiner.add( + String.format( + "%sassetId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAssetId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AssetBadRequestErrorResponse.java b/src/main/java/com/fireblocks/sdk/model/AssetBadRequestErrorResponse.java new file mode 100644 index 0000000..4412dde --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetBadRequestErrorResponse.java @@ -0,0 +1,182 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** AssetBadRequestErrorResponse */ +@JsonPropertyOrder({ + AssetBadRequestErrorResponse.JSON_PROPERTY_MESSAGE, + AssetBadRequestErrorResponse.JSON_PROPERTY_CODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AssetBadRequestErrorResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_CODE = "code"; + private String code; + + public AssetBadRequestErrorResponse() {} + + public AssetBadRequestErrorResponse message(String message) { + this.message = message; + return this; + } + + /** + * Bad request error code + * + * @return message + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(String message) { + this.message = message; + } + + public AssetBadRequestErrorResponse code(String code) { + this.code = code; + return this; + } + + /** + * Error code + * + * @return code + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCode() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCode(String code) { + this.code = code; + } + + /** Return true if this AssetBadRequestErrorResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetBadRequestErrorResponse assetBadRequestErrorResponse = + (AssetBadRequestErrorResponse) o; + return Objects.equals(this.message, assetBadRequestErrorResponse.message) + && Objects.equals(this.code, assetBadRequestErrorResponse.code); + } + + @Override + public int hashCode() { + return Objects.hash(message, code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetBadRequestErrorResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).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 `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add( + String.format( + "%scode%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getCode()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AssetConflictErrorResponse.java b/src/main/java/com/fireblocks/sdk/model/AssetConflictErrorResponse.java new file mode 100644 index 0000000..5c78429 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetConflictErrorResponse.java @@ -0,0 +1,181 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** AssetConflictErrorResponse */ +@JsonPropertyOrder({ + AssetConflictErrorResponse.JSON_PROPERTY_MESSAGE, + AssetConflictErrorResponse.JSON_PROPERTY_CODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AssetConflictErrorResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_CODE = "code"; + private String code; + + public AssetConflictErrorResponse() {} + + public AssetConflictErrorResponse message(String message) { + this.message = message; + return this; + } + + /** + * Conflict error code + * + * @return message + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(String message) { + this.message = message; + } + + public AssetConflictErrorResponse code(String code) { + this.code = code; + return this; + } + + /** + * Error code + * + * @return code + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCode() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCode(String code) { + this.code = code; + } + + /** Return true if this AssetConflictErrorResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetConflictErrorResponse assetConflictErrorResponse = (AssetConflictErrorResponse) o; + return Objects.equals(this.message, assetConflictErrorResponse.message) + && Objects.equals(this.code, assetConflictErrorResponse.code); + } + + @Override + public int hashCode() { + return Objects.hash(message, code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetConflictErrorResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).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 `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add( + String.format( + "%scode%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getCode()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AssetInternalServerErrorResponse.java b/src/main/java/com/fireblocks/sdk/model/AssetInternalServerErrorResponse.java new file mode 100644 index 0000000..cecc32c --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetInternalServerErrorResponse.java @@ -0,0 +1,182 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** AssetInternalServerErrorResponse */ +@JsonPropertyOrder({ + AssetInternalServerErrorResponse.JSON_PROPERTY_MESSAGE, + AssetInternalServerErrorResponse.JSON_PROPERTY_CODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AssetInternalServerErrorResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_CODE = "code"; + private String code; + + public AssetInternalServerErrorResponse() {} + + public AssetInternalServerErrorResponse message(String message) { + this.message = message; + return this; + } + + /** + * Internal server error code + * + * @return message + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(String message) { + this.message = message; + } + + public AssetInternalServerErrorResponse code(String code) { + this.code = code; + return this; + } + + /** + * Error code + * + * @return code + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCode() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCode(String code) { + this.code = code; + } + + /** Return true if this AssetInternalServerErrorResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetInternalServerErrorResponse assetInternalServerErrorResponse = + (AssetInternalServerErrorResponse) o; + return Objects.equals(this.message, assetInternalServerErrorResponse.message) + && Objects.equals(this.code, assetInternalServerErrorResponse.code); + } + + @Override + public int hashCode() { + return Objects.hash(message, code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetInternalServerErrorResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).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 `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add( + String.format( + "%scode%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getCode()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AssetNotFoundErrorResponse.java b/src/main/java/com/fireblocks/sdk/model/AssetNotFoundErrorResponse.java new file mode 100644 index 0000000..9ad5fd9 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetNotFoundErrorResponse.java @@ -0,0 +1,181 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** AssetNotFoundErrorResponse */ +@JsonPropertyOrder({ + AssetNotFoundErrorResponse.JSON_PROPERTY_MESSAGE, + AssetNotFoundErrorResponse.JSON_PROPERTY_CODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AssetNotFoundErrorResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_CODE = "code"; + private String code; + + public AssetNotFoundErrorResponse() {} + + public AssetNotFoundErrorResponse message(String message) { + this.message = message; + return this; + } + + /** + * Not found error code + * + * @return message + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(String message) { + this.message = message; + } + + public AssetNotFoundErrorResponse code(String code) { + this.code = code; + return this; + } + + /** + * Error code + * + * @return code + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCode() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCode(String code) { + this.code = code; + } + + /** Return true if this AssetNotFoundErrorResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetNotFoundErrorResponse assetNotFoundErrorResponse = (AssetNotFoundErrorResponse) o; + return Objects.equals(this.message, assetNotFoundErrorResponse.message) + && Objects.equals(this.code, assetNotFoundErrorResponse.code); + } + + @Override + public int hashCode() { + return Objects.hash(message, code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetNotFoundErrorResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).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 `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add( + String.format( + "%scode%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getCode()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AssetResponse.java b/src/main/java/com/fireblocks/sdk/model/AssetResponse.java new file mode 100644 index 0000000..1eb8ce1 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetResponse.java @@ -0,0 +1,289 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** AssetResponse */ +@JsonPropertyOrder({ + AssetResponse.JSON_PROPERTY_LEGACY_ID, + AssetResponse.JSON_PROPERTY_ASSET_CLASS, + AssetResponse.JSON_PROPERTY_ONCHAIN, + AssetResponse.JSON_PROPERTY_METADATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AssetResponse { + public static final String JSON_PROPERTY_LEGACY_ID = "legacyId"; + private String legacyId; + + /** Gets or Sets assetClass */ + public enum AssetClassEnum { + NATIVE("NATIVE"), + + FT("FT"), + + NFT("NFT"), + + SFT("SFT"); + + private String value; + + AssetClassEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AssetClassEnum fromValue(String value) { + for (AssetClassEnum b : AssetClassEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ASSET_CLASS = "assetClass"; + private AssetClassEnum assetClass; + + public static final String JSON_PROPERTY_ONCHAIN = "onchain"; + private AssetResponseOnchain onchain; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private AssetResponseMetadata metadata; + + public AssetResponse() {} + + public AssetResponse legacyId(String legacyId) { + this.legacyId = legacyId; + return this; + } + + /** + * Get legacyId + * + * @return legacyId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LEGACY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLegacyId() { + return legacyId; + } + + @JsonProperty(JSON_PROPERTY_LEGACY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLegacyId(String legacyId) { + this.legacyId = legacyId; + } + + public AssetResponse assetClass(AssetClassEnum assetClass) { + this.assetClass = assetClass; + return this; + } + + /** + * Get assetClass + * + * @return assetClass + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ASSET_CLASS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetClassEnum getAssetClass() { + return assetClass; + } + + @JsonProperty(JSON_PROPERTY_ASSET_CLASS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAssetClass(AssetClassEnum assetClass) { + this.assetClass = assetClass; + } + + public AssetResponse onchain(AssetResponseOnchain onchain) { + this.onchain = onchain; + return this; + } + + /** + * Get onchain + * + * @return onchain + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ONCHAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetResponseOnchain getOnchain() { + return onchain; + } + + @JsonProperty(JSON_PROPERTY_ONCHAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOnchain(AssetResponseOnchain onchain) { + this.onchain = onchain; + } + + public AssetResponse metadata(AssetResponseMetadata metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get metadata + * + * @return metadata + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetResponseMetadata getMetadata() { + return metadata; + } + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMetadata(AssetResponseMetadata metadata) { + this.metadata = metadata; + } + + /** Return true if this AssetResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetResponse assetResponse = (AssetResponse) o; + return Objects.equals(this.legacyId, assetResponse.legacyId) + && Objects.equals(this.assetClass, assetResponse.assetClass) + && Objects.equals(this.onchain, assetResponse.onchain) + && Objects.equals(this.metadata, assetResponse.metadata); + } + + @Override + public int hashCode() { + return Objects.hash(legacyId, assetClass, onchain, metadata); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetResponse {\n"); + sb.append(" legacyId: ").append(toIndentedString(legacyId)).append("\n"); + sb.append(" assetClass: ").append(toIndentedString(assetClass)).append("\n"); + sb.append(" onchain: ").append(toIndentedString(onchain)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).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 `legacyId` to the URL query string + if (getLegacyId() != null) { + joiner.add( + String.format( + "%slegacyId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getLegacyId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `assetClass` to the URL query string + if (getAssetClass() != null) { + joiner.add( + String.format( + "%sassetClass%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getAssetClass()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `onchain` to the URL query string + if (getOnchain() != null) { + joiner.add(getOnchain().toUrlQueryString(prefix + "onchain" + suffix)); + } + + // add `metadata` to the URL query string + if (getMetadata() != null) { + joiner.add(getMetadata().toUrlQueryString(prefix + "metadata" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AssetResponseMetadata.java b/src/main/java/com/fireblocks/sdk/model/AssetResponseMetadata.java new file mode 100644 index 0000000..7fe03f8 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetResponseMetadata.java @@ -0,0 +1,217 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** AssetResponseMetadata */ +@JsonPropertyOrder({ + AssetResponseMetadata.JSON_PROPERTY_SCOPE, + AssetResponseMetadata.JSON_PROPERTY_DEPRECATED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AssetResponseMetadata { + /** The scope of the asset */ + public enum ScopeEnum { + GLOBAL("Global"), + + LOCAL("Local"); + + private String value; + + ScopeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ScopeEnum fromValue(String value) { + for (ScopeEnum b : ScopeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SCOPE = "scope"; + private ScopeEnum scope; + + public static final String JSON_PROPERTY_DEPRECATED = "deprecated"; + private Boolean deprecated; + + public AssetResponseMetadata() {} + + public AssetResponseMetadata scope(ScopeEnum scope) { + this.scope = scope; + return this; + } + + /** + * The scope of the asset + * + * @return scope + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ScopeEnum getScope() { + return scope; + } + + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setScope(ScopeEnum scope) { + this.scope = scope; + } + + public AssetResponseMetadata deprecated(Boolean deprecated) { + this.deprecated = deprecated; + return this; + } + + /** + * Is asset deprecated + * + * @return deprecated + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DEPRECATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getDeprecated() { + return deprecated; + } + + @JsonProperty(JSON_PROPERTY_DEPRECATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDeprecated(Boolean deprecated) { + this.deprecated = deprecated; + } + + /** Return true if this AssetResponse_metadata object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetResponseMetadata assetResponseMetadata = (AssetResponseMetadata) o; + return Objects.equals(this.scope, assetResponseMetadata.scope) + && Objects.equals(this.deprecated, assetResponseMetadata.deprecated); + } + + @Override + public int hashCode() { + return Objects.hash(scope, deprecated); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetResponseMetadata {\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" deprecated: ").append(toIndentedString(deprecated)).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 `scope` to the URL query string + if (getScope() != null) { + joiner.add( + String.format( + "%sscope%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getScope()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `deprecated` to the URL query string + if (getDeprecated() != null) { + joiner.add( + String.format( + "%sdeprecated%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDeprecated()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AssetResponseOnchain.java b/src/main/java/com/fireblocks/sdk/model/AssetResponseOnchain.java new file mode 100644 index 0000000..09ea9a7 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetResponseOnchain.java @@ -0,0 +1,302 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** AssetResponseOnchain */ +@JsonPropertyOrder({ + AssetResponseOnchain.JSON_PROPERTY_SYMBOL, + AssetResponseOnchain.JSON_PROPERTY_NAME, + AssetResponseOnchain.JSON_PROPERTY_ADDRESS, + AssetResponseOnchain.JSON_PROPERTY_DECIMALS, + AssetResponseOnchain.JSON_PROPERTY_STANDARD +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AssetResponseOnchain { + public static final String JSON_PROPERTY_SYMBOL = "symbol"; + private String symbol; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private String address; + + public static final String JSON_PROPERTY_DECIMALS = "decimals"; + private BigDecimal decimals; + + public static final String JSON_PROPERTY_STANDARD = "standard"; + private String standard; + + public AssetResponseOnchain() {} + + public AssetResponseOnchain symbol(String symbol) { + this.symbol = symbol; + return this; + } + + /** + * The asset symbol + * + * @return symbol + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SYMBOL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSymbol() { + return symbol; + } + + @JsonProperty(JSON_PROPERTY_SYMBOL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSymbol(String symbol) { + this.symbol = symbol; + } + + public AssetResponseOnchain name(String name) { + this.name = name; + return this; + } + + /** + * The asset name + * + * @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(String name) { + this.name = name; + } + + public AssetResponseOnchain address(String address) { + this.address = address; + return this; + } + + /** + * The asset address + * + * @return address + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAddress() { + return address; + } + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(String address) { + this.address = address; + } + + public AssetResponseOnchain decimals(BigDecimal decimals) { + this.decimals = decimals; + return this; + } + + /** + * Number of decimals + * + * @return decimals + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DECIMALS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getDecimals() { + return decimals; + } + + @JsonProperty(JSON_PROPERTY_DECIMALS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDecimals(BigDecimal decimals) { + this.decimals = decimals; + } + + public AssetResponseOnchain standard(String standard) { + this.standard = standard; + return this; + } + + /** + * The asset standard + * + * @return standard + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STANDARD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStandard() { + return standard; + } + + @JsonProperty(JSON_PROPERTY_STANDARD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStandard(String standard) { + this.standard = standard; + } + + /** Return true if this AssetResponse_onchain object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetResponseOnchain assetResponseOnchain = (AssetResponseOnchain) o; + return Objects.equals(this.symbol, assetResponseOnchain.symbol) + && Objects.equals(this.name, assetResponseOnchain.name) + && Objects.equals(this.address, assetResponseOnchain.address) + && Objects.equals(this.decimals, assetResponseOnchain.decimals) + && Objects.equals(this.standard, assetResponseOnchain.standard); + } + + @Override + public int hashCode() { + return Objects.hash(symbol, name, address, decimals, standard); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetResponseOnchain {\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" decimals: ").append(toIndentedString(decimals)).append("\n"); + sb.append(" standard: ").append(toIndentedString(standard)).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 `symbol` to the URL query string + if (getSymbol() != null) { + joiner.add( + String.format( + "%ssymbol%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSymbol()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add( + String.format( + "%saddress%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAddress()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `decimals` to the URL query string + if (getDecimals() != null) { + joiner.add( + String.format( + "%sdecimals%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getDecimals()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `standard` to the URL query string + if (getStandard() != null) { + joiner.add( + String.format( + "%sstandard%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getStandard()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AuditLogData.java b/src/main/java/com/fireblocks/sdk/model/AuditLogData.java new file mode 100644 index 0000000..878b501 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AuditLogData.java @@ -0,0 +1,423 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** AuditLogData */ +@JsonPropertyOrder({ + AuditLogData.JSON_PROPERTY_ID, + AuditLogData.JSON_PROPERTY_TIMESTAMP, + AuditLogData.JSON_PROPERTY_CREATED_AT, + AuditLogData.JSON_PROPERTY_USER, + AuditLogData.JSON_PROPERTY_SUBJECT, + AuditLogData.JSON_PROPERTY_EVENT, + AuditLogData.JSON_PROPERTY_TENANT_ID, + AuditLogData.JSON_PROPERTY_USER_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AuditLogData { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; + private String timestamp; + + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private String createdAt; + + public static final String JSON_PROPERTY_USER = "user"; + private String user; + + public static final String JSON_PROPERTY_SUBJECT = "subject"; + private String subject; + + public static final String JSON_PROPERTY_EVENT = "event"; + private String event; + + public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; + private String tenantId; + + public static final String JSON_PROPERTY_USER_ID = "userId"; + private String userId; + + public AuditLogData() {} + + public AuditLogData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the audit log + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + public AuditLogData timestamp(String timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * The timestamp of the audit log + * + * @return timestamp + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTimestamp() { + return timestamp; + } + + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTimestamp(String timestamp) { + this.timestamp = timestamp; + } + + public AuditLogData createdAt(String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The timestamp of the audit log creation + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedAt() { + return createdAt; + } + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + public AuditLogData user(String user) { + this.user = user; + return this; + } + + /** + * The user who performed the action + * + * @return user + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUser() { + return user; + } + + @JsonProperty(JSON_PROPERTY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUser(String user) { + this.user = user; + } + + public AuditLogData subject(String subject) { + this.subject = subject; + return this; + } + + /** + * The subject of the action + * + * @return subject + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSubject() { + return subject; + } + + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSubject(String subject) { + this.subject = subject; + } + + public AuditLogData event(String event) { + this.event = event; + return this; + } + + /** + * The event that was performed + * + * @return event + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEvent() { + return event; + } + + @JsonProperty(JSON_PROPERTY_EVENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvent(String event) { + this.event = event; + } + + public AuditLogData tenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * The tenant ID of the audit log + * + * @return tenantId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TENANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTenantId() { + return tenantId; + } + + @JsonProperty(JSON_PROPERTY_TENANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + public AuditLogData userId(String userId) { + this.userId = userId; + return this; + } + + /** + * The user ID of the audit log + * + * @return userId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUserId() { + return userId; + } + + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUserId(String userId) { + this.userId = userId; + } + + /** Return true if this AuditLogData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuditLogData auditLogData = (AuditLogData) o; + return Objects.equals(this.id, auditLogData.id) + && Objects.equals(this.timestamp, auditLogData.timestamp) + && Objects.equals(this.createdAt, auditLogData.createdAt) + && Objects.equals(this.user, auditLogData.user) + && Objects.equals(this.subject, auditLogData.subject) + && Objects.equals(this.event, auditLogData.event) + && Objects.equals(this.tenantId, auditLogData.tenantId) + && Objects.equals(this.userId, auditLogData.userId); + } + + @Override + public int hashCode() { + return Objects.hash(id, timestamp, createdAt, user, subject, event, tenantId, userId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuditLogData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" user: ").append(toIndentedString(user)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).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, + URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `timestamp` to the URL query string + if (getTimestamp() != null) { + joiner.add( + String.format( + "%stimestamp%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTimestamp()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add( + String.format( + "%screatedAt%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getCreatedAt()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `user` to the URL query string + if (getUser() != null) { + joiner.add( + String.format( + "%suser%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getUser()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `subject` to the URL query string + if (getSubject() != null) { + joiner.add( + String.format( + "%ssubject%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSubject()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `event` to the URL query string + if (getEvent() != null) { + joiner.add( + String.format( + "%sevent%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getEvent()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `tenantId` to the URL query string + if (getTenantId() != null) { + joiner.add( + String.format( + "%stenantId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTenantId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `userId` to the URL query string + if (getUserId() != null) { + joiner.add( + String.format( + "%suserId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getUserId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConfigConversionOperationSnapshot.java b/src/main/java/com/fireblocks/sdk/model/ConfigConversionOperationSnapshot.java new file mode 100644 index 0000000..78ec072 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConfigConversionOperationSnapshot.java @@ -0,0 +1,218 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConfigConversionOperationSnapshot */ +@JsonPropertyOrder({ + ConfigConversionOperationSnapshot.JSON_PROPERTY_OPERATION_ID, + ConfigConversionOperationSnapshot.JSON_PROPERTY_TYPE, + ConfigConversionOperationSnapshot.JSON_PROPERTY_PARAMS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConfigConversionOperationSnapshot { + public static final String JSON_PROPERTY_OPERATION_ID = "operationId"; + private String operationId; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ConversionOperationType type; + + public static final String JSON_PROPERTY_PARAMS = "params"; + private ConversionOperationConfigParams params; + + public ConfigConversionOperationSnapshot() {} + + public ConfigConversionOperationSnapshot operationId(String operationId) { + this.operationId = operationId; + return this; + } + + /** + * Get operationId + * + * @return operationId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOperationId() { + return operationId; + } + + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOperationId(String operationId) { + this.operationId = operationId; + } + + public ConfigConversionOperationSnapshot type(ConversionOperationType type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConversionOperationType getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(ConversionOperationType type) { + this.type = type; + } + + public ConfigConversionOperationSnapshot params(ConversionOperationConfigParams params) { + this.params = params; + return this; + } + + /** + * Get params + * + * @return params + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConversionOperationConfigParams getParams() { + return params; + } + + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setParams(ConversionOperationConfigParams params) { + this.params = params; + } + + /** Return true if this ConfigConversionOperationSnapshot object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConfigConversionOperationSnapshot configConversionOperationSnapshot = + (ConfigConversionOperationSnapshot) o; + return Objects.equals(this.operationId, configConversionOperationSnapshot.operationId) + && Objects.equals(this.type, configConversionOperationSnapshot.type) + && Objects.equals(this.params, configConversionOperationSnapshot.params); + } + + @Override + public int hashCode() { + return Objects.hash(operationId, type, params); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConfigConversionOperationSnapshot {\n"); + sb.append(" operationId: ").append(toIndentedString(operationId)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" params: ").append(toIndentedString(params)).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 `operationId` to the URL query string + if (getOperationId() != null) { + joiner.add( + String.format( + "%soperationId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getOperationId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `params` to the URL query string + if (getParams() != null) { + joiner.add(getParams().toUrlQueryString(prefix + "params" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConfigDisbursementOperationSnapshot.java b/src/main/java/com/fireblocks/sdk/model/ConfigDisbursementOperationSnapshot.java new file mode 100644 index 0000000..7a0fd5f --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConfigDisbursementOperationSnapshot.java @@ -0,0 +1,218 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConfigDisbursementOperationSnapshot */ +@JsonPropertyOrder({ + ConfigDisbursementOperationSnapshot.JSON_PROPERTY_OPERATION_ID, + ConfigDisbursementOperationSnapshot.JSON_PROPERTY_TYPE, + ConfigDisbursementOperationSnapshot.JSON_PROPERTY_PARAMS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConfigDisbursementOperationSnapshot { + public static final String JSON_PROPERTY_OPERATION_ID = "operationId"; + private String operationId; + + public static final String JSON_PROPERTY_TYPE = "type"; + private DisbursementOperationType type; + + public static final String JSON_PROPERTY_PARAMS = "params"; + private DisbursementOperationConfigParams params; + + public ConfigDisbursementOperationSnapshot() {} + + public ConfigDisbursementOperationSnapshot operationId(String operationId) { + this.operationId = operationId; + return this; + } + + /** + * Get operationId + * + * @return operationId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOperationId() { + return operationId; + } + + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOperationId(String operationId) { + this.operationId = operationId; + } + + public ConfigDisbursementOperationSnapshot type(DisbursementOperationType type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DisbursementOperationType getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(DisbursementOperationType type) { + this.type = type; + } + + public ConfigDisbursementOperationSnapshot params(DisbursementOperationConfigParams params) { + this.params = params; + return this; + } + + /** + * Get params + * + * @return params + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DisbursementOperationConfigParams getParams() { + return params; + } + + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setParams(DisbursementOperationConfigParams params) { + this.params = params; + } + + /** Return true if this ConfigDisbursementOperationSnapshot object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConfigDisbursementOperationSnapshot configDisbursementOperationSnapshot = + (ConfigDisbursementOperationSnapshot) o; + return Objects.equals(this.operationId, configDisbursementOperationSnapshot.operationId) + && Objects.equals(this.type, configDisbursementOperationSnapshot.type) + && Objects.equals(this.params, configDisbursementOperationSnapshot.params); + } + + @Override + public int hashCode() { + return Objects.hash(operationId, type, params); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConfigDisbursementOperationSnapshot {\n"); + sb.append(" operationId: ").append(toIndentedString(operationId)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" params: ").append(toIndentedString(params)).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 `operationId` to the URL query string + if (getOperationId() != null) { + joiner.add( + String.format( + "%soperationId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getOperationId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `params` to the URL query string + if (getParams() != null) { + joiner.add(getParams().toUrlQueryString(prefix + "params" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicyCrypto.java b/src/main/java/com/fireblocks/sdk/model/ConfigOperation.java similarity index 56% rename from src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicyCrypto.java rename to src/main/java/com/fireblocks/sdk/model/ConfigOperation.java index f6ee91f..5c1cad7 100644 --- a/src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicyCrypto.java +++ b/src/main/java/com/fireblocks/sdk/model/ConfigOperation.java @@ -37,294 +37,281 @@ import java.util.logging.Logger; @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonDeserialize( - using = - NetworkConnectionRoutingPolicyCrypto - .NetworkConnectionRoutingPolicyCryptoDeserializer.class) -@JsonSerialize( - using = - NetworkConnectionRoutingPolicyCrypto.NetworkConnectionRoutingPolicyCryptoSerializer - .class) -public class NetworkConnectionRoutingPolicyCrypto extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(NetworkConnectionRoutingPolicyCrypto.class.getName()); - - public static class NetworkConnectionRoutingPolicyCryptoSerializer - extends StdSerializer { - public NetworkConnectionRoutingPolicyCryptoSerializer( - Class t) { +@JsonDeserialize(using = ConfigOperation.ConfigOperationDeserializer.class) +@JsonSerialize(using = ConfigOperation.ConfigOperationSerializer.class) +public class ConfigOperation extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(ConfigOperation.class.getName()); + + public static class ConfigOperationSerializer extends StdSerializer { + public ConfigOperationSerializer(Class t) { super(t); } - public NetworkConnectionRoutingPolicyCryptoSerializer() { + public ConfigOperationSerializer() { this(null); } @Override public void serialize( - NetworkConnectionRoutingPolicyCrypto value, - JsonGenerator jgen, - SerializerProvider provider) + ConfigOperation value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { jgen.writeObject(value.getActualInstance()); } } - public static class NetworkConnectionRoutingPolicyCryptoDeserializer - extends StdDeserializer { - public NetworkConnectionRoutingPolicyCryptoDeserializer() { - this(NetworkConnectionRoutingPolicyCrypto.class); + public static class ConfigOperationDeserializer extends StdDeserializer { + public ConfigOperationDeserializer() { + this(ConfigOperation.class); } - public NetworkConnectionRoutingPolicyCryptoDeserializer(Class vc) { + public ConfigOperationDeserializer(Class vc) { super(vc); } @Override - public NetworkConnectionRoutingPolicyCrypto deserialize( - JsonParser jp, DeserializationContext ctxt) + public ConfigOperation 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 CustomCryptoRoutingDest + // deserialize ConversionConfigOperation try { boolean attemptParsing = true; // ensure that we respect type coercion as set on the client ObjectMapper - if (CustomCryptoRoutingDest.class.equals(Integer.class) - || CustomCryptoRoutingDest.class.equals(Long.class) - || CustomCryptoRoutingDest.class.equals(Float.class) - || CustomCryptoRoutingDest.class.equals(Double.class) - || CustomCryptoRoutingDest.class.equals(Boolean.class) - || CustomCryptoRoutingDest.class.equals(String.class)) { + if (ConversionConfigOperation.class.equals(Integer.class) + || ConversionConfigOperation.class.equals(Long.class) + || ConversionConfigOperation.class.equals(Float.class) + || ConversionConfigOperation.class.equals(Double.class) + || ConversionConfigOperation.class.equals(Boolean.class) + || ConversionConfigOperation.class.equals(String.class)) { attemptParsing = typeCoercion; if (!attemptParsing) { attemptParsing |= - ((CustomCryptoRoutingDest.class.equals(Integer.class) - || CustomCryptoRoutingDest.class.equals(Long.class)) + ((ConversionConfigOperation.class.equals(Integer.class) + || ConversionConfigOperation.class.equals( + Long.class)) && token == JsonToken.VALUE_NUMBER_INT); attemptParsing |= - ((CustomCryptoRoutingDest.class.equals(Float.class) - || CustomCryptoRoutingDest.class.equals( + ((ConversionConfigOperation.class.equals(Float.class) + || ConversionConfigOperation.class.equals( Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); attemptParsing |= - (CustomCryptoRoutingDest.class.equals(Boolean.class) + (ConversionConfigOperation.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); attemptParsing |= - (CustomCryptoRoutingDest.class.equals(String.class) + (ConversionConfigOperation.class.equals(String.class) && token == JsonToken.VALUE_STRING); } } if (attemptParsing) { deserialized = - tree.traverse(jp.getCodec()).readValueAs(CustomCryptoRoutingDest.class); + tree.traverse(jp.getCodec()) + .readValueAs(ConversionConfigOperation.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 'CustomCryptoRoutingDest'"); + log.log(Level.FINER, "Input data matches schema 'ConversionConfigOperation'"); } } catch (Exception e) { // deserialization failed, continue log.log( Level.FINER, - "Input data does not match schema 'CustomCryptoRoutingDest'", + "Input data does not match schema 'ConversionConfigOperation'", e); } - // deserialize DefaultNetworkRoutingDest + // deserialize DisbursementConfigOperation try { boolean attemptParsing = true; // ensure that we respect type coercion as set on the client ObjectMapper - if (DefaultNetworkRoutingDest.class.equals(Integer.class) - || DefaultNetworkRoutingDest.class.equals(Long.class) - || DefaultNetworkRoutingDest.class.equals(Float.class) - || DefaultNetworkRoutingDest.class.equals(Double.class) - || DefaultNetworkRoutingDest.class.equals(Boolean.class) - || DefaultNetworkRoutingDest.class.equals(String.class)) { + if (DisbursementConfigOperation.class.equals(Integer.class) + || DisbursementConfigOperation.class.equals(Long.class) + || DisbursementConfigOperation.class.equals(Float.class) + || DisbursementConfigOperation.class.equals(Double.class) + || DisbursementConfigOperation.class.equals(Boolean.class) + || DisbursementConfigOperation.class.equals(String.class)) { attemptParsing = typeCoercion; if (!attemptParsing) { attemptParsing |= - ((DefaultNetworkRoutingDest.class.equals(Integer.class) - || DefaultNetworkRoutingDest.class.equals( + ((DisbursementConfigOperation.class.equals(Integer.class) + || DisbursementConfigOperation.class.equals( Long.class)) && token == JsonToken.VALUE_NUMBER_INT); attemptParsing |= - ((DefaultNetworkRoutingDest.class.equals(Float.class) - || DefaultNetworkRoutingDest.class.equals( + ((DisbursementConfigOperation.class.equals(Float.class) + || DisbursementConfigOperation.class.equals( Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); attemptParsing |= - (DefaultNetworkRoutingDest.class.equals(Boolean.class) + (DisbursementConfigOperation.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); attemptParsing |= - (DefaultNetworkRoutingDest.class.equals(String.class) + (DisbursementConfigOperation.class.equals(String.class) && token == JsonToken.VALUE_STRING); } } if (attemptParsing) { deserialized = tree.traverse(jp.getCodec()) - .readValueAs(DefaultNetworkRoutingDest.class); + .readValueAs(DisbursementConfigOperation.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 'DefaultNetworkRoutingDest'"); + log.log(Level.FINER, "Input data matches schema 'DisbursementConfigOperation'"); } } catch (Exception e) { // deserialization failed, continue log.log( Level.FINER, - "Input data does not match schema 'DefaultNetworkRoutingDest'", + "Input data does not match schema 'DisbursementConfigOperation'", e); } - // deserialize NoneNetworkRoutingDest + // deserialize TransferConfigOperation try { boolean attemptParsing = true; // ensure that we respect type coercion as set on the client ObjectMapper - if (NoneNetworkRoutingDest.class.equals(Integer.class) - || NoneNetworkRoutingDest.class.equals(Long.class) - || NoneNetworkRoutingDest.class.equals(Float.class) - || NoneNetworkRoutingDest.class.equals(Double.class) - || NoneNetworkRoutingDest.class.equals(Boolean.class) - || NoneNetworkRoutingDest.class.equals(String.class)) { + if (TransferConfigOperation.class.equals(Integer.class) + || TransferConfigOperation.class.equals(Long.class) + || TransferConfigOperation.class.equals(Float.class) + || TransferConfigOperation.class.equals(Double.class) + || TransferConfigOperation.class.equals(Boolean.class) + || TransferConfigOperation.class.equals(String.class)) { attemptParsing = typeCoercion; if (!attemptParsing) { attemptParsing |= - ((NoneNetworkRoutingDest.class.equals(Integer.class) - || NoneNetworkRoutingDest.class.equals(Long.class)) + ((TransferConfigOperation.class.equals(Integer.class) + || TransferConfigOperation.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); attemptParsing |= - ((NoneNetworkRoutingDest.class.equals(Float.class) - || NoneNetworkRoutingDest.class.equals( + ((TransferConfigOperation.class.equals(Float.class) + || TransferConfigOperation.class.equals( Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); attemptParsing |= - (NoneNetworkRoutingDest.class.equals(Boolean.class) + (TransferConfigOperation.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); attemptParsing |= - (NoneNetworkRoutingDest.class.equals(String.class) + (TransferConfigOperation.class.equals(String.class) && token == JsonToken.VALUE_STRING); } } if (attemptParsing) { deserialized = - tree.traverse(jp.getCodec()).readValueAs(NoneNetworkRoutingDest.class); + tree.traverse(jp.getCodec()).readValueAs(TransferConfigOperation.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 'NoneNetworkRoutingDest'"); + log.log(Level.FINER, "Input data matches schema 'TransferConfigOperation'"); } } catch (Exception e) { // deserialization failed, continue log.log( Level.FINER, - "Input data does not match schema 'NoneNetworkRoutingDest'", + "Input data does not match schema 'TransferConfigOperation'", e); } if (match == 1) { - NetworkConnectionRoutingPolicyCrypto ret = - new NetworkConnectionRoutingPolicyCrypto(); + ConfigOperation ret = new ConfigOperation(); ret.setActualInstance(deserialized); return ret; } throw new IOException( String.format( - "Failed deserialization for NetworkConnectionRoutingPolicyCrypto: %d" - + " classes match result, expected 1", + "Failed deserialization for ConfigOperation: %d classes match result," + + " expected 1", match)); } /** Handle deserialization of the 'null' value. */ @Override - public NetworkConnectionRoutingPolicyCrypto getNullValue(DeserializationContext ctxt) + public ConfigOperation getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "NetworkConnectionRoutingPolicyCrypto cannot be null"); + throw new JsonMappingException(ctxt.getParser(), "ConfigOperation cannot be null"); } } // store a list of schema names defined in oneOf public static final Map> schemas = new HashMap<>(); - public NetworkConnectionRoutingPolicyCrypto() { + public ConfigOperation() { super("oneOf", Boolean.FALSE); } - public NetworkConnectionRoutingPolicyCrypto(CustomCryptoRoutingDest o) { + public ConfigOperation(ConversionConfigOperation o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } - public NetworkConnectionRoutingPolicyCrypto(DefaultNetworkRoutingDest o) { + public ConfigOperation(DisbursementConfigOperation o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } - public NetworkConnectionRoutingPolicyCrypto(NoneNetworkRoutingDest o) { + public ConfigOperation(TransferConfigOperation o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } static { - schemas.put("CustomCryptoRoutingDest", CustomCryptoRoutingDest.class); - schemas.put("DefaultNetworkRoutingDest", DefaultNetworkRoutingDest.class); - schemas.put("NoneNetworkRoutingDest", NoneNetworkRoutingDest.class); - JSON.registerDescendants( - NetworkConnectionRoutingPolicyCrypto.class, Collections.unmodifiableMap(schemas)); + schemas.put("ConversionConfigOperation", ConversionConfigOperation.class); + schemas.put("DisbursementConfigOperation", DisbursementConfigOperation.class); + schemas.put("TransferConfigOperation", TransferConfigOperation.class); + JSON.registerDescendants(ConfigOperation.class, Collections.unmodifiableMap(schemas)); } @Override public Map> getSchemas() { - return NetworkConnectionRoutingPolicyCrypto.schemas; + return ConfigOperation.schemas; } /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: CustomCryptoRoutingDest, DefaultNetworkRoutingDest, - * NoneNetworkRoutingDest + * against the oneOf child schemas: ConversionConfigOperation, DisbursementConfigOperation, + * TransferConfigOperation * *

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(CustomCryptoRoutingDest.class, instance, new HashSet>())) { + if (JSON.isInstanceOf(ConversionConfigOperation.class, instance, new HashSet>())) { super.setActualInstance(instance); return; } - if (JSON.isInstanceOf(DefaultNetworkRoutingDest.class, instance, new HashSet>())) { + if (JSON.isInstanceOf( + DisbursementConfigOperation.class, instance, new HashSet>())) { super.setActualInstance(instance); return; } - if (JSON.isInstanceOf(NoneNetworkRoutingDest.class, instance, new HashSet>())) { + if (JSON.isInstanceOf(TransferConfigOperation.class, instance, new HashSet>())) { super.setActualInstance(instance); return; } throw new RuntimeException( - "Invalid instance type. Must be CustomCryptoRoutingDest, DefaultNetworkRoutingDest," - + " NoneNetworkRoutingDest"); + "Invalid instance type. Must be ConversionConfigOperation," + + " DisbursementConfigOperation, TransferConfigOperation"); } /** - * Get the actual instance, which can be the following: CustomCryptoRoutingDest, - * DefaultNetworkRoutingDest, NoneNetworkRoutingDest + * Get the actual instance, which can be the following: ConversionConfigOperation, + * DisbursementConfigOperation, TransferConfigOperation * - * @return The actual instance (CustomCryptoRoutingDest, DefaultNetworkRoutingDest, - * NoneNetworkRoutingDest) + * @return The actual instance (ConversionConfigOperation, DisbursementConfigOperation, + * TransferConfigOperation) */ @Override public Object getActualInstance() { @@ -332,36 +319,36 @@ public Object getActualInstance() { } /** - * Get the actual instance of `CustomCryptoRoutingDest`. If the actual instance is not - * `CustomCryptoRoutingDest`, the ClassCastException will be thrown. + * Get the actual instance of `ConversionConfigOperation`. If the actual instance is not + * `ConversionConfigOperation`, the ClassCastException will be thrown. * - * @return The actual instance of `CustomCryptoRoutingDest` - * @throws ClassCastException if the instance is not `CustomCryptoRoutingDest` + * @return The actual instance of `ConversionConfigOperation` + * @throws ClassCastException if the instance is not `ConversionConfigOperation` */ - public CustomCryptoRoutingDest getCustomCryptoRoutingDest() throws ClassCastException { - return (CustomCryptoRoutingDest) super.getActualInstance(); + public ConversionConfigOperation getConversionConfigOperation() throws ClassCastException { + return (ConversionConfigOperation) super.getActualInstance(); } /** - * Get the actual instance of `DefaultNetworkRoutingDest`. If the actual instance is not - * `DefaultNetworkRoutingDest`, the ClassCastException will be thrown. + * Get the actual instance of `DisbursementConfigOperation`. If the actual instance is not + * `DisbursementConfigOperation`, the ClassCastException will be thrown. * - * @return The actual instance of `DefaultNetworkRoutingDest` - * @throws ClassCastException if the instance is not `DefaultNetworkRoutingDest` + * @return The actual instance of `DisbursementConfigOperation` + * @throws ClassCastException if the instance is not `DisbursementConfigOperation` */ - public DefaultNetworkRoutingDest getDefaultNetworkRoutingDest() throws ClassCastException { - return (DefaultNetworkRoutingDest) super.getActualInstance(); + public DisbursementConfigOperation getDisbursementConfigOperation() throws ClassCastException { + return (DisbursementConfigOperation) super.getActualInstance(); } /** - * Get the actual instance of `NoneNetworkRoutingDest`. If the actual instance is not - * `NoneNetworkRoutingDest`, the ClassCastException will be thrown. + * Get the actual instance of `TransferConfigOperation`. If the actual instance is not + * `TransferConfigOperation`, the ClassCastException will be thrown. * - * @return The actual instance of `NoneNetworkRoutingDest` - * @throws ClassCastException if the instance is not `NoneNetworkRoutingDest` + * @return The actual instance of `TransferConfigOperation` + * @throws ClassCastException if the instance is not `TransferConfigOperation` */ - public NoneNetworkRoutingDest getNoneNetworkRoutingDest() throws ClassCastException { - return (NoneNetworkRoutingDest) super.getActualInstance(); + public TransferConfigOperation getTransferConfigOperation() throws ClassCastException { + return (TransferConfigOperation) super.getActualInstance(); } /** @@ -396,26 +383,26 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - if (getActualInstance() instanceof CustomCryptoRoutingDest) { + if (getActualInstance() instanceof ConversionConfigOperation) { if (getActualInstance() != null) { joiner.add( - ((CustomCryptoRoutingDest) getActualInstance()) + ((ConversionConfigOperation) getActualInstance()) .toUrlQueryString(prefix + "one_of_0" + suffix)); } return joiner.toString(); } - if (getActualInstance() instanceof DefaultNetworkRoutingDest) { + if (getActualInstance() instanceof TransferConfigOperation) { if (getActualInstance() != null) { joiner.add( - ((DefaultNetworkRoutingDest) getActualInstance()) + ((TransferConfigOperation) getActualInstance()) .toUrlQueryString(prefix + "one_of_1" + suffix)); } return joiner.toString(); } - if (getActualInstance() instanceof NoneNetworkRoutingDest) { + if (getActualInstance() instanceof DisbursementConfigOperation) { if (getActualInstance() != null) { joiner.add( - ((NoneNetworkRoutingDest) getActualInstance()) + ((DisbursementConfigOperation) getActualInstance()) .toUrlQueryString(prefix + "one_of_2" + suffix)); } return joiner.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/ConfigOperationSnapshot.java b/src/main/java/com/fireblocks/sdk/model/ConfigOperationSnapshot.java new file mode 100644 index 0000000..e439da4 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConfigOperationSnapshot.java @@ -0,0 +1,430 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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") +@JsonDeserialize(using = ConfigOperationSnapshot.ConfigOperationSnapshotDeserializer.class) +@JsonSerialize(using = ConfigOperationSnapshot.ConfigOperationSnapshotSerializer.class) +public class ConfigOperationSnapshot extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(ConfigOperationSnapshot.class.getName()); + + public static class ConfigOperationSnapshotSerializer + extends StdSerializer { + public ConfigOperationSnapshotSerializer(Class t) { + super(t); + } + + public ConfigOperationSnapshotSerializer() { + this(null); + } + + @Override + public void serialize( + ConfigOperationSnapshot value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class ConfigOperationSnapshotDeserializer + extends StdDeserializer { + public ConfigOperationSnapshotDeserializer() { + this(ConfigOperationSnapshot.class); + } + + public ConfigOperationSnapshotDeserializer(Class vc) { + super(vc); + } + + @Override + public ConfigOperationSnapshot 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 ConfigConversionOperationSnapshot + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ConfigConversionOperationSnapshot.class.equals(Integer.class) + || ConfigConversionOperationSnapshot.class.equals(Long.class) + || ConfigConversionOperationSnapshot.class.equals(Float.class) + || ConfigConversionOperationSnapshot.class.equals(Double.class) + || ConfigConversionOperationSnapshot.class.equals(Boolean.class) + || ConfigConversionOperationSnapshot.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ConfigConversionOperationSnapshot.class.equals(Integer.class) + || ConfigConversionOperationSnapshot.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ConfigConversionOperationSnapshot.class.equals(Float.class) + || ConfigConversionOperationSnapshot.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (ConfigConversionOperationSnapshot.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ConfigConversionOperationSnapshot.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(ConfigConversionOperationSnapshot.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 'ConfigConversionOperationSnapshot'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'ConfigConversionOperationSnapshot'", + e); + } + + // deserialize ConfigDisbursementOperationSnapshot + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ConfigDisbursementOperationSnapshot.class.equals(Integer.class) + || ConfigDisbursementOperationSnapshot.class.equals(Long.class) + || ConfigDisbursementOperationSnapshot.class.equals(Float.class) + || ConfigDisbursementOperationSnapshot.class.equals(Double.class) + || ConfigDisbursementOperationSnapshot.class.equals(Boolean.class) + || ConfigDisbursementOperationSnapshot.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ConfigDisbursementOperationSnapshot.class.equals(Integer.class) + || ConfigDisbursementOperationSnapshot.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ConfigDisbursementOperationSnapshot.class.equals(Float.class) + || ConfigDisbursementOperationSnapshot.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (ConfigDisbursementOperationSnapshot.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ConfigDisbursementOperationSnapshot.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(ConfigDisbursementOperationSnapshot.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 'ConfigDisbursementOperationSnapshot'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'ConfigDisbursementOperationSnapshot'", + e); + } + + // deserialize ConfigTransferOperationSnapshot + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ConfigTransferOperationSnapshot.class.equals(Integer.class) + || ConfigTransferOperationSnapshot.class.equals(Long.class) + || ConfigTransferOperationSnapshot.class.equals(Float.class) + || ConfigTransferOperationSnapshot.class.equals(Double.class) + || ConfigTransferOperationSnapshot.class.equals(Boolean.class) + || ConfigTransferOperationSnapshot.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ConfigTransferOperationSnapshot.class.equals(Integer.class) + || ConfigTransferOperationSnapshot.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ConfigTransferOperationSnapshot.class.equals(Float.class) + || ConfigTransferOperationSnapshot.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (ConfigTransferOperationSnapshot.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ConfigTransferOperationSnapshot.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(ConfigTransferOperationSnapshot.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 'ConfigTransferOperationSnapshot'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'ConfigTransferOperationSnapshot'", + e); + } + + if (match == 1) { + ConfigOperationSnapshot ret = new ConfigOperationSnapshot(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for ConfigOperationSnapshot: %d classes match" + + " result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public ConfigOperationSnapshot getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "ConfigOperationSnapshot cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public ConfigOperationSnapshot() { + super("oneOf", Boolean.FALSE); + } + + public ConfigOperationSnapshot(ConfigConversionOperationSnapshot o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public ConfigOperationSnapshot(ConfigDisbursementOperationSnapshot o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public ConfigOperationSnapshot(ConfigTransferOperationSnapshot o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("ConfigConversionOperationSnapshot", ConfigConversionOperationSnapshot.class); + schemas.put( + "ConfigDisbursementOperationSnapshot", ConfigDisbursementOperationSnapshot.class); + schemas.put("ConfigTransferOperationSnapshot", ConfigTransferOperationSnapshot.class); + JSON.registerDescendants( + ConfigOperationSnapshot.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return ConfigOperationSnapshot.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: ConfigConversionOperationSnapshot, + * ConfigDisbursementOperationSnapshot, ConfigTransferOperationSnapshot + * + *

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( + ConfigConversionOperationSnapshot.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + ConfigDisbursementOperationSnapshot.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + ConfigTransferOperationSnapshot.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be ConfigConversionOperationSnapshot," + + " ConfigDisbursementOperationSnapshot, ConfigTransferOperationSnapshot"); + } + + /** + * Get the actual instance, which can be the following: ConfigConversionOperationSnapshot, + * ConfigDisbursementOperationSnapshot, ConfigTransferOperationSnapshot + * + * @return The actual instance (ConfigConversionOperationSnapshot, + * ConfigDisbursementOperationSnapshot, ConfigTransferOperationSnapshot) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `ConfigConversionOperationSnapshot`. If the actual instance is not + * `ConfigConversionOperationSnapshot`, the ClassCastException will be thrown. + * + * @return The actual instance of `ConfigConversionOperationSnapshot` + * @throws ClassCastException if the instance is not `ConfigConversionOperationSnapshot` + */ + public ConfigConversionOperationSnapshot getConfigConversionOperationSnapshot() + throws ClassCastException { + return (ConfigConversionOperationSnapshot) super.getActualInstance(); + } + + /** + * Get the actual instance of `ConfigDisbursementOperationSnapshot`. If the actual instance is + * not `ConfigDisbursementOperationSnapshot`, the ClassCastException will be thrown. + * + * @return The actual instance of `ConfigDisbursementOperationSnapshot` + * @throws ClassCastException if the instance is not `ConfigDisbursementOperationSnapshot` + */ + public ConfigDisbursementOperationSnapshot getConfigDisbursementOperationSnapshot() + throws ClassCastException { + return (ConfigDisbursementOperationSnapshot) super.getActualInstance(); + } + + /** + * Get the actual instance of `ConfigTransferOperationSnapshot`. If the actual instance is not + * `ConfigTransferOperationSnapshot`, the ClassCastException will be thrown. + * + * @return The actual instance of `ConfigTransferOperationSnapshot` + * @throws ClassCastException if the instance is not `ConfigTransferOperationSnapshot` + */ + public ConfigTransferOperationSnapshot getConfigTransferOperationSnapshot() + throws ClassCastException { + return (ConfigTransferOperationSnapshot) 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 ConfigConversionOperationSnapshot) { + if (getActualInstance() != null) { + joiner.add( + ((ConfigConversionOperationSnapshot) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ConfigTransferOperationSnapshot) { + if (getActualInstance() != null) { + joiner.add( + ((ConfigTransferOperationSnapshot) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ConfigDisbursementOperationSnapshot) { + if (getActualInstance() != null) { + joiner.add( + ((ConfigDisbursementOperationSnapshot) getActualInstance()) + .toUrlQueryString(prefix + "one_of_2" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConfigOperationStatus.java b/src/main/java/com/fireblocks/sdk/model/ConfigOperationStatus.java new file mode 100644 index 0000000..ded5894 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConfigOperationStatus.java @@ -0,0 +1,68 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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; + +/** Gets or Sets ConfigOperationStatus */ +public enum ConfigOperationStatus { + PENDING("PENDING"), + + VALIDATION_IN_PROGRESS("VALIDATION_IN_PROGRESS"), + + READY_FOR_EXECUTION("READY_FOR_EXECUTION"), + + VALIDATION_FAILED("VALIDATION_FAILED"); + + private String value; + + ConfigOperationStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ConfigOperationStatus fromValue(String value) { + for (ConfigOperationStatus b : ConfigOperationStatus.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/ConfigTransferOperationSnapshot.java b/src/main/java/com/fireblocks/sdk/model/ConfigTransferOperationSnapshot.java new file mode 100644 index 0000000..6c3fcb2 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConfigTransferOperationSnapshot.java @@ -0,0 +1,218 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConfigTransferOperationSnapshot */ +@JsonPropertyOrder({ + ConfigTransferOperationSnapshot.JSON_PROPERTY_OPERATION_ID, + ConfigTransferOperationSnapshot.JSON_PROPERTY_TYPE, + ConfigTransferOperationSnapshot.JSON_PROPERTY_PARAMS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConfigTransferOperationSnapshot { + public static final String JSON_PROPERTY_OPERATION_ID = "operationId"; + private String operationId; + + public static final String JSON_PROPERTY_TYPE = "type"; + private TransferOperationType type; + + public static final String JSON_PROPERTY_PARAMS = "params"; + private TransferOperationConfigParams params; + + public ConfigTransferOperationSnapshot() {} + + public ConfigTransferOperationSnapshot operationId(String operationId) { + this.operationId = operationId; + return this; + } + + /** + * Get operationId + * + * @return operationId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOperationId() { + return operationId; + } + + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOperationId(String operationId) { + this.operationId = operationId; + } + + public ConfigTransferOperationSnapshot type(TransferOperationType type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TransferOperationType getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TransferOperationType type) { + this.type = type; + } + + public ConfigTransferOperationSnapshot params(TransferOperationConfigParams params) { + this.params = params; + return this; + } + + /** + * Get params + * + * @return params + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TransferOperationConfigParams getParams() { + return params; + } + + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setParams(TransferOperationConfigParams params) { + this.params = params; + } + + /** Return true if this ConfigTransferOperationSnapshot object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConfigTransferOperationSnapshot configTransferOperationSnapshot = + (ConfigTransferOperationSnapshot) o; + return Objects.equals(this.operationId, configTransferOperationSnapshot.operationId) + && Objects.equals(this.type, configTransferOperationSnapshot.type) + && Objects.equals(this.params, configTransferOperationSnapshot.params); + } + + @Override + public int hashCode() { + return Objects.hash(operationId, type, params); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConfigTransferOperationSnapshot {\n"); + sb.append(" operationId: ").append(toIndentedString(operationId)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" params: ").append(toIndentedString(params)).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 `operationId` to the URL query string + if (getOperationId() != null) { + joiner.add( + String.format( + "%soperationId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getOperationId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `params` to the URL query string + if (getParams() != null) { + joiner.add(getParams().toUrlQueryString(prefix + "params" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConsoleUser.java b/src/main/java/com/fireblocks/sdk/model/ConsoleUser.java new file mode 100644 index 0000000..7eab1eb --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConsoleUser.java @@ -0,0 +1,422 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConsoleUser */ +@JsonPropertyOrder({ + ConsoleUser.JSON_PROPERTY_ID, + ConsoleUser.JSON_PROPERTY_FIRST_NAME, + ConsoleUser.JSON_PROPERTY_LAST_NAME, + ConsoleUser.JSON_PROPERTY_EMAIL, + ConsoleUser.JSON_PROPERTY_ROLE, + ConsoleUser.JSON_PROPERTY_ENABLED, + ConsoleUser.JSON_PROPERTY_STATUS, + ConsoleUser.JSON_PROPERTY_USER_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConsoleUser { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_FIRST_NAME = "firstName"; + private String firstName; + + public static final String JSON_PROPERTY_LAST_NAME = "lastName"; + private String lastName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_ROLE = "role"; + private UserRole role; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_STATUS = "status"; + private UserStatus status; + + public static final String JSON_PROPERTY_USER_TYPE = "userType"; + private UserType userType; + + public ConsoleUser() {} + + public ConsoleUser id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the user + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + public ConsoleUser firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * The first name of the user + * + * @return firstName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIRST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFirstName() { + return firstName; + } + + @JsonProperty(JSON_PROPERTY_FIRST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public ConsoleUser lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * The last name of the user + * + * @return lastName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLastName() { + return lastName; + } + + @JsonProperty(JSON_PROPERTY_LAST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public ConsoleUser email(String email) { + this.email = email; + return this; + } + + /** + * The email address of the user + * + * @return email + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { + return email; + } + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + public ConsoleUser role(UserRole role) { + this.role = role; + return this; + } + + /** + * Get role + * + * @return role + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UserRole getRole() { + return role; + } + + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRole(UserRole role) { + this.role = role; + } + + public ConsoleUser enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the user is enabled + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public ConsoleUser status(UserStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UserStatus getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(UserStatus status) { + this.status = status; + } + + public ConsoleUser userType(UserType userType) { + this.userType = userType; + return this; + } + + /** + * Get userType + * + * @return userType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UserType getUserType() { + return userType; + } + + @JsonProperty(JSON_PROPERTY_USER_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUserType(UserType userType) { + this.userType = userType; + } + + /** Return true if this ConsoleUser object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConsoleUser consoleUser = (ConsoleUser) o; + return Objects.equals(this.id, consoleUser.id) + && Objects.equals(this.firstName, consoleUser.firstName) + && Objects.equals(this.lastName, consoleUser.lastName) + && Objects.equals(this.email, consoleUser.email) + && Objects.equals(this.role, consoleUser.role) + && Objects.equals(this.enabled, consoleUser.enabled) + && Objects.equals(this.status, consoleUser.status) + && Objects.equals(this.userType, consoleUser.userType); + } + + @Override + public int hashCode() { + return Objects.hash(id, firstName, lastName, email, role, enabled, status, userType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConsoleUser {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" userType: ").append(toIndentedString(userType)).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, + URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `firstName` to the URL query string + if (getFirstName() != null) { + joiner.add( + String.format( + "%sfirstName%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getFirstName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `lastName` to the URL query string + if (getLastName() != null) { + joiner.add( + String.format( + "%slastName%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getLastName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add( + String.format( + "%semail%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `role` to the URL query string + if (getRole() != null) { + joiner.add( + String.format( + "%srole%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getRole()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `enabled` to the URL query string + if (getEnabled() != null) { + joiner.add( + String.format( + "%senabled%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getEnabled()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `userType` to the URL query string + if (getUserType() != null) { + joiner.add( + String.format( + "%suserType%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getUserType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConversionConfigOperation.java b/src/main/java/com/fireblocks/sdk/model/ConversionConfigOperation.java new file mode 100644 index 0000000..ec4d43e --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConversionConfigOperation.java @@ -0,0 +1,296 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConversionConfigOperation */ +@JsonPropertyOrder({ + ConversionConfigOperation.JSON_PROPERTY_OPERATION_ID, + ConversionConfigOperation.JSON_PROPERTY_TYPE, + ConversionConfigOperation.JSON_PROPERTY_PARAMS, + ConversionConfigOperation.JSON_PROPERTY_STATUS, + ConversionConfigOperation.JSON_PROPERTY_VALIDATION_FAILURE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConversionConfigOperation { + public static final String JSON_PROPERTY_OPERATION_ID = "operationId"; + private String operationId; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ConversionOperationType type; + + public static final String JSON_PROPERTY_PARAMS = "params"; + private ConversionOperationConfigParams params; + + public static final String JSON_PROPERTY_STATUS = "status"; + private ConfigOperationStatus status; + + public static final String JSON_PROPERTY_VALIDATION_FAILURE = "validationFailure"; + private ConversionValidationFailure validationFailure; + + public ConversionConfigOperation() {} + + public ConversionConfigOperation operationId(String operationId) { + this.operationId = operationId; + return this; + } + + /** + * Get operationId + * + * @return operationId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOperationId() { + return operationId; + } + + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOperationId(String operationId) { + this.operationId = operationId; + } + + public ConversionConfigOperation type(ConversionOperationType type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConversionOperationType getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(ConversionOperationType type) { + this.type = type; + } + + public ConversionConfigOperation params(ConversionOperationConfigParams params) { + this.params = params; + return this; + } + + /** + * Get params + * + * @return params + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConversionOperationConfigParams getParams() { + return params; + } + + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setParams(ConversionOperationConfigParams params) { + this.params = params; + } + + public ConversionConfigOperation status(ConfigOperationStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConfigOperationStatus getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(ConfigOperationStatus status) { + this.status = status; + } + + public ConversionConfigOperation validationFailure( + ConversionValidationFailure validationFailure) { + this.validationFailure = validationFailure; + return this; + } + + /** + * Get validationFailure + * + * @return validationFailure + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALIDATION_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ConversionValidationFailure getValidationFailure() { + return validationFailure; + } + + @JsonProperty(JSON_PROPERTY_VALIDATION_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValidationFailure(ConversionValidationFailure validationFailure) { + this.validationFailure = validationFailure; + } + + /** Return true if this ConversionConfigOperation object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConversionConfigOperation conversionConfigOperation = (ConversionConfigOperation) o; + return Objects.equals(this.operationId, conversionConfigOperation.operationId) + && Objects.equals(this.type, conversionConfigOperation.type) + && Objects.equals(this.params, conversionConfigOperation.params) + && Objects.equals(this.status, conversionConfigOperation.status) + && Objects.equals( + this.validationFailure, conversionConfigOperation.validationFailure); + } + + @Override + public int hashCode() { + return Objects.hash(operationId, type, params, status, validationFailure); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConversionConfigOperation {\n"); + sb.append(" operationId: ").append(toIndentedString(operationId)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" params: ").append(toIndentedString(params)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" validationFailure: ") + .append(toIndentedString(validationFailure)) + .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 `operationId` to the URL query string + if (getOperationId() != null) { + joiner.add( + String.format( + "%soperationId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getOperationId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `params` to the URL query string + if (getParams() != null) { + joiner.add(getParams().toUrlQueryString(prefix + "params" + suffix)); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `validationFailure` to the URL query string + if (getValidationFailure() != null) { + joiner.add( + getValidationFailure().toUrlQueryString(prefix + "validationFailure" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConversionOperationConfigParams.java b/src/main/java/com/fireblocks/sdk/model/ConversionOperationConfigParams.java new file mode 100644 index 0000000..44c1882 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConversionOperationConfigParams.java @@ -0,0 +1,312 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConversionOperationConfigParams */ +@JsonPropertyOrder({ + ConversionOperationConfigParams.JSON_PROPERTY_AMOUNT, + ConversionOperationConfigParams.JSON_PROPERTY_ACCOUNT_ID, + ConversionOperationConfigParams.JSON_PROPERTY_SRC_ASSET_ID, + ConversionOperationConfigParams.JSON_PROPERTY_DEST_ASSET_ID, + ConversionOperationConfigParams.JSON_PROPERTY_SLIPPAGE_BASIS_POINTS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConversionOperationConfigParams { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private String amount; + + public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; + private String accountId; + + public static final String JSON_PROPERTY_SRC_ASSET_ID = "srcAssetId"; + private String srcAssetId; + + public static final String JSON_PROPERTY_DEST_ASSET_ID = "destAssetId"; + private String destAssetId; + + public static final String JSON_PROPERTY_SLIPPAGE_BASIS_POINTS = "slippageBasisPoints"; + private Integer slippageBasisPoints; + + public ConversionOperationConfigParams() {} + + public ConversionOperationConfigParams amount(String amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * + * @return amount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAmount(String amount) { + this.amount = amount; + } + + public ConversionOperationConfigParams accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get accountId + * + * @return accountId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAccountId() { + return accountId; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + public ConversionOperationConfigParams srcAssetId(String srcAssetId) { + this.srcAssetId = srcAssetId; + return this; + } + + /** + * Get srcAssetId + * + * @return srcAssetId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SRC_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSrcAssetId() { + return srcAssetId; + } + + @JsonProperty(JSON_PROPERTY_SRC_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSrcAssetId(String srcAssetId) { + this.srcAssetId = srcAssetId; + } + + public ConversionOperationConfigParams destAssetId(String destAssetId) { + this.destAssetId = destAssetId; + return this; + } + + /** + * Get destAssetId + * + * @return destAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DEST_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDestAssetId() { + return destAssetId; + } + + @JsonProperty(JSON_PROPERTY_DEST_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDestAssetId(String destAssetId) { + this.destAssetId = destAssetId; + } + + public ConversionOperationConfigParams slippageBasisPoints(Integer slippageBasisPoints) { + this.slippageBasisPoints = slippageBasisPoints; + return this; + } + + /** + * Get slippageBasisPoints minimum: 0 maximum: 10000 + * + * @return slippageBasisPoints + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SLIPPAGE_BASIS_POINTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getSlippageBasisPoints() { + return slippageBasisPoints; + } + + @JsonProperty(JSON_PROPERTY_SLIPPAGE_BASIS_POINTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSlippageBasisPoints(Integer slippageBasisPoints) { + this.slippageBasisPoints = slippageBasisPoints; + } + + /** Return true if this ConversionOperationConfigParams object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConversionOperationConfigParams conversionOperationConfigParams = + (ConversionOperationConfigParams) o; + return Objects.equals(this.amount, conversionOperationConfigParams.amount) + && Objects.equals(this.accountId, conversionOperationConfigParams.accountId) + && Objects.equals(this.srcAssetId, conversionOperationConfigParams.srcAssetId) + && Objects.equals(this.destAssetId, conversionOperationConfigParams.destAssetId) + && Objects.equals( + this.slippageBasisPoints, + conversionOperationConfigParams.slippageBasisPoints); + } + + @Override + public int hashCode() { + return Objects.hash(amount, accountId, srcAssetId, destAssetId, slippageBasisPoints); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConversionOperationConfigParams {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" srcAssetId: ").append(toIndentedString(srcAssetId)).append("\n"); + sb.append(" destAssetId: ").append(toIndentedString(destAssetId)).append("\n"); + sb.append(" slippageBasisPoints: ") + .append(toIndentedString(slippageBasisPoints)) + .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 `amount` to the URL query string + if (getAmount() != null) { + joiner.add( + String.format( + "%samount%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `accountId` to the URL query string + if (getAccountId() != null) { + joiner.add( + String.format( + "%saccountId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getAccountId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `srcAssetId` to the URL query string + if (getSrcAssetId() != null) { + joiner.add( + String.format( + "%ssrcAssetId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getSrcAssetId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `destAssetId` to the URL query string + if (getDestAssetId() != null) { + joiner.add( + String.format( + "%sdestAssetId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDestAssetId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `slippageBasisPoints` to the URL query string + if (getSlippageBasisPoints() != null) { + joiner.add( + String.format( + "%sslippageBasisPoints%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getSlippageBasisPoints()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConversionOperationExecution.java b/src/main/java/com/fireblocks/sdk/model/ConversionOperationExecution.java new file mode 100644 index 0000000..08c6eab --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConversionOperationExecution.java @@ -0,0 +1,287 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConversionOperationExecution */ +@JsonPropertyOrder({ + ConversionOperationExecution.JSON_PROPERTY_INPUT, + ConversionOperationExecution.JSON_PROPERTY_OUTPUT, + ConversionOperationExecution.JSON_PROPERTY_STARTED_AT, + ConversionOperationExecution.JSON_PROPERTY_FINISHED_AT, + ConversionOperationExecution.JSON_PROPERTY_FAILURE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConversionOperationExecution { + public static final String JSON_PROPERTY_INPUT = "input"; + private ConversionOperationConfigParams input; + + public static final String JSON_PROPERTY_OUTPUT = "output"; + private ConversionOperationExecutionOutput output; + + public static final String JSON_PROPERTY_STARTED_AT = "startedAt"; + private BigDecimal startedAt; + + public static final String JSON_PROPERTY_FINISHED_AT = "finishedAt"; + private BigDecimal finishedAt; + + public static final String JSON_PROPERTY_FAILURE = "failure"; + private ConversionOperationFailure failure; + + public ConversionOperationExecution() {} + + public ConversionOperationExecution input(ConversionOperationConfigParams input) { + this.input = input; + return this; + } + + /** + * Get input + * + * @return input + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConversionOperationConfigParams getInput() { + return input; + } + + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInput(ConversionOperationConfigParams input) { + this.input = input; + } + + public ConversionOperationExecution output(ConversionOperationExecutionOutput output) { + this.output = output; + return this; + } + + /** + * Get output + * + * @return output + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ConversionOperationExecutionOutput getOutput() { + return output; + } + + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOutput(ConversionOperationExecutionOutput output) { + this.output = output; + } + + public ConversionOperationExecution startedAt(BigDecimal startedAt) { + this.startedAt = startedAt; + return this; + } + + /** + * Get startedAt + * + * @return startedAt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getStartedAt() { + return startedAt; + } + + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStartedAt(BigDecimal startedAt) { + this.startedAt = startedAt; + } + + public ConversionOperationExecution finishedAt(BigDecimal finishedAt) { + this.finishedAt = finishedAt; + return this; + } + + /** + * Get finishedAt + * + * @return finishedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FINISHED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getFinishedAt() { + return finishedAt; + } + + @JsonProperty(JSON_PROPERTY_FINISHED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFinishedAt(BigDecimal finishedAt) { + this.finishedAt = finishedAt; + } + + public ConversionOperationExecution failure(ConversionOperationFailure failure) { + this.failure = failure; + return this; + } + + /** + * Get failure + * + * @return failure + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ConversionOperationFailure getFailure() { + return failure; + } + + @JsonProperty(JSON_PROPERTY_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFailure(ConversionOperationFailure failure) { + this.failure = failure; + } + + /** Return true if this ConversionOperationExecution object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConversionOperationExecution conversionOperationExecution = + (ConversionOperationExecution) o; + return Objects.equals(this.input, conversionOperationExecution.input) + && Objects.equals(this.output, conversionOperationExecution.output) + && Objects.equals(this.startedAt, conversionOperationExecution.startedAt) + && Objects.equals(this.finishedAt, conversionOperationExecution.finishedAt) + && Objects.equals(this.failure, conversionOperationExecution.failure); + } + + @Override + public int hashCode() { + return Objects.hash(input, output, startedAt, finishedAt, failure); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConversionOperationExecution {\n"); + sb.append(" input: ").append(toIndentedString(input)).append("\n"); + sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); + sb.append(" finishedAt: ").append(toIndentedString(finishedAt)).append("\n"); + sb.append(" failure: ").append(toIndentedString(failure)).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 `input` to the URL query string + if (getInput() != null) { + joiner.add(getInput().toUrlQueryString(prefix + "input" + suffix)); + } + + // add `output` to the URL query string + if (getOutput() != null) { + joiner.add(getOutput().toUrlQueryString(prefix + "output" + suffix)); + } + + // add `startedAt` to the URL query string + if (getStartedAt() != null) { + joiner.add( + String.format( + "%sstartedAt%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getStartedAt()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `finishedAt` to the URL query string + if (getFinishedAt() != null) { + joiner.add( + String.format( + "%sfinishedAt%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getFinishedAt()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `failure` to the URL query string + if (getFailure() != null) { + joiner.add(getFailure().toUrlQueryString(prefix + "failure" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConversionOperationExecutionOutput.java b/src/main/java/com/fireblocks/sdk/model/ConversionOperationExecutionOutput.java new file mode 100644 index 0000000..9b63e6f --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConversionOperationExecutionOutput.java @@ -0,0 +1,213 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConversionOperationExecutionOutput */ +@JsonPropertyOrder({ + ConversionOperationExecutionOutput.JSON_PROPERTY_AMOUNT, + ConversionOperationExecutionOutput.JSON_PROPERTY_FEE, + ConversionOperationExecutionOutput.JSON_PROPERTY_CONVERSION_RATE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConversionOperationExecutionOutput { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private AssetAmount amount; + + public static final String JSON_PROPERTY_FEE = "fee"; + private AssetAmount fee; + + public static final String JSON_PROPERTY_CONVERSION_RATE = "conversionRate"; + private String conversionRate; + + public ConversionOperationExecutionOutput() {} + + public ConversionOperationExecutionOutput amount(AssetAmount amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * + * @return amount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetAmount getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(AssetAmount amount) { + this.amount = amount; + } + + public ConversionOperationExecutionOutput fee(AssetAmount fee) { + this.fee = fee; + return this; + } + + /** + * Get fee + * + * @return fee + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetAmount getFee() { + return fee; + } + + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFee(AssetAmount fee) { + this.fee = fee; + } + + public ConversionOperationExecutionOutput conversionRate(String conversionRate) { + this.conversionRate = conversionRate; + return this; + } + + /** + * Get conversionRate + * + * @return conversionRate + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONVERSION_RATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConversionRate() { + return conversionRate; + } + + @JsonProperty(JSON_PROPERTY_CONVERSION_RATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setConversionRate(String conversionRate) { + this.conversionRate = conversionRate; + } + + /** Return true if this ConversionOperationExecutionOutput object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConversionOperationExecutionOutput conversionOperationExecutionOutput = + (ConversionOperationExecutionOutput) o; + return Objects.equals(this.amount, conversionOperationExecutionOutput.amount) + && Objects.equals(this.fee, conversionOperationExecutionOutput.fee) + && Objects.equals( + this.conversionRate, conversionOperationExecutionOutput.conversionRate); + } + + @Override + public int hashCode() { + return Objects.hash(amount, fee, conversionRate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConversionOperationExecutionOutput {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); + sb.append(" conversionRate: ").append(toIndentedString(conversionRate)).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 `amount` to the URL query string + if (getAmount() != null) { + joiner.add(getAmount().toUrlQueryString(prefix + "amount" + suffix)); + } + + // add `fee` to the URL query string + if (getFee() != null) { + joiner.add(getFee().toUrlQueryString(prefix + "fee" + suffix)); + } + + // add `conversionRate` to the URL query string + if (getConversionRate() != null) { + joiner.add( + String.format( + "%sconversionRate%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getConversionRate()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConversionOperationExecutionParams.java b/src/main/java/com/fireblocks/sdk/model/ConversionOperationExecutionParams.java new file mode 100644 index 0000000..2b348d7 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConversionOperationExecutionParams.java @@ -0,0 +1,185 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConversionOperationExecutionParams */ +@JsonPropertyOrder({ + ConversionOperationExecutionParams.JSON_PROPERTY_CONFIG_OPERATION_ID, + ConversionOperationExecutionParams.JSON_PROPERTY_EXECUTION_PARAMS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConversionOperationExecutionParams { + public static final String JSON_PROPERTY_CONFIG_OPERATION_ID = "configOperationId"; + private String configOperationId; + + public static final String JSON_PROPERTY_EXECUTION_PARAMS = "executionParams"; + private ConversionOperationExecutionParamsExecutionParams executionParams; + + public ConversionOperationExecutionParams() {} + + public ConversionOperationExecutionParams configOperationId(String configOperationId) { + this.configOperationId = configOperationId; + return this; + } + + /** + * Get configOperationId + * + * @return configOperationId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIG_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConfigOperationId() { + return configOperationId; + } + + @JsonProperty(JSON_PROPERTY_CONFIG_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setConfigOperationId(String configOperationId) { + this.configOperationId = configOperationId; + } + + public ConversionOperationExecutionParams executionParams( + ConversionOperationExecutionParamsExecutionParams executionParams) { + this.executionParams = executionParams; + return this; + } + + /** + * Get executionParams + * + * @return executionParams + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ConversionOperationExecutionParamsExecutionParams getExecutionParams() { + return executionParams; + } + + @JsonProperty(JSON_PROPERTY_EXECUTION_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutionParams( + ConversionOperationExecutionParamsExecutionParams executionParams) { + this.executionParams = executionParams; + } + + /** Return true if this ConversionOperationExecutionParams object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConversionOperationExecutionParams conversionOperationExecutionParams = + (ConversionOperationExecutionParams) o; + return Objects.equals( + this.configOperationId, + conversionOperationExecutionParams.configOperationId) + && Objects.equals( + this.executionParams, conversionOperationExecutionParams.executionParams); + } + + @Override + public int hashCode() { + return Objects.hash(configOperationId, executionParams); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConversionOperationExecutionParams {\n"); + sb.append(" configOperationId: ") + .append(toIndentedString(configOperationId)) + .append("\n"); + sb.append(" executionParams: ").append(toIndentedString(executionParams)).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 `configOperationId` to the URL query string + if (getConfigOperationId() != null) { + joiner.add( + String.format( + "%sconfigOperationId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getConfigOperationId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `executionParams` to the URL query string + if (getExecutionParams() != null) { + joiner.add(getExecutionParams().toUrlQueryString(prefix + "executionParams" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConversionOperationExecutionParamsExecutionParams.java b/src/main/java/com/fireblocks/sdk/model/ConversionOperationExecutionParamsExecutionParams.java new file mode 100644 index 0000000..45b2b82 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConversionOperationExecutionParamsExecutionParams.java @@ -0,0 +1,321 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConversionOperationExecutionParamsExecutionParams */ +@JsonPropertyOrder({ + ConversionOperationExecutionParamsExecutionParams.JSON_PROPERTY_AMOUNT, + ConversionOperationExecutionParamsExecutionParams.JSON_PROPERTY_ACCOUNT_ID, + ConversionOperationExecutionParamsExecutionParams.JSON_PROPERTY_SRC_ASSET_ID, + ConversionOperationExecutionParamsExecutionParams.JSON_PROPERTY_DEST_ASSET_ID, + ConversionOperationExecutionParamsExecutionParams.JSON_PROPERTY_SLIPPAGE_BASIS_POINTS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConversionOperationExecutionParamsExecutionParams { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private String amount; + + public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; + private String accountId; + + public static final String JSON_PROPERTY_SRC_ASSET_ID = "srcAssetId"; + private String srcAssetId; + + public static final String JSON_PROPERTY_DEST_ASSET_ID = "destAssetId"; + private String destAssetId; + + public static final String JSON_PROPERTY_SLIPPAGE_BASIS_POINTS = "slippageBasisPoints"; + private Integer slippageBasisPoints; + + public ConversionOperationExecutionParamsExecutionParams() {} + + public ConversionOperationExecutionParamsExecutionParams amount(String amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * + * @return amount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAmount(String amount) { + this.amount = amount; + } + + public ConversionOperationExecutionParamsExecutionParams accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get accountId + * + * @return accountId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAccountId() { + return accountId; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + public ConversionOperationExecutionParamsExecutionParams srcAssetId(String srcAssetId) { + this.srcAssetId = srcAssetId; + return this; + } + + /** + * Get srcAssetId + * + * @return srcAssetId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SRC_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSrcAssetId() { + return srcAssetId; + } + + @JsonProperty(JSON_PROPERTY_SRC_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSrcAssetId(String srcAssetId) { + this.srcAssetId = srcAssetId; + } + + public ConversionOperationExecutionParamsExecutionParams destAssetId(String destAssetId) { + this.destAssetId = destAssetId; + return this; + } + + /** + * Get destAssetId + * + * @return destAssetId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEST_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDestAssetId() { + return destAssetId; + } + + @JsonProperty(JSON_PROPERTY_DEST_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDestAssetId(String destAssetId) { + this.destAssetId = destAssetId; + } + + public ConversionOperationExecutionParamsExecutionParams slippageBasisPoints( + Integer slippageBasisPoints) { + this.slippageBasisPoints = slippageBasisPoints; + return this; + } + + /** + * Get slippageBasisPoints minimum: 0 maximum: 10000 + * + * @return slippageBasisPoints + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SLIPPAGE_BASIS_POINTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getSlippageBasisPoints() { + return slippageBasisPoints; + } + + @JsonProperty(JSON_PROPERTY_SLIPPAGE_BASIS_POINTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSlippageBasisPoints(Integer slippageBasisPoints) { + this.slippageBasisPoints = slippageBasisPoints; + } + + /** + * Return true if this ConversionOperationExecutionParams_executionParams object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConversionOperationExecutionParamsExecutionParams + conversionOperationExecutionParamsExecutionParams = + (ConversionOperationExecutionParamsExecutionParams) o; + return Objects.equals(this.amount, conversionOperationExecutionParamsExecutionParams.amount) + && Objects.equals( + this.accountId, conversionOperationExecutionParamsExecutionParams.accountId) + && Objects.equals( + this.srcAssetId, + conversionOperationExecutionParamsExecutionParams.srcAssetId) + && Objects.equals( + this.destAssetId, + conversionOperationExecutionParamsExecutionParams.destAssetId) + && Objects.equals( + this.slippageBasisPoints, + conversionOperationExecutionParamsExecutionParams.slippageBasisPoints); + } + + @Override + public int hashCode() { + return Objects.hash(amount, accountId, srcAssetId, destAssetId, slippageBasisPoints); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConversionOperationExecutionParamsExecutionParams {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" srcAssetId: ").append(toIndentedString(srcAssetId)).append("\n"); + sb.append(" destAssetId: ").append(toIndentedString(destAssetId)).append("\n"); + sb.append(" slippageBasisPoints: ") + .append(toIndentedString(slippageBasisPoints)) + .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 `amount` to the URL query string + if (getAmount() != null) { + joiner.add( + String.format( + "%samount%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `accountId` to the URL query string + if (getAccountId() != null) { + joiner.add( + String.format( + "%saccountId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getAccountId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `srcAssetId` to the URL query string + if (getSrcAssetId() != null) { + joiner.add( + String.format( + "%ssrcAssetId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getSrcAssetId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `destAssetId` to the URL query string + if (getDestAssetId() != null) { + joiner.add( + String.format( + "%sdestAssetId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDestAssetId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `slippageBasisPoints` to the URL query string + if (getSlippageBasisPoints() != null) { + joiner.add( + String.format( + "%sslippageBasisPoints%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getSlippageBasisPoints()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConversionOperationFailure.java b/src/main/java/com/fireblocks/sdk/model/ConversionOperationFailure.java new file mode 100644 index 0000000..9ceadf4 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConversionOperationFailure.java @@ -0,0 +1,239 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConversionOperationFailure */ +@JsonPropertyOrder({ + ConversionOperationFailure.JSON_PROPERTY_REASON, + ConversionOperationFailure.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConversionOperationFailure { + /** Gets or Sets reason */ + public enum ReasonEnum { + INVALID_AMOUNT("INVALID_AMOUNT"), + + SLIPPAGE_EXCEEDED("SLIPPAGE_EXCEEDED"), + + AMOUNT_TOO_SMALL("AMOUNT_TOO_SMALL"), + + INSUFFICIENT_FUNDS("INSUFFICIENT_FUNDS"); + + private String value; + + ReasonEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ReasonEnum fromValue(String value) { + for (ReasonEnum b : ReasonEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_REASON = "reason"; + private ReasonEnum reason; + + public static final String JSON_PROPERTY_DATA = "data"; + private Map data = new HashMap<>(); + + public ConversionOperationFailure() {} + + public ConversionOperationFailure reason(ReasonEnum reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * + * @return reason + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReasonEnum getReason() { + return reason; + } + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReason(ReasonEnum reason) { + this.reason = reason; + } + + public ConversionOperationFailure data(Map data) { + this.data = data; + return this; + } + + public ConversionOperationFailure putDataItem(String key, Object dataItem) { + if (this.data == null) { + this.data = new HashMap<>(); + } + this.data.put(key, dataItem); + return this; + } + + /** + * Get data + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Map data) { + this.data = data; + } + + /** Return true if this ConversionOperationFailure object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConversionOperationFailure conversionOperationFailure = (ConversionOperationFailure) o; + return Objects.equals(this.reason, conversionOperationFailure.reason) + && Objects.equals(this.data, conversionOperationFailure.data); + } + + @Override + public int hashCode() { + return Objects.hash(reason, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConversionOperationFailure {\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).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 `reason` to the URL query string + if (getReason() != null) { + joiner.add( + String.format( + "%sreason%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `data` to the URL query string + if (getData() != null) { + for (String _key : getData().keySet()) { + joiner.add( + String.format( + "%sdata%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, _key, containerSuffix), + getData().get(_key), + URLEncoder.encode( + String.valueOf(getData().get(_key)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConversionOperationPreview.java b/src/main/java/com/fireblocks/sdk/model/ConversionOperationPreview.java new file mode 100644 index 0000000..09533d0 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConversionOperationPreview.java @@ -0,0 +1,201 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.util.Objects; +import java.util.StringJoiner; + +/** ConversionOperationPreview */ +@JsonPropertyOrder({ + ConversionOperationPreview.JSON_PROPERTY_INPUT, + ConversionOperationPreview.JSON_PROPERTY_OUTPUT, + ConversionOperationPreview.JSON_PROPERTY_FAILURE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConversionOperationPreview { + public static final String JSON_PROPERTY_INPUT = "input"; + private ConversionOperationConfigParams input; + + public static final String JSON_PROPERTY_OUTPUT = "output"; + private ConversionOperationPreviewOutput output; + + public static final String JSON_PROPERTY_FAILURE = "failure"; + private ConversionOperationFailure failure; + + public ConversionOperationPreview() {} + + public ConversionOperationPreview input(ConversionOperationConfigParams input) { + this.input = input; + return this; + } + + /** + * Get input + * + * @return input + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConversionOperationConfigParams getInput() { + return input; + } + + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInput(ConversionOperationConfigParams input) { + this.input = input; + } + + public ConversionOperationPreview output(ConversionOperationPreviewOutput output) { + this.output = output; + return this; + } + + /** + * Get output + * + * @return output + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ConversionOperationPreviewOutput getOutput() { + return output; + } + + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOutput(ConversionOperationPreviewOutput output) { + this.output = output; + } + + public ConversionOperationPreview failure(ConversionOperationFailure failure) { + this.failure = failure; + return this; + } + + /** + * Get failure + * + * @return failure + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ConversionOperationFailure getFailure() { + return failure; + } + + @JsonProperty(JSON_PROPERTY_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFailure(ConversionOperationFailure failure) { + this.failure = failure; + } + + /** Return true if this ConversionOperationPreview object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConversionOperationPreview conversionOperationPreview = (ConversionOperationPreview) o; + return Objects.equals(this.input, conversionOperationPreview.input) + && Objects.equals(this.output, conversionOperationPreview.output) + && Objects.equals(this.failure, conversionOperationPreview.failure); + } + + @Override + public int hashCode() { + return Objects.hash(input, output, failure); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConversionOperationPreview {\n"); + sb.append(" input: ").append(toIndentedString(input)).append("\n"); + sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append(" failure: ").append(toIndentedString(failure)).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 `input` to the URL query string + if (getInput() != null) { + joiner.add(getInput().toUrlQueryString(prefix + "input" + suffix)); + } + + // add `output` to the URL query string + if (getOutput() != null) { + joiner.add(getOutput().toUrlQueryString(prefix + "output" + suffix)); + } + + // add `failure` to the URL query string + if (getFailure() != null) { + joiner.add(getFailure().toUrlQueryString(prefix + "failure" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConversionOperationPreviewOutput.java b/src/main/java/com/fireblocks/sdk/model/ConversionOperationPreviewOutput.java new file mode 100644 index 0000000..0935532 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConversionOperationPreviewOutput.java @@ -0,0 +1,256 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConversionOperationPreviewOutput */ +@JsonPropertyOrder({ + ConversionOperationPreviewOutput.JSON_PROPERTY_AMOUNT, + ConversionOperationPreviewOutput.JSON_PROPERTY_FEE, + ConversionOperationPreviewOutput.JSON_PROPERTY_CONVERSION_RATE, + ConversionOperationPreviewOutput.JSON_PROPERTY_TIME_SECONDS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConversionOperationPreviewOutput { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private AssetAmount amount; + + public static final String JSON_PROPERTY_FEE = "fee"; + private AssetAmount fee; + + public static final String JSON_PROPERTY_CONVERSION_RATE = "conversionRate"; + private String conversionRate; + + public static final String JSON_PROPERTY_TIME_SECONDS = "timeSeconds"; + private BigDecimal timeSeconds; + + public ConversionOperationPreviewOutput() {} + + public ConversionOperationPreviewOutput amount(AssetAmount amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * + * @return amount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetAmount getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(AssetAmount amount) { + this.amount = amount; + } + + public ConversionOperationPreviewOutput fee(AssetAmount fee) { + this.fee = fee; + return this; + } + + /** + * Get fee + * + * @return fee + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetAmount getFee() { + return fee; + } + + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFee(AssetAmount fee) { + this.fee = fee; + } + + public ConversionOperationPreviewOutput conversionRate(String conversionRate) { + this.conversionRate = conversionRate; + return this; + } + + /** + * Get conversionRate + * + * @return conversionRate + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONVERSION_RATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConversionRate() { + return conversionRate; + } + + @JsonProperty(JSON_PROPERTY_CONVERSION_RATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setConversionRate(String conversionRate) { + this.conversionRate = conversionRate; + } + + public ConversionOperationPreviewOutput timeSeconds(BigDecimal timeSeconds) { + this.timeSeconds = timeSeconds; + return this; + } + + /** + * Get timeSeconds + * + * @return timeSeconds + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TIME_SECONDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getTimeSeconds() { + return timeSeconds; + } + + @JsonProperty(JSON_PROPERTY_TIME_SECONDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTimeSeconds(BigDecimal timeSeconds) { + this.timeSeconds = timeSeconds; + } + + /** Return true if this ConversionOperationPreviewOutput object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConversionOperationPreviewOutput conversionOperationPreviewOutput = + (ConversionOperationPreviewOutput) o; + return Objects.equals(this.amount, conversionOperationPreviewOutput.amount) + && Objects.equals(this.fee, conversionOperationPreviewOutput.fee) + && Objects.equals( + this.conversionRate, conversionOperationPreviewOutput.conversionRate) + && Objects.equals(this.timeSeconds, conversionOperationPreviewOutput.timeSeconds); + } + + @Override + public int hashCode() { + return Objects.hash(amount, fee, conversionRate, timeSeconds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConversionOperationPreviewOutput {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); + sb.append(" conversionRate: ").append(toIndentedString(conversionRate)).append("\n"); + sb.append(" timeSeconds: ").append(toIndentedString(timeSeconds)).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 `amount` to the URL query string + if (getAmount() != null) { + joiner.add(getAmount().toUrlQueryString(prefix + "amount" + suffix)); + } + + // add `fee` to the URL query string + if (getFee() != null) { + joiner.add(getFee().toUrlQueryString(prefix + "fee" + suffix)); + } + + // add `conversionRate` to the URL query string + if (getConversionRate() != null) { + joiner.add( + String.format( + "%sconversionRate%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getConversionRate()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `timeSeconds` to the URL query string + if (getTimeSeconds() != null) { + joiner.add( + String.format( + "%stimeSeconds%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTimeSeconds()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConversionOperationType.java b/src/main/java/com/fireblocks/sdk/model/ConversionOperationType.java new file mode 100644 index 0000000..616e4fe --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConversionOperationType.java @@ -0,0 +1,62 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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; + +/** Gets or Sets ConversionOperationType */ +public enum ConversionOperationType { + CONVERSION("CONVERSION"); + + private String value; + + ConversionOperationType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ConversionOperationType fromValue(String value) { + for (ConversionOperationType b : ConversionOperationType.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/ConversionValidationFailure.java b/src/main/java/com/fireblocks/sdk/model/ConversionValidationFailure.java new file mode 100644 index 0000000..93fe2cb --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConversionValidationFailure.java @@ -0,0 +1,263 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConversionValidationFailure */ +@JsonPropertyOrder({ + ConversionValidationFailure.JSON_PROPERTY_REASON, + ConversionValidationFailure.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConversionValidationFailure { + /** Gets or Sets reason */ + public enum ReasonEnum { + ACCOUNT_NOT_FOUND("ACCOUNT_NOT_FOUND"), + + ACCOUNT_TYPE_NOT_SUPPORTED("ACCOUNT_TYPE_NOT_SUPPORTED"), + + INSUFFICIENT_BALANCE("INSUFFICIENT_BALANCE"), + + ASSET_NOT_FOUND("ASSET_NOT_FOUND"), + + ASSETS_CONTINUITY_MISMATCH("ASSETS_CONTINUITY_MISMATCH"), + + EXCHANGE_BASKETS_MISMATCH("EXCHANGE_BASKETS_MISMATCH"), + + ACCOUNTS_CONTINUITY_MISMATCH("ACCOUNTS_CONTINUITY_MISMATCH"), + + ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED("ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED"), + + EQUAL_ACCOUNTS_NOT_ALLOWED("EQUAL_ACCOUNTS_NOT_ALLOWED"), + + EQUAL_ASSETS_NOT_ALLOWED("EQUAL_ASSETS_NOT_ALLOWED"), + + INVALID_AMOUNT("INVALID_AMOUNT"), + + UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED("UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED"), + + MANAGED_OPERATION_PARAMS_INVALID_SCHEMA("MANAGED_OPERATION_PARAMS_INVALID_SCHEMA"), + + ACCOUNT_IS_NOT_EXCHANGE("ACCOUNT_IS_NOT_EXCHANGE"), + + UNSUPPORTED_TRADING_METHOD("UNSUPPORTED_TRADING_METHOD"), + + ASSETS_CAN_NOT_CONVERTED("ASSETS_CAN_NOT_CONVERTED"); + + private String value; + + ReasonEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ReasonEnum fromValue(String value) { + for (ReasonEnum b : ReasonEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_REASON = "reason"; + private ReasonEnum reason; + + public static final String JSON_PROPERTY_DATA = "data"; + private Map data = new HashMap<>(); + + public ConversionValidationFailure() {} + + public ConversionValidationFailure reason(ReasonEnum reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * + * @return reason + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReasonEnum getReason() { + return reason; + } + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReason(ReasonEnum reason) { + this.reason = reason; + } + + public ConversionValidationFailure data(Map data) { + this.data = data; + return this; + } + + public ConversionValidationFailure putDataItem(String key, Object dataItem) { + if (this.data == null) { + this.data = new HashMap<>(); + } + this.data.put(key, dataItem); + return this; + } + + /** + * Get data + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Map data) { + this.data = data; + } + + /** Return true if this ConversionValidationFailure object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConversionValidationFailure conversionValidationFailure = (ConversionValidationFailure) o; + return Objects.equals(this.reason, conversionValidationFailure.reason) + && Objects.equals(this.data, conversionValidationFailure.data); + } + + @Override + public int hashCode() { + return Objects.hash(reason, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConversionValidationFailure {\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).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 `reason` to the URL query string + if (getReason() != null) { + joiner.add( + String.format( + "%sreason%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `data` to the URL query string + if (getData() != null) { + for (String _key : getData().keySet()) { + joiner.add( + String.format( + "%sdata%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, _key, containerSuffix), + getData().get(_key), + URLEncoder.encode( + String.valueOf(getData().get(_key)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConvertAssetsResponse.java b/src/main/java/com/fireblocks/sdk/model/ConvertAssetsResponse.java new file mode 100644 index 0000000..77db861 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConvertAssetsResponse.java @@ -0,0 +1,139 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConvertAssetsResponse */ +@JsonPropertyOrder({ConvertAssetsResponse.JSON_PROPERTY_SUCCESS}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConvertAssetsResponse { + public static final String JSON_PROPERTY_SUCCESS = "success"; + private Boolean success; + + public ConvertAssetsResponse() {} + + public ConvertAssetsResponse success(Boolean success) { + this.success = success; + return this; + } + + /** + * Indicates whether the conversion was successful + * + * @return success + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getSuccess() { + return success; + } + + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSuccess(Boolean success) { + this.success = success; + } + + /** Return true if this ConvertAssetsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConvertAssetsResponse convertAssetsResponse = (ConvertAssetsResponse) o; + return Objects.equals(this.success, convertAssetsResponse.success); + } + + @Override + public int hashCode() { + return Objects.hash(success); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConvertAssetsResponse {\n"); + sb.append(" success: ").append(toIndentedString(success)).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 `success` to the URL query string + if (getSuccess() != null) { + joiner.add( + String.format( + "%ssuccess%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSuccess()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CreateConfigOperationRequest.java b/src/main/java/com/fireblocks/sdk/model/CreateConfigOperationRequest.java new file mode 100644 index 0000000..baabf95 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CreateConfigOperationRequest.java @@ -0,0 +1,442 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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") +@JsonDeserialize( + using = CreateConfigOperationRequest.CreateConfigOperationRequestDeserializer.class) +@JsonSerialize(using = CreateConfigOperationRequest.CreateConfigOperationRequestSerializer.class) +public class CreateConfigOperationRequest extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(CreateConfigOperationRequest.class.getName()); + + public static class CreateConfigOperationRequestSerializer + extends StdSerializer { + public CreateConfigOperationRequestSerializer(Class t) { + super(t); + } + + public CreateConfigOperationRequestSerializer() { + this(null); + } + + @Override + public void serialize( + CreateConfigOperationRequest value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class CreateConfigOperationRequestDeserializer + extends StdDeserializer { + public CreateConfigOperationRequestDeserializer() { + this(CreateConfigOperationRequest.class); + } + + public CreateConfigOperationRequestDeserializer(Class vc) { + super(vc); + } + + @Override + public CreateConfigOperationRequest 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 CreateConversionConfigOperationRequest + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateConversionConfigOperationRequest.class.equals(Integer.class) + || CreateConversionConfigOperationRequest.class.equals(Long.class) + || CreateConversionConfigOperationRequest.class.equals(Float.class) + || CreateConversionConfigOperationRequest.class.equals(Double.class) + || CreateConversionConfigOperationRequest.class.equals(Boolean.class) + || CreateConversionConfigOperationRequest.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((CreateConversionConfigOperationRequest.class.equals(Integer.class) + || CreateConversionConfigOperationRequest.class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((CreateConversionConfigOperationRequest.class.equals(Float.class) + || CreateConversionConfigOperationRequest.class + .equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (CreateConversionConfigOperationRequest.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (CreateConversionConfigOperationRequest.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(CreateConversionConfigOperationRequest.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 'CreateConversionConfigOperationRequest'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'CreateConversionConfigOperationRequest'", + e); + } + + // deserialize CreateDisbursementConfigOperationRequest + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateDisbursementConfigOperationRequest.class.equals(Integer.class) + || CreateDisbursementConfigOperationRequest.class.equals(Long.class) + || CreateDisbursementConfigOperationRequest.class.equals(Float.class) + || CreateDisbursementConfigOperationRequest.class.equals(Double.class) + || CreateDisbursementConfigOperationRequest.class.equals(Boolean.class) + || CreateDisbursementConfigOperationRequest.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((CreateDisbursementConfigOperationRequest.class.equals( + Integer.class) + || CreateDisbursementConfigOperationRequest.class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((CreateDisbursementConfigOperationRequest.class.equals(Float.class) + || CreateDisbursementConfigOperationRequest.class + .equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (CreateDisbursementConfigOperationRequest.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (CreateDisbursementConfigOperationRequest.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(CreateDisbursementConfigOperationRequest.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 'CreateDisbursementConfigOperationRequest'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'CreateDisbursementConfigOperationRequest'", + e); + } + + // deserialize CreateTransferConfigOperationRequest + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateTransferConfigOperationRequest.class.equals(Integer.class) + || CreateTransferConfigOperationRequest.class.equals(Long.class) + || CreateTransferConfigOperationRequest.class.equals(Float.class) + || CreateTransferConfigOperationRequest.class.equals(Double.class) + || CreateTransferConfigOperationRequest.class.equals(Boolean.class) + || CreateTransferConfigOperationRequest.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((CreateTransferConfigOperationRequest.class.equals(Integer.class) + || CreateTransferConfigOperationRequest.class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((CreateTransferConfigOperationRequest.class.equals(Float.class) + || CreateTransferConfigOperationRequest.class + .equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (CreateTransferConfigOperationRequest.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (CreateTransferConfigOperationRequest.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(CreateTransferConfigOperationRequest.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 'CreateTransferConfigOperationRequest'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'CreateTransferConfigOperationRequest'", + e); + } + + if (match == 1) { + CreateConfigOperationRequest ret = new CreateConfigOperationRequest(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for CreateConfigOperationRequest: %d classes" + + " match result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public CreateConfigOperationRequest getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "CreateConfigOperationRequest cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public CreateConfigOperationRequest() { + super("oneOf", Boolean.FALSE); + } + + public CreateConfigOperationRequest(CreateConversionConfigOperationRequest o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateConfigOperationRequest(CreateDisbursementConfigOperationRequest o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateConfigOperationRequest(CreateTransferConfigOperationRequest o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put( + "CreateConversionConfigOperationRequest", + CreateConversionConfigOperationRequest.class); + schemas.put( + "CreateDisbursementConfigOperationRequest", + CreateDisbursementConfigOperationRequest.class); + schemas.put( + "CreateTransferConfigOperationRequest", CreateTransferConfigOperationRequest.class); + JSON.registerDescendants( + CreateConfigOperationRequest.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return CreateConfigOperationRequest.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: CreateConversionConfigOperationRequest, + * CreateDisbursementConfigOperationRequest, CreateTransferConfigOperationRequest + * + *

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( + CreateConversionConfigOperationRequest.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + CreateDisbursementConfigOperationRequest.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + CreateTransferConfigOperationRequest.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be CreateConversionConfigOperationRequest," + + " CreateDisbursementConfigOperationRequest," + + " CreateTransferConfigOperationRequest"); + } + + /** + * Get the actual instance, which can be the following: CreateConversionConfigOperationRequest, + * CreateDisbursementConfigOperationRequest, CreateTransferConfigOperationRequest + * + * @return The actual instance (CreateConversionConfigOperationRequest, + * CreateDisbursementConfigOperationRequest, CreateTransferConfigOperationRequest) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateConversionConfigOperationRequest`. If the actual instance + * is not `CreateConversionConfigOperationRequest`, the ClassCastException will be thrown. + * + * @return The actual instance of `CreateConversionConfigOperationRequest` + * @throws ClassCastException if the instance is not `CreateConversionConfigOperationRequest` + */ + public CreateConversionConfigOperationRequest getCreateConversionConfigOperationRequest() + throws ClassCastException { + return (CreateConversionConfigOperationRequest) super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateDisbursementConfigOperationRequest`. If the actual instance + * is not `CreateDisbursementConfigOperationRequest`, the ClassCastException will be thrown. + * + * @return The actual instance of `CreateDisbursementConfigOperationRequest` + * @throws ClassCastException if the instance is not `CreateDisbursementConfigOperationRequest` + */ + public CreateDisbursementConfigOperationRequest getCreateDisbursementConfigOperationRequest() + throws ClassCastException { + return (CreateDisbursementConfigOperationRequest) super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateTransferConfigOperationRequest`. If the actual instance is + * not `CreateTransferConfigOperationRequest`, the ClassCastException will be thrown. + * + * @return The actual instance of `CreateTransferConfigOperationRequest` + * @throws ClassCastException if the instance is not `CreateTransferConfigOperationRequest` + */ + public CreateTransferConfigOperationRequest getCreateTransferConfigOperationRequest() + throws ClassCastException { + return (CreateTransferConfigOperationRequest) 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 CreateConversionConfigOperationRequest) { + if (getActualInstance() != null) { + joiner.add( + ((CreateConversionConfigOperationRequest) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CreateTransferConfigOperationRequest) { + if (getActualInstance() != null) { + joiner.add( + ((CreateTransferConfigOperationRequest) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CreateDisbursementConfigOperationRequest) { + if (getActualInstance() != null) { + joiner.add( + ((CreateDisbursementConfigOperationRequest) getActualInstance()) + .toUrlQueryString(prefix + "one_of_2" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CreateConversionConfigOperationRequest.java b/src/main/java/com/fireblocks/sdk/model/CreateConversionConfigOperationRequest.java new file mode 100644 index 0000000..7060a39 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CreateConversionConfigOperationRequest.java @@ -0,0 +1,176 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** CreateConversionConfigOperationRequest */ +@JsonPropertyOrder({ + CreateConversionConfigOperationRequest.JSON_PROPERTY_TYPE, + CreateConversionConfigOperationRequest.JSON_PROPERTY_PARAMS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateConversionConfigOperationRequest { + public static final String JSON_PROPERTY_TYPE = "type"; + private ConversionOperationType type; + + public static final String JSON_PROPERTY_PARAMS = "params"; + private ConversionOperationConfigParams params; + + public CreateConversionConfigOperationRequest() {} + + public CreateConversionConfigOperationRequest type(ConversionOperationType type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConversionOperationType getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(ConversionOperationType type) { + this.type = type; + } + + public CreateConversionConfigOperationRequest params(ConversionOperationConfigParams params) { + this.params = params; + return this; + } + + /** + * Get params + * + * @return params + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConversionOperationConfigParams getParams() { + return params; + } + + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setParams(ConversionOperationConfigParams params) { + this.params = params; + } + + /** Return true if this CreateConversionConfigOperationRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateConversionConfigOperationRequest createConversionConfigOperationRequest = + (CreateConversionConfigOperationRequest) o; + return Objects.equals(this.type, createConversionConfigOperationRequest.type) + && Objects.equals(this.params, createConversionConfigOperationRequest.params); + } + + @Override + public int hashCode() { + return Objects.hash(type, params); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateConversionConfigOperationRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" params: ").append(toIndentedString(params)).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, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `params` to the URL query string + if (getParams() != null) { + joiner.add(getParams().toUrlQueryString(prefix + "params" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CreateDisbursementConfigOperationRequest.java b/src/main/java/com/fireblocks/sdk/model/CreateDisbursementConfigOperationRequest.java new file mode 100644 index 0000000..fe66203 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CreateDisbursementConfigOperationRequest.java @@ -0,0 +1,177 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** CreateDisbursementConfigOperationRequest */ +@JsonPropertyOrder({ + CreateDisbursementConfigOperationRequest.JSON_PROPERTY_TYPE, + CreateDisbursementConfigOperationRequest.JSON_PROPERTY_PARAMS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateDisbursementConfigOperationRequest { + public static final String JSON_PROPERTY_TYPE = "type"; + private DisbursementOperationType type; + + public static final String JSON_PROPERTY_PARAMS = "params"; + private DisbursementOperationConfigParams params; + + public CreateDisbursementConfigOperationRequest() {} + + public CreateDisbursementConfigOperationRequest type(DisbursementOperationType type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DisbursementOperationType getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(DisbursementOperationType type) { + this.type = type; + } + + public CreateDisbursementConfigOperationRequest params( + DisbursementOperationConfigParams params) { + this.params = params; + return this; + } + + /** + * Get params + * + * @return params + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DisbursementOperationConfigParams getParams() { + return params; + } + + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setParams(DisbursementOperationConfigParams params) { + this.params = params; + } + + /** Return true if this CreateDisbursementConfigOperationRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateDisbursementConfigOperationRequest createDisbursementConfigOperationRequest = + (CreateDisbursementConfigOperationRequest) o; + return Objects.equals(this.type, createDisbursementConfigOperationRequest.type) + && Objects.equals(this.params, createDisbursementConfigOperationRequest.params); + } + + @Override + public int hashCode() { + return Objects.hash(type, params); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateDisbursementConfigOperationRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" params: ").append(toIndentedString(params)).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, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `params` to the URL query string + if (getParams() != null) { + joiner.add(getParams().toUrlQueryString(prefix + "params" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CreateNetworkIdRequest.java b/src/main/java/com/fireblocks/sdk/model/CreateNetworkIdRequest.java index d61be36..4eee9cb 100644 --- a/src/main/java/com/fireblocks/sdk/model/CreateNetworkIdRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/CreateNetworkIdRequest.java @@ -18,6 +18,8 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.StringJoiner; @@ -32,7 +34,7 @@ public class CreateNetworkIdRequest { private String name; public static final String JSON_PROPERTY_ROUTING_POLICY = "routingPolicy"; - private NetworkIdRoutingPolicy routingPolicy; + private Map routingPolicy = new HashMap<>(); public CreateNetworkIdRequest() {} @@ -59,11 +61,21 @@ public void setName(String name) { this.name = name; } - public CreateNetworkIdRequest routingPolicy(NetworkIdRoutingPolicy routingPolicy) { + public CreateNetworkIdRequest routingPolicy( + Map routingPolicy) { this.routingPolicy = routingPolicy; return this; } + public CreateNetworkIdRequest putRoutingPolicyItem( + String key, NetworkIdRoutingPolicyValue routingPolicyItem) { + if (this.routingPolicy == null) { + this.routingPolicy = new HashMap<>(); + } + this.routingPolicy.put(key, routingPolicyItem); + return this; + } + /** * Get routingPolicy * @@ -72,13 +84,13 @@ public CreateNetworkIdRequest routingPolicy(NetworkIdRoutingPolicy routingPolicy @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ROUTING_POLICY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NetworkIdRoutingPolicy getRoutingPolicy() { + public Map getRoutingPolicy() { return routingPolicy; } @JsonProperty(JSON_PROPERTY_ROUTING_POLICY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRoutingPolicy(NetworkIdRoutingPolicy routingPolicy) { + public void setRoutingPolicy(Map routingPolicy) { this.routingPolicy = routingPolicy; } @@ -167,7 +179,25 @@ public String toUrlQueryString(String prefix) { // add `routingPolicy` to the URL query string if (getRoutingPolicy() != null) { - joiner.add(getRoutingPolicy().toUrlQueryString(prefix + "routingPolicy" + suffix)); + for (String _key : getRoutingPolicy().keySet()) { + if (getRoutingPolicy().get(_key) != null) { + joiner.add( + getRoutingPolicy() + .get(_key) + .toUrlQueryString( + String.format( + "%sroutingPolicy%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + _key, + containerSuffix)))); + } + } } return joiner.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/CreateTransferConfigOperationRequest.java b/src/main/java/com/fireblocks/sdk/model/CreateTransferConfigOperationRequest.java new file mode 100644 index 0000000..92dae20 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CreateTransferConfigOperationRequest.java @@ -0,0 +1,176 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** CreateTransferConfigOperationRequest */ +@JsonPropertyOrder({ + CreateTransferConfigOperationRequest.JSON_PROPERTY_TYPE, + CreateTransferConfigOperationRequest.JSON_PROPERTY_PARAMS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateTransferConfigOperationRequest { + public static final String JSON_PROPERTY_TYPE = "type"; + private TransferOperationType type; + + public static final String JSON_PROPERTY_PARAMS = "params"; + private TransferOperationConfigParams params; + + public CreateTransferConfigOperationRequest() {} + + public CreateTransferConfigOperationRequest type(TransferOperationType type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TransferOperationType getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TransferOperationType type) { + this.type = type; + } + + public CreateTransferConfigOperationRequest params(TransferOperationConfigParams params) { + this.params = params; + return this; + } + + /** + * Get params + * + * @return params + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TransferOperationConfigParams getParams() { + return params; + } + + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setParams(TransferOperationConfigParams params) { + this.params = params; + } + + /** Return true if this CreateTransferConfigOperationRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateTransferConfigOperationRequest createTransferConfigOperationRequest = + (CreateTransferConfigOperationRequest) o; + return Objects.equals(this.type, createTransferConfigOperationRequest.type) + && Objects.equals(this.params, createTransferConfigOperationRequest.params); + } + + @Override + public int hashCode() { + return Objects.hash(type, params); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateTransferConfigOperationRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" params: ").append(toIndentedString(params)).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, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `params` to the URL query string + if (getParams() != null) { + joiner.add(getParams().toUrlQueryString(prefix + "params" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CreateWorkflowExecutionRequestParamsInner.java b/src/main/java/com/fireblocks/sdk/model/CreateWorkflowExecutionRequestParamsInner.java new file mode 100644 index 0000000..56f5550 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CreateWorkflowExecutionRequestParamsInner.java @@ -0,0 +1,306 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +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") +@JsonDeserialize( + using = + CreateWorkflowExecutionRequestParamsInner + .CreateWorkflowExecutionRequestParamsInnerDeserializer.class) +@JsonSerialize( + using = + CreateWorkflowExecutionRequestParamsInner + .CreateWorkflowExecutionRequestParamsInnerSerializer.class) +public class CreateWorkflowExecutionRequestParamsInner extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(CreateWorkflowExecutionRequestParamsInner.class.getName()); + + public static class CreateWorkflowExecutionRequestParamsInnerSerializer + extends StdSerializer { + public CreateWorkflowExecutionRequestParamsInnerSerializer( + Class t) { + super(t); + } + + public CreateWorkflowExecutionRequestParamsInnerSerializer() { + this(null); + } + + @Override + public void serialize( + CreateWorkflowExecutionRequestParamsInner value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class CreateWorkflowExecutionRequestParamsInnerDeserializer + extends StdDeserializer { + public CreateWorkflowExecutionRequestParamsInnerDeserializer() { + this(CreateWorkflowExecutionRequestParamsInner.class); + } + + public CreateWorkflowExecutionRequestParamsInnerDeserializer(Class vc) { + super(vc); + } + + @Override + public CreateWorkflowExecutionRequestParamsInner deserialize( + JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + + Object deserialized = null; + // deserialize ConversionOperationExecutionParams + try { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(ConversionOperationExecutionParams.class); + CreateWorkflowExecutionRequestParamsInner ret = + new CreateWorkflowExecutionRequestParamsInner(); + ret.setActualInstance(deserialized); + return ret; + } catch (Exception e) { + // deserialization failed, continue, log to help debugging + log.log( + Level.FINER, + "Input data does not match 'CreateWorkflowExecutionRequestParamsInner'", + e); + } + + // deserialize DisbursementOperationExecutionParams + try { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(DisbursementOperationExecutionParams.class); + CreateWorkflowExecutionRequestParamsInner ret = + new CreateWorkflowExecutionRequestParamsInner(); + ret.setActualInstance(deserialized); + return ret; + } catch (Exception e) { + // deserialization failed, continue, log to help debugging + log.log( + Level.FINER, + "Input data does not match 'CreateWorkflowExecutionRequestParamsInner'", + e); + } + + // deserialize TransferOperationExecutionParams + try { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(TransferOperationExecutionParams.class); + CreateWorkflowExecutionRequestParamsInner ret = + new CreateWorkflowExecutionRequestParamsInner(); + ret.setActualInstance(deserialized); + return ret; + } catch (Exception e) { + // deserialization failed, continue, log to help debugging + log.log( + Level.FINER, + "Input data does not match 'CreateWorkflowExecutionRequestParamsInner'", + e); + } + + throw new IOException( + String.format( + "Failed deserialization for CreateWorkflowExecutionRequestParamsInner:" + + " no match found")); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public CreateWorkflowExecutionRequestParamsInner getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "CreateWorkflowExecutionRequestParamsInner cannot be null"); + } + } + + // store a list of schema names defined in anyOf + public static final Map> schemas = new HashMap>(); + + public CreateWorkflowExecutionRequestParamsInner() { + super("anyOf", Boolean.FALSE); + } + + public CreateWorkflowExecutionRequestParamsInner(ConversionOperationExecutionParams o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateWorkflowExecutionRequestParamsInner(DisbursementOperationExecutionParams o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateWorkflowExecutionRequestParamsInner(TransferOperationExecutionParams o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("ConversionOperationExecutionParams", ConversionOperationExecutionParams.class); + schemas.put( + "DisbursementOperationExecutionParams", DisbursementOperationExecutionParams.class); + schemas.put("TransferOperationExecutionParams", TransferOperationExecutionParams.class); + JSON.registerDescendants( + CreateWorkflowExecutionRequestParamsInner.class, + Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return CreateWorkflowExecutionRequestParamsInner.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check the instance parameter is valid + * against the anyOf child schemas: ConversionOperationExecutionParams, + * DisbursementOperationExecutionParams, TransferOperationExecutionParams + * + *

It could be an instance of the 'anyOf' schemas. The anyOf child schemas may themselves be + * a composed schema (allOf, anyOf, anyOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf( + ConversionOperationExecutionParams.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + DisbursementOperationExecutionParams.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + TransferOperationExecutionParams.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be ConversionOperationExecutionParams," + + " DisbursementOperationExecutionParams, TransferOperationExecutionParams"); + } + + /** + * Get the actual instance, which can be the following: ConversionOperationExecutionParams, + * DisbursementOperationExecutionParams, TransferOperationExecutionParams + * + * @return The actual instance (ConversionOperationExecutionParams, + * DisbursementOperationExecutionParams, TransferOperationExecutionParams) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `ConversionOperationExecutionParams`. If the actual instance is + * not `ConversionOperationExecutionParams`, the ClassCastException will be thrown. + * + * @return The actual instance of `ConversionOperationExecutionParams` + * @throws ClassCastException if the instance is not `ConversionOperationExecutionParams` + */ + public ConversionOperationExecutionParams getConversionOperationExecutionParams() + throws ClassCastException { + return (ConversionOperationExecutionParams) super.getActualInstance(); + } + + /** + * Get the actual instance of `DisbursementOperationExecutionParams`. If the actual instance is + * not `DisbursementOperationExecutionParams`, the ClassCastException will be thrown. + * + * @return The actual instance of `DisbursementOperationExecutionParams` + * @throws ClassCastException if the instance is not `DisbursementOperationExecutionParams` + */ + public DisbursementOperationExecutionParams getDisbursementOperationExecutionParams() + throws ClassCastException { + return (DisbursementOperationExecutionParams) super.getActualInstance(); + } + + /** + * Get the actual instance of `TransferOperationExecutionParams`. If the actual instance is not + * `TransferOperationExecutionParams`, the ClassCastException will be thrown. + * + * @return The actual instance of `TransferOperationExecutionParams` + * @throws ClassCastException if the instance is not `TransferOperationExecutionParams` + */ + public TransferOperationExecutionParams getTransferOperationExecutionParams() + throws ClassCastException { + return (TransferOperationExecutionParams) 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("&"); + + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CustomCryptoRoutingDest.java b/src/main/java/com/fireblocks/sdk/model/CustomCryptoRoutingDest.java deleted file mode 100644 index 7abea7e..0000000 --- a/src/main/java/com/fireblocks/sdk/model/CustomCryptoRoutingDest.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@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 java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.Objects; -import java.util.StringJoiner; - -/** CustomCryptoRoutingDest */ -@JsonPropertyOrder({ - CustomCryptoRoutingDest.JSON_PROPERTY_SCHEME, - CustomCryptoRoutingDest.JSON_PROPERTY_DST_TYPE, - CustomCryptoRoutingDest.JSON_PROPERTY_DST_ID -}) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CustomCryptoRoutingDest { - /** The network routing logic. */ - public enum SchemeEnum { - CUSTOM("CUSTOM"); - - private String value; - - SchemeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SchemeEnum fromValue(String value) { - for (SchemeEnum b : SchemeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_SCHEME = "scheme"; - private SchemeEnum scheme; - - /** The type of destination account the funds are being sent to. */ - public enum DstTypeEnum { - VAULT("VAULT"), - - EXCHANGE("EXCHANGE"); - - private String value; - - DstTypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static DstTypeEnum fromValue(String value) { - for (DstTypeEnum b : DstTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_DST_TYPE = "dstType"; - private DstTypeEnum dstType; - - public static final String JSON_PROPERTY_DST_ID = "dstId"; - private String dstId; - - public CustomCryptoRoutingDest() {} - - public CustomCryptoRoutingDest scheme(SchemeEnum scheme) { - this.scheme = scheme; - return this; - } - - /** - * The network routing logic. - * - * @return scheme - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_SCHEME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SchemeEnum getScheme() { - return scheme; - } - - @JsonProperty(JSON_PROPERTY_SCHEME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setScheme(SchemeEnum scheme) { - this.scheme = scheme; - } - - public CustomCryptoRoutingDest dstType(DstTypeEnum dstType) { - this.dstType = dstType; - return this; - } - - /** - * The type of destination account the funds are being sent to. - * - * @return dstType - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_DST_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public DstTypeEnum getDstType() { - return dstType; - } - - @JsonProperty(JSON_PROPERTY_DST_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDstType(DstTypeEnum dstType) { - this.dstType = dstType; - } - - public CustomCryptoRoutingDest dstId(String dstId) { - this.dstId = dstId; - return this; - } - - /** - * The ID of the destination account the funds are being sent to. - * - * @return dstId - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_DST_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getDstId() { - return dstId; - } - - @JsonProperty(JSON_PROPERTY_DST_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDstId(String dstId) { - this.dstId = dstId; - } - - /** Return true if this CustomCryptoRoutingDest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CustomCryptoRoutingDest customCryptoRoutingDest = (CustomCryptoRoutingDest) o; - return Objects.equals(this.scheme, customCryptoRoutingDest.scheme) - && Objects.equals(this.dstType, customCryptoRoutingDest.dstType) - && Objects.equals(this.dstId, customCryptoRoutingDest.dstId); - } - - @Override - public int hashCode() { - return Objects.hash(scheme, dstType, dstId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CustomCryptoRoutingDest {\n"); - sb.append(" scheme: ").append(toIndentedString(scheme)).append("\n"); - sb.append(" dstType: ").append(toIndentedString(dstType)).append("\n"); - sb.append(" dstId: ").append(toIndentedString(dstId)).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 `scheme` to the URL query string - if (getScheme() != null) { - joiner.add( - String.format( - "%sscheme%s=%s", - prefix, - suffix, - URLEncoder.encode(String.valueOf(getScheme()), StandardCharsets.UTF_8) - .replaceAll("\\+", "%20"))); - } - - // add `dstType` to the URL query string - if (getDstType() != null) { - joiner.add( - String.format( - "%sdstType%s=%s", - prefix, - suffix, - URLEncoder.encode(String.valueOf(getDstType()), StandardCharsets.UTF_8) - .replaceAll("\\+", "%20"))); - } - - // add `dstId` to the URL query string - if (getDstId() != null) { - joiner.add( - String.format( - "%sdstId%s=%s", - prefix, - suffix, - URLEncoder.encode(String.valueOf(getDstId()), StandardCharsets.UTF_8) - .replaceAll("\\+", "%20"))); - } - - return joiner.toString(); - } -} diff --git a/src/main/java/com/fireblocks/sdk/model/CustomFiatRoutingDest.java b/src/main/java/com/fireblocks/sdk/model/CustomRoutingDest.java similarity index 87% rename from src/main/java/com/fireblocks/sdk/model/CustomFiatRoutingDest.java rename to src/main/java/com/fireblocks/sdk/model/CustomRoutingDest.java index bf3cacf..88a2ca1 100644 --- a/src/main/java/com/fireblocks/sdk/model/CustomFiatRoutingDest.java +++ b/src/main/java/com/fireblocks/sdk/model/CustomRoutingDest.java @@ -23,14 +23,14 @@ import java.util.Objects; import java.util.StringJoiner; -/** CustomFiatRoutingDest */ +/** CustomRoutingDest */ @JsonPropertyOrder({ - CustomFiatRoutingDest.JSON_PROPERTY_SCHEME, - CustomFiatRoutingDest.JSON_PROPERTY_DST_TYPE, - CustomFiatRoutingDest.JSON_PROPERTY_DST_ID + CustomRoutingDest.JSON_PROPERTY_SCHEME, + CustomRoutingDest.JSON_PROPERTY_DST_TYPE, + CustomRoutingDest.JSON_PROPERTY_DST_ID }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CustomFiatRoutingDest { +public class CustomRoutingDest { /** The network routing logic. */ public enum SchemeEnum { CUSTOM("CUSTOM"); @@ -65,9 +65,13 @@ public static SchemeEnum fromValue(String value) { public static final String JSON_PROPERTY_SCHEME = "scheme"; private SchemeEnum scheme; - /** The fiat account the funds are being sent to. */ + /** The account the funds are being sent to. */ public enum DstTypeEnum { - FIAT_ACCOUNT("FIAT_ACCOUNT"); + FIAT_ACCOUNT("FIAT_ACCOUNT"), + + VAULT("VAULT"), + + EXCHANGE("EXCHANGE"); private String value; @@ -102,9 +106,9 @@ public static DstTypeEnum fromValue(String value) { public static final String JSON_PROPERTY_DST_ID = "dstId"; private String dstId; - public CustomFiatRoutingDest() {} + public CustomRoutingDest() {} - public CustomFiatRoutingDest scheme(SchemeEnum scheme) { + public CustomRoutingDest scheme(SchemeEnum scheme) { this.scheme = scheme; return this; } @@ -127,13 +131,13 @@ public void setScheme(SchemeEnum scheme) { this.scheme = scheme; } - public CustomFiatRoutingDest dstType(DstTypeEnum dstType) { + public CustomRoutingDest dstType(DstTypeEnum dstType) { this.dstType = dstType; return this; } /** - * The fiat account the funds are being sent to. + * The account the funds are being sent to. * * @return dstType */ @@ -150,13 +154,13 @@ public void setDstType(DstTypeEnum dstType) { this.dstType = dstType; } - public CustomFiatRoutingDest dstId(String dstId) { + public CustomRoutingDest dstId(String dstId) { this.dstId = dstId; return this; } /** - * The ID of the fiat account the funds are being sent to. + * The ID of the account the funds are being sent to. * * @return dstId */ @@ -173,7 +177,7 @@ public void setDstId(String dstId) { this.dstId = dstId; } - /** Return true if this CustomFiatRoutingDest object is equal to o. */ + /** Return true if this CustomRoutingDest object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -182,10 +186,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CustomFiatRoutingDest customFiatRoutingDest = (CustomFiatRoutingDest) o; - return Objects.equals(this.scheme, customFiatRoutingDest.scheme) - && Objects.equals(this.dstType, customFiatRoutingDest.dstType) - && Objects.equals(this.dstId, customFiatRoutingDest.dstId); + CustomRoutingDest customRoutingDest = (CustomRoutingDest) o; + return Objects.equals(this.scheme, customRoutingDest.scheme) + && Objects.equals(this.dstType, customRoutingDest.dstType) + && Objects.equals(this.dstId, customRoutingDest.dstId); } @Override @@ -196,7 +200,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CustomFiatRoutingDest {\n"); + sb.append("class CustomRoutingDest {\n"); sb.append(" scheme: ").append(toIndentedString(scheme)).append("\n"); sb.append(" dstType: ").append(toIndentedString(dstType)).append("\n"); sb.append(" dstId: ").append(toIndentedString(dstId)).append("\n"); diff --git a/src/main/java/com/fireblocks/sdk/model/DepositFundsFromLinkedDDAResponse.java b/src/main/java/com/fireblocks/sdk/model/DepositFundsFromLinkedDDAResponse.java new file mode 100644 index 0000000..71bbf8f --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DepositFundsFromLinkedDDAResponse.java @@ -0,0 +1,140 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** DepositFundsFromLinkedDDAResponse */ +@JsonPropertyOrder({DepositFundsFromLinkedDDAResponse.JSON_PROPERTY_SUCCESS}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DepositFundsFromLinkedDDAResponse { + public static final String JSON_PROPERTY_SUCCESS = "success"; + private Boolean success; + + public DepositFundsFromLinkedDDAResponse() {} + + public DepositFundsFromLinkedDDAResponse success(Boolean success) { + this.success = success; + return this; + } + + /** + * Indicates whether the funds were successfully deposited from the linked DDA + * + * @return success + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getSuccess() { + return success; + } + + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSuccess(Boolean success) { + this.success = success; + } + + /** Return true if this DepositFundsFromLinkedDDAResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DepositFundsFromLinkedDDAResponse depositFundsFromLinkedDDAResponse = + (DepositFundsFromLinkedDDAResponse) o; + return Objects.equals(this.success, depositFundsFromLinkedDDAResponse.success); + } + + @Override + public int hashCode() { + return Objects.hash(success); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DepositFundsFromLinkedDDAResponse {\n"); + sb.append(" success: ").append(toIndentedString(success)).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 `success` to the URL query string + if (getSuccess() != null) { + joiner.add( + String.format( + "%ssuccess%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSuccess()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicySenTest.java b/src/main/java/com/fireblocks/sdk/model/Destination.java similarity index 55% rename from src/main/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicySenTest.java rename to src/main/java/com/fireblocks/sdk/model/Destination.java index 1ca2394..ced9da1 100644 --- a/src/main/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicySenTest.java +++ b/src/main/java/com/fireblocks/sdk/model/Destination.java @@ -37,219 +37,202 @@ import java.util.logging.Logger; @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonDeserialize( - using = NetworkIdRoutingPolicySenTest.NetworkIdRoutingPolicySenTestDeserializer.class) -@JsonSerialize(using = NetworkIdRoutingPolicySenTest.NetworkIdRoutingPolicySenTestSerializer.class) -public class NetworkIdRoutingPolicySenTest extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(NetworkIdRoutingPolicySenTest.class.getName()); +@JsonDeserialize(using = Destination.DestinationDeserializer.class) +@JsonSerialize(using = Destination.DestinationSerializer.class) +public class Destination extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(Destination.class.getName()); - public static class NetworkIdRoutingPolicySenTestSerializer - extends StdSerializer { - public NetworkIdRoutingPolicySenTestSerializer(Class t) { + public static class DestinationSerializer extends StdSerializer { + public DestinationSerializer(Class t) { super(t); } - public NetworkIdRoutingPolicySenTestSerializer() { + public DestinationSerializer() { this(null); } @Override - public void serialize( - NetworkIdRoutingPolicySenTest value, - JsonGenerator jgen, - SerializerProvider provider) + public void serialize(Destination value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { jgen.writeObject(value.getActualInstance()); } } - public static class NetworkIdRoutingPolicySenTestDeserializer - extends StdDeserializer { - public NetworkIdRoutingPolicySenTestDeserializer() { - this(NetworkIdRoutingPolicySenTest.class); + public static class DestinationDeserializer extends StdDeserializer { + public DestinationDeserializer() { + this(Destination.class); } - public NetworkIdRoutingPolicySenTestDeserializer(Class vc) { + public DestinationDeserializer(Class vc) { super(vc); } @Override - public NetworkIdRoutingPolicySenTest deserialize(JsonParser jp, DeserializationContext ctxt) + public Destination 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 CustomFiatRoutingDest + // deserialize Account try { boolean attemptParsing = true; // ensure that we respect type coercion as set on the client ObjectMapper - if (CustomFiatRoutingDest.class.equals(Integer.class) - || CustomFiatRoutingDest.class.equals(Long.class) - || CustomFiatRoutingDest.class.equals(Float.class) - || CustomFiatRoutingDest.class.equals(Double.class) - || CustomFiatRoutingDest.class.equals(Boolean.class) - || CustomFiatRoutingDest.class.equals(String.class)) { + if (Account.class.equals(Integer.class) + || Account.class.equals(Long.class) + || Account.class.equals(Float.class) + || Account.class.equals(Double.class) + || Account.class.equals(Boolean.class) + || Account.class.equals(String.class)) { attemptParsing = typeCoercion; if (!attemptParsing) { attemptParsing |= - ((CustomFiatRoutingDest.class.equals(Integer.class) - || CustomFiatRoutingDest.class.equals(Long.class)) + ((Account.class.equals(Integer.class) + || Account.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); attemptParsing |= - ((CustomFiatRoutingDest.class.equals(Float.class) - || CustomFiatRoutingDest.class.equals(Double.class)) + ((Account.class.equals(Float.class) + || Account.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); attemptParsing |= - (CustomFiatRoutingDest.class.equals(Boolean.class) + (Account.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); attemptParsing |= - (CustomFiatRoutingDest.class.equals(String.class) + (Account.class.equals(String.class) && token == JsonToken.VALUE_STRING); } } if (attemptParsing) { - deserialized = - tree.traverse(jp.getCodec()).readValueAs(CustomFiatRoutingDest.class); + deserialized = tree.traverse(jp.getCodec()).readValueAs(Account.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 'CustomFiatRoutingDest'"); + log.log(Level.FINER, "Input data matches schema 'Account'"); } } catch (Exception e) { // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'CustomFiatRoutingDest'", e); + log.log(Level.FINER, "Input data does not match schema 'Account'", e); } - // deserialize NoneNetworkRoutingDest + // deserialize OneTimeAddressAccount try { boolean attemptParsing = true; // ensure that we respect type coercion as set on the client ObjectMapper - if (NoneNetworkRoutingDest.class.equals(Integer.class) - || NoneNetworkRoutingDest.class.equals(Long.class) - || NoneNetworkRoutingDest.class.equals(Float.class) - || NoneNetworkRoutingDest.class.equals(Double.class) - || NoneNetworkRoutingDest.class.equals(Boolean.class) - || NoneNetworkRoutingDest.class.equals(String.class)) { + if (OneTimeAddressAccount.class.equals(Integer.class) + || OneTimeAddressAccount.class.equals(Long.class) + || OneTimeAddressAccount.class.equals(Float.class) + || OneTimeAddressAccount.class.equals(Double.class) + || OneTimeAddressAccount.class.equals(Boolean.class) + || OneTimeAddressAccount.class.equals(String.class)) { attemptParsing = typeCoercion; if (!attemptParsing) { attemptParsing |= - ((NoneNetworkRoutingDest.class.equals(Integer.class) - || NoneNetworkRoutingDest.class.equals(Long.class)) + ((OneTimeAddressAccount.class.equals(Integer.class) + || OneTimeAddressAccount.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); attemptParsing |= - ((NoneNetworkRoutingDest.class.equals(Float.class) - || NoneNetworkRoutingDest.class.equals( - Double.class)) + ((OneTimeAddressAccount.class.equals(Float.class) + || OneTimeAddressAccount.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); attemptParsing |= - (NoneNetworkRoutingDest.class.equals(Boolean.class) + (OneTimeAddressAccount.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); attemptParsing |= - (NoneNetworkRoutingDest.class.equals(String.class) + (OneTimeAddressAccount.class.equals(String.class) && token == JsonToken.VALUE_STRING); } } if (attemptParsing) { deserialized = - tree.traverse(jp.getCodec()).readValueAs(NoneNetworkRoutingDest.class); + tree.traverse(jp.getCodec()).readValueAs(OneTimeAddressAccount.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 'NoneNetworkRoutingDest'"); + log.log(Level.FINER, "Input data matches schema 'OneTimeAddressAccount'"); } } catch (Exception e) { // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'NoneNetworkRoutingDest'", - e); + log.log(Level.FINER, "Input data does not match schema 'OneTimeAddressAccount'", e); } if (match == 1) { - NetworkIdRoutingPolicySenTest ret = new NetworkIdRoutingPolicySenTest(); + Destination ret = new Destination(); ret.setActualInstance(deserialized); return ret; } throw new IOException( String.format( - "Failed deserialization for NetworkIdRoutingPolicySenTest: %d classes" - + " match result, expected 1", + "Failed deserialization for Destination: %d classes match result," + + " expected 1", match)); } /** Handle deserialization of the 'null' value. */ @Override - public NetworkIdRoutingPolicySenTest getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "NetworkIdRoutingPolicySenTest cannot be null"); + public Destination getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "Destination cannot be null"); } } // store a list of schema names defined in oneOf public static final Map> schemas = new HashMap<>(); - public NetworkIdRoutingPolicySenTest() { + public Destination() { super("oneOf", Boolean.FALSE); } - public NetworkIdRoutingPolicySenTest(CustomFiatRoutingDest o) { + public Destination(Account o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } - public NetworkIdRoutingPolicySenTest(NoneNetworkRoutingDest o) { + public Destination(OneTimeAddressAccount o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } static { - schemas.put("CustomFiatRoutingDest", CustomFiatRoutingDest.class); - schemas.put("NoneNetworkRoutingDest", NoneNetworkRoutingDest.class); - JSON.registerDescendants( - NetworkIdRoutingPolicySenTest.class, Collections.unmodifiableMap(schemas)); + schemas.put("Account", Account.class); + schemas.put("OneTimeAddressAccount", OneTimeAddressAccount.class); + JSON.registerDescendants(Destination.class, Collections.unmodifiableMap(schemas)); } @Override public Map> getSchemas() { - return NetworkIdRoutingPolicySenTest.schemas; + return Destination.schemas; } /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: CustomFiatRoutingDest, NoneNetworkRoutingDest + * against the oneOf child schemas: Account, OneTimeAddressAccount * *

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(CustomFiatRoutingDest.class, instance, new HashSet>())) { + if (JSON.isInstanceOf(Account.class, instance, new HashSet>())) { super.setActualInstance(instance); return; } - if (JSON.isInstanceOf(NoneNetworkRoutingDest.class, instance, new HashSet>())) { + if (JSON.isInstanceOf(OneTimeAddressAccount.class, instance, new HashSet>())) { super.setActualInstance(instance); return; } - throw new RuntimeException( - "Invalid instance type. Must be CustomFiatRoutingDest, NoneNetworkRoutingDest"); + throw new RuntimeException("Invalid instance type. Must be Account, OneTimeAddressAccount"); } /** - * Get the actual instance, which can be the following: CustomFiatRoutingDest, - * NoneNetworkRoutingDest + * Get the actual instance, which can be the following: Account, OneTimeAddressAccount * - * @return The actual instance (CustomFiatRoutingDest, NoneNetworkRoutingDest) + * @return The actual instance (Account, OneTimeAddressAccount) */ @Override public Object getActualInstance() { @@ -257,25 +240,25 @@ public Object getActualInstance() { } /** - * Get the actual instance of `CustomFiatRoutingDest`. If the actual instance is not - * `CustomFiatRoutingDest`, the ClassCastException will be thrown. + * Get the actual instance of `Account`. If the actual instance is not `Account`, the + * ClassCastException will be thrown. * - * @return The actual instance of `CustomFiatRoutingDest` - * @throws ClassCastException if the instance is not `CustomFiatRoutingDest` + * @return The actual instance of `Account` + * @throws ClassCastException if the instance is not `Account` */ - public CustomFiatRoutingDest getCustomFiatRoutingDest() throws ClassCastException { - return (CustomFiatRoutingDest) super.getActualInstance(); + public Account getAccount() throws ClassCastException { + return (Account) super.getActualInstance(); } /** - * Get the actual instance of `NoneNetworkRoutingDest`. If the actual instance is not - * `NoneNetworkRoutingDest`, the ClassCastException will be thrown. + * Get the actual instance of `OneTimeAddressAccount`. If the actual instance is not + * `OneTimeAddressAccount`, the ClassCastException will be thrown. * - * @return The actual instance of `NoneNetworkRoutingDest` - * @throws ClassCastException if the instance is not `NoneNetworkRoutingDest` + * @return The actual instance of `OneTimeAddressAccount` + * @throws ClassCastException if the instance is not `OneTimeAddressAccount` */ - public NoneNetworkRoutingDest getNoneNetworkRoutingDest() throws ClassCastException { - return (NoneNetworkRoutingDest) super.getActualInstance(); + public OneTimeAddressAccount getOneTimeAddressAccount() throws ClassCastException { + return (OneTimeAddressAccount) super.getActualInstance(); } /** @@ -310,18 +293,18 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - if (getActualInstance() instanceof NoneNetworkRoutingDest) { + if (getActualInstance() instanceof Account) { if (getActualInstance() != null) { joiner.add( - ((NoneNetworkRoutingDest) getActualInstance()) + ((Account) getActualInstance()) .toUrlQueryString(prefix + "one_of_0" + suffix)); } return joiner.toString(); } - if (getActualInstance() instanceof CustomFiatRoutingDest) { + if (getActualInstance() instanceof OneTimeAddressAccount) { if (getActualInstance() != null) { joiner.add( - ((CustomFiatRoutingDest) getActualInstance()) + ((OneTimeAddressAccount) getActualInstance()) .toUrlQueryString(prefix + "one_of_1" + suffix)); } return joiner.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/DisbursementAmountInstruction.java b/src/main/java/com/fireblocks/sdk/model/DisbursementAmountInstruction.java new file mode 100644 index 0000000..67dc6d3 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DisbursementAmountInstruction.java @@ -0,0 +1,216 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** DisbursementAmountInstruction */ +@JsonPropertyOrder({ + DisbursementAmountInstruction.JSON_PROPERTY_PAYEE_ACCOUNT, + DisbursementAmountInstruction.JSON_PROPERTY_ASSET_ID, + DisbursementAmountInstruction.JSON_PROPERTY_AMOUNT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DisbursementAmountInstruction { + public static final String JSON_PROPERTY_PAYEE_ACCOUNT = "payeeAccount"; + private Destination payeeAccount; + + public static final String JSON_PROPERTY_ASSET_ID = "assetId"; + private String assetId; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private String amount; + + public DisbursementAmountInstruction() {} + + public DisbursementAmountInstruction payeeAccount(Destination payeeAccount) { + this.payeeAccount = payeeAccount; + return this; + } + + /** + * Get payeeAccount + * + * @return payeeAccount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAYEE_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Destination getPayeeAccount() { + return payeeAccount; + } + + @JsonProperty(JSON_PROPERTY_PAYEE_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPayeeAccount(Destination payeeAccount) { + this.payeeAccount = payeeAccount; + } + + public DisbursementAmountInstruction assetId(String assetId) { + this.assetId = assetId; + return this; + } + + /** + * Get assetId + * + * @return assetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAssetId() { + return assetId; + } + + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAssetId(String assetId) { + this.assetId = assetId; + } + + public DisbursementAmountInstruction amount(String amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * + * @return amount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(String amount) { + this.amount = amount; + } + + /** Return true if this DisbursementAmountInstruction object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisbursementAmountInstruction disbursementAmountInstruction = + (DisbursementAmountInstruction) o; + return Objects.equals(this.payeeAccount, disbursementAmountInstruction.payeeAccount) + && Objects.equals(this.assetId, disbursementAmountInstruction.assetId) + && Objects.equals(this.amount, disbursementAmountInstruction.amount); + } + + @Override + public int hashCode() { + return Objects.hash(payeeAccount, assetId, amount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisbursementAmountInstruction {\n"); + sb.append(" payeeAccount: ").append(toIndentedString(payeeAccount)).append("\n"); + sb.append(" assetId: ").append(toIndentedString(assetId)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).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 `payeeAccount` to the URL query string + if (getPayeeAccount() != null) { + joiner.add(getPayeeAccount().toUrlQueryString(prefix + "payeeAccount" + suffix)); + } + + // add `assetId` to the URL query string + if (getAssetId() != null) { + joiner.add( + String.format( + "%sassetId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAssetId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add( + String.format( + "%samount%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DisbursementConfigOperation.java b/src/main/java/com/fireblocks/sdk/model/DisbursementConfigOperation.java new file mode 100644 index 0000000..8cb78d2 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DisbursementConfigOperation.java @@ -0,0 +1,296 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** DisbursementConfigOperation */ +@JsonPropertyOrder({ + DisbursementConfigOperation.JSON_PROPERTY_OPERATION_ID, + DisbursementConfigOperation.JSON_PROPERTY_TYPE, + DisbursementConfigOperation.JSON_PROPERTY_PARAMS, + DisbursementConfigOperation.JSON_PROPERTY_STATUS, + DisbursementConfigOperation.JSON_PROPERTY_VALIDATION_FAILURE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DisbursementConfigOperation { + public static final String JSON_PROPERTY_OPERATION_ID = "operationId"; + private String operationId; + + public static final String JSON_PROPERTY_TYPE = "type"; + private DisbursementOperationType type; + + public static final String JSON_PROPERTY_PARAMS = "params"; + private DisbursementOperationConfigParams params; + + public static final String JSON_PROPERTY_STATUS = "status"; + private ConfigOperationStatus status; + + public static final String JSON_PROPERTY_VALIDATION_FAILURE = "validationFailure"; + private DisbursementValidationFailure validationFailure; + + public DisbursementConfigOperation() {} + + public DisbursementConfigOperation operationId(String operationId) { + this.operationId = operationId; + return this; + } + + /** + * Get operationId + * + * @return operationId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOperationId() { + return operationId; + } + + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOperationId(String operationId) { + this.operationId = operationId; + } + + public DisbursementConfigOperation type(DisbursementOperationType type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DisbursementOperationType getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(DisbursementOperationType type) { + this.type = type; + } + + public DisbursementConfigOperation params(DisbursementOperationConfigParams params) { + this.params = params; + return this; + } + + /** + * Get params + * + * @return params + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DisbursementOperationConfigParams getParams() { + return params; + } + + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setParams(DisbursementOperationConfigParams params) { + this.params = params; + } + + public DisbursementConfigOperation status(ConfigOperationStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConfigOperationStatus getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(ConfigOperationStatus status) { + this.status = status; + } + + public DisbursementConfigOperation validationFailure( + DisbursementValidationFailure validationFailure) { + this.validationFailure = validationFailure; + return this; + } + + /** + * Get validationFailure + * + * @return validationFailure + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALIDATION_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DisbursementValidationFailure getValidationFailure() { + return validationFailure; + } + + @JsonProperty(JSON_PROPERTY_VALIDATION_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValidationFailure(DisbursementValidationFailure validationFailure) { + this.validationFailure = validationFailure; + } + + /** Return true if this DisbursementConfigOperation object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisbursementConfigOperation disbursementConfigOperation = (DisbursementConfigOperation) o; + return Objects.equals(this.operationId, disbursementConfigOperation.operationId) + && Objects.equals(this.type, disbursementConfigOperation.type) + && Objects.equals(this.params, disbursementConfigOperation.params) + && Objects.equals(this.status, disbursementConfigOperation.status) + && Objects.equals( + this.validationFailure, disbursementConfigOperation.validationFailure); + } + + @Override + public int hashCode() { + return Objects.hash(operationId, type, params, status, validationFailure); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisbursementConfigOperation {\n"); + sb.append(" operationId: ").append(toIndentedString(operationId)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" params: ").append(toIndentedString(params)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" validationFailure: ") + .append(toIndentedString(validationFailure)) + .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 `operationId` to the URL query string + if (getOperationId() != null) { + joiner.add( + String.format( + "%soperationId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getOperationId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `params` to the URL query string + if (getParams() != null) { + joiner.add(getParams().toUrlQueryString(prefix + "params" + suffix)); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `validationFailure` to the URL query string + if (getValidationFailure() != null) { + joiner.add( + getValidationFailure().toUrlQueryString(prefix + "validationFailure" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DisbursementInstruction.java b/src/main/java/com/fireblocks/sdk/model/DisbursementInstruction.java new file mode 100644 index 0000000..12b7d03 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DisbursementInstruction.java @@ -0,0 +1,346 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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") +@JsonDeserialize(using = DisbursementInstruction.DisbursementInstructionDeserializer.class) +@JsonSerialize(using = DisbursementInstruction.DisbursementInstructionSerializer.class) +public class DisbursementInstruction extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(DisbursementInstruction.class.getName()); + + public static class DisbursementInstructionSerializer + extends StdSerializer { + public DisbursementInstructionSerializer(Class t) { + super(t); + } + + public DisbursementInstructionSerializer() { + this(null); + } + + @Override + public void serialize( + DisbursementInstruction value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class DisbursementInstructionDeserializer + extends StdDeserializer { + public DisbursementInstructionDeserializer() { + this(DisbursementInstruction.class); + } + + public DisbursementInstructionDeserializer(Class vc) { + super(vc); + } + + @Override + public DisbursementInstruction 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 DisbursementAmountInstruction + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DisbursementAmountInstruction.class.equals(Integer.class) + || DisbursementAmountInstruction.class.equals(Long.class) + || DisbursementAmountInstruction.class.equals(Float.class) + || DisbursementAmountInstruction.class.equals(Double.class) + || DisbursementAmountInstruction.class.equals(Boolean.class) + || DisbursementAmountInstruction.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((DisbursementAmountInstruction.class.equals(Integer.class) + || DisbursementAmountInstruction.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((DisbursementAmountInstruction.class.equals(Float.class) + || DisbursementAmountInstruction.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (DisbursementAmountInstruction.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (DisbursementAmountInstruction.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(DisbursementAmountInstruction.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 'DisbursementAmountInstruction'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'DisbursementAmountInstruction'", + e); + } + + // deserialize DisbursementPercentageInstruction + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DisbursementPercentageInstruction.class.equals(Integer.class) + || DisbursementPercentageInstruction.class.equals(Long.class) + || DisbursementPercentageInstruction.class.equals(Float.class) + || DisbursementPercentageInstruction.class.equals(Double.class) + || DisbursementPercentageInstruction.class.equals(Boolean.class) + || DisbursementPercentageInstruction.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((DisbursementPercentageInstruction.class.equals(Integer.class) + || DisbursementPercentageInstruction.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((DisbursementPercentageInstruction.class.equals(Float.class) + || DisbursementPercentageInstruction.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (DisbursementPercentageInstruction.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (DisbursementPercentageInstruction.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(DisbursementPercentageInstruction.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 'DisbursementPercentageInstruction'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'DisbursementPercentageInstruction'", + e); + } + + if (match == 1) { + DisbursementInstruction ret = new DisbursementInstruction(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for DisbursementInstruction: %d classes match" + + " result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public DisbursementInstruction getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "DisbursementInstruction cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public DisbursementInstruction() { + super("oneOf", Boolean.FALSE); + } + + public DisbursementInstruction(DisbursementAmountInstruction o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public DisbursementInstruction(DisbursementPercentageInstruction o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("DisbursementAmountInstruction", DisbursementAmountInstruction.class); + schemas.put("DisbursementPercentageInstruction", DisbursementPercentageInstruction.class); + JSON.registerDescendants( + DisbursementInstruction.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return DisbursementInstruction.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: DisbursementAmountInstruction, + * DisbursementPercentageInstruction + * + *

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( + DisbursementAmountInstruction.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + DisbursementPercentageInstruction.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be DisbursementAmountInstruction," + + " DisbursementPercentageInstruction"); + } + + /** + * Get the actual instance, which can be the following: DisbursementAmountInstruction, + * DisbursementPercentageInstruction + * + * @return The actual instance (DisbursementAmountInstruction, + * DisbursementPercentageInstruction) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `DisbursementAmountInstruction`. If the actual instance is not + * `DisbursementAmountInstruction`, the ClassCastException will be thrown. + * + * @return The actual instance of `DisbursementAmountInstruction` + * @throws ClassCastException if the instance is not `DisbursementAmountInstruction` + */ + public DisbursementAmountInstruction getDisbursementAmountInstruction() + throws ClassCastException { + return (DisbursementAmountInstruction) super.getActualInstance(); + } + + /** + * Get the actual instance of `DisbursementPercentageInstruction`. If the actual instance is not + * `DisbursementPercentageInstruction`, the ClassCastException will be thrown. + * + * @return The actual instance of `DisbursementPercentageInstruction` + * @throws ClassCastException if the instance is not `DisbursementPercentageInstruction` + */ + public DisbursementPercentageInstruction getDisbursementPercentageInstruction() + throws ClassCastException { + return (DisbursementPercentageInstruction) 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 DisbursementAmountInstruction) { + if (getActualInstance() != null) { + joiner.add( + ((DisbursementAmountInstruction) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof DisbursementPercentageInstruction) { + if (getActualInstance() != null) { + joiner.add( + ((DisbursementPercentageInstruction) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DisbursementInstructionOutput.java b/src/main/java/com/fireblocks/sdk/model/DisbursementInstructionOutput.java new file mode 100644 index 0000000..a7d5ac1 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DisbursementInstructionOutput.java @@ -0,0 +1,202 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.util.Objects; +import java.util.StringJoiner; + +/** DisbursementInstructionOutput */ +@JsonPropertyOrder({ + DisbursementInstructionOutput.JSON_PROPERTY_AMOUNT, + DisbursementInstructionOutput.JSON_PROPERTY_FEE, + DisbursementInstructionOutput.JSON_PROPERTY_PAYEE_ACCOUNT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DisbursementInstructionOutput { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private AssetAmount amount; + + public static final String JSON_PROPERTY_FEE = "fee"; + private AssetAmount fee; + + public static final String JSON_PROPERTY_PAYEE_ACCOUNT = "payeeAccount"; + private Destination payeeAccount; + + public DisbursementInstructionOutput() {} + + public DisbursementInstructionOutput amount(AssetAmount amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * + * @return amount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetAmount getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(AssetAmount amount) { + this.amount = amount; + } + + public DisbursementInstructionOutput fee(AssetAmount fee) { + this.fee = fee; + return this; + } + + /** + * Get fee + * + * @return fee + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetAmount getFee() { + return fee; + } + + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFee(AssetAmount fee) { + this.fee = fee; + } + + public DisbursementInstructionOutput payeeAccount(Destination payeeAccount) { + this.payeeAccount = payeeAccount; + return this; + } + + /** + * Get payeeAccount + * + * @return payeeAccount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAYEE_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Destination getPayeeAccount() { + return payeeAccount; + } + + @JsonProperty(JSON_PROPERTY_PAYEE_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPayeeAccount(Destination payeeAccount) { + this.payeeAccount = payeeAccount; + } + + /** Return true if this DisbursementInstructionOutput object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisbursementInstructionOutput disbursementInstructionOutput = + (DisbursementInstructionOutput) o; + return Objects.equals(this.amount, disbursementInstructionOutput.amount) + && Objects.equals(this.fee, disbursementInstructionOutput.fee) + && Objects.equals(this.payeeAccount, disbursementInstructionOutput.payeeAccount); + } + + @Override + public int hashCode() { + return Objects.hash(amount, fee, payeeAccount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisbursementInstructionOutput {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); + sb.append(" payeeAccount: ").append(toIndentedString(payeeAccount)).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 `amount` to the URL query string + if (getAmount() != null) { + joiner.add(getAmount().toUrlQueryString(prefix + "amount" + suffix)); + } + + // add `fee` to the URL query string + if (getFee() != null) { + joiner.add(getFee().toUrlQueryString(prefix + "fee" + suffix)); + } + + // add `payeeAccount` to the URL query string + if (getPayeeAccount() != null) { + joiner.add(getPayeeAccount().toUrlQueryString(prefix + "payeeAccount" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DisbursementOperationConfigParams.java b/src/main/java/com/fireblocks/sdk/model/DisbursementOperationConfigParams.java new file mode 100644 index 0000000..35defc8 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DisbursementOperationConfigParams.java @@ -0,0 +1,199 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** DisbursementOperationConfigParams */ +@JsonPropertyOrder({ + DisbursementOperationConfigParams.JSON_PROPERTY_PAYMENT_ACCOUNT, + DisbursementOperationConfigParams.JSON_PROPERTY_INSTRUCTION_SET +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DisbursementOperationConfigParams { + public static final String JSON_PROPERTY_PAYMENT_ACCOUNT = "paymentAccount"; + private Account paymentAccount; + + public static final String JSON_PROPERTY_INSTRUCTION_SET = "instructionSet"; + private List instructionSet = new ArrayList<>(); + + public DisbursementOperationConfigParams() {} + + public DisbursementOperationConfigParams paymentAccount(Account paymentAccount) { + this.paymentAccount = paymentAccount; + return this; + } + + /** + * Get paymentAccount + * + * @return paymentAccount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAYMENT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Account getPaymentAccount() { + return paymentAccount; + } + + @JsonProperty(JSON_PROPERTY_PAYMENT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaymentAccount(Account paymentAccount) { + this.paymentAccount = paymentAccount; + } + + public DisbursementOperationConfigParams instructionSet( + List instructionSet) { + this.instructionSet = instructionSet; + return this; + } + + public DisbursementOperationConfigParams addInstructionSetItem( + DisbursementInstruction instructionSetItem) { + if (this.instructionSet == null) { + this.instructionSet = new ArrayList<>(); + } + this.instructionSet.add(instructionSetItem); + return this; + } + + /** + * Get instructionSet + * + * @return instructionSet + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INSTRUCTION_SET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getInstructionSet() { + return instructionSet; + } + + @JsonProperty(JSON_PROPERTY_INSTRUCTION_SET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInstructionSet(List instructionSet) { + this.instructionSet = instructionSet; + } + + /** Return true if this DisbursementOperationConfigParams object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisbursementOperationConfigParams disbursementOperationConfigParams = + (DisbursementOperationConfigParams) o; + return Objects.equals(this.paymentAccount, disbursementOperationConfigParams.paymentAccount) + && Objects.equals( + this.instructionSet, disbursementOperationConfigParams.instructionSet); + } + + @Override + public int hashCode() { + return Objects.hash(paymentAccount, instructionSet); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisbursementOperationConfigParams {\n"); + sb.append(" paymentAccount: ").append(toIndentedString(paymentAccount)).append("\n"); + sb.append(" instructionSet: ").append(toIndentedString(instructionSet)).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 `paymentAccount` to the URL query string + if (getPaymentAccount() != null) { + joiner.add(getPaymentAccount().toUrlQueryString(prefix + "paymentAccount" + suffix)); + } + + // add `instructionSet` to the URL query string + if (getInstructionSet() != null) { + for (int i = 0; i < getInstructionSet().size(); i++) { + if (getInstructionSet().get(i) != null) { + joiner.add( + getInstructionSet() + .get(i) + .toUrlQueryString( + String.format( + "%sinstructionSet%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/DisbursementOperationExecution.java b/src/main/java/com/fireblocks/sdk/model/DisbursementOperationExecution.java new file mode 100644 index 0000000..f4afb91 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DisbursementOperationExecution.java @@ -0,0 +1,327 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** DisbursementOperationExecution */ +@JsonPropertyOrder({ + DisbursementOperationExecution.JSON_PROPERTY_INPUT, + DisbursementOperationExecution.JSON_PROPERTY_OUTPUT, + DisbursementOperationExecution.JSON_PROPERTY_PAYOUT_ID, + DisbursementOperationExecution.JSON_PROPERTY_STARTED_AT, + DisbursementOperationExecution.JSON_PROPERTY_FINISHED_AT, + DisbursementOperationExecution.JSON_PROPERTY_FAILURE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DisbursementOperationExecution { + public static final String JSON_PROPERTY_INPUT = "input"; + private DisbursementOperationInput input; + + public static final String JSON_PROPERTY_OUTPUT = "output"; + private DisbursementOperationExecutionOutput output; + + public static final String JSON_PROPERTY_PAYOUT_ID = "payoutId"; + private String payoutId; + + public static final String JSON_PROPERTY_STARTED_AT = "startedAt"; + private BigDecimal startedAt; + + public static final String JSON_PROPERTY_FINISHED_AT = "finishedAt"; + private BigDecimal finishedAt; + + public static final String JSON_PROPERTY_FAILURE = "failure"; + private OperationExecutionFailure failure; + + public DisbursementOperationExecution() {} + + public DisbursementOperationExecution input(DisbursementOperationInput input) { + this.input = input; + return this; + } + + /** + * Get input + * + * @return input + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DisbursementOperationInput getInput() { + return input; + } + + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInput(DisbursementOperationInput input) { + this.input = input; + } + + public DisbursementOperationExecution output(DisbursementOperationExecutionOutput output) { + this.output = output; + return this; + } + + /** + * Get output + * + * @return output + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DisbursementOperationExecutionOutput getOutput() { + return output; + } + + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOutput(DisbursementOperationExecutionOutput output) { + this.output = output; + } + + public DisbursementOperationExecution payoutId(String payoutId) { + this.payoutId = payoutId; + return this; + } + + /** + * Get payoutId + * + * @return payoutId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAYOUT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPayoutId() { + return payoutId; + } + + @JsonProperty(JSON_PROPERTY_PAYOUT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutId(String payoutId) { + this.payoutId = payoutId; + } + + public DisbursementOperationExecution startedAt(BigDecimal startedAt) { + this.startedAt = startedAt; + return this; + } + + /** + * Get startedAt + * + * @return startedAt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getStartedAt() { + return startedAt; + } + + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStartedAt(BigDecimal startedAt) { + this.startedAt = startedAt; + } + + public DisbursementOperationExecution finishedAt(BigDecimal finishedAt) { + this.finishedAt = finishedAt; + return this; + } + + /** + * Get finishedAt + * + * @return finishedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FINISHED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getFinishedAt() { + return finishedAt; + } + + @JsonProperty(JSON_PROPERTY_FINISHED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFinishedAt(BigDecimal finishedAt) { + this.finishedAt = finishedAt; + } + + public DisbursementOperationExecution failure(OperationExecutionFailure failure) { + this.failure = failure; + return this; + } + + /** + * Get failure + * + * @return failure + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OperationExecutionFailure getFailure() { + return failure; + } + + @JsonProperty(JSON_PROPERTY_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFailure(OperationExecutionFailure failure) { + this.failure = failure; + } + + /** Return true if this DisbursementOperationExecution object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisbursementOperationExecution disbursementOperationExecution = + (DisbursementOperationExecution) o; + return Objects.equals(this.input, disbursementOperationExecution.input) + && Objects.equals(this.output, disbursementOperationExecution.output) + && Objects.equals(this.payoutId, disbursementOperationExecution.payoutId) + && Objects.equals(this.startedAt, disbursementOperationExecution.startedAt) + && Objects.equals(this.finishedAt, disbursementOperationExecution.finishedAt) + && Objects.equals(this.failure, disbursementOperationExecution.failure); + } + + @Override + public int hashCode() { + return Objects.hash(input, output, payoutId, startedAt, finishedAt, failure); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisbursementOperationExecution {\n"); + sb.append(" input: ").append(toIndentedString(input)).append("\n"); + sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append(" payoutId: ").append(toIndentedString(payoutId)).append("\n"); + sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); + sb.append(" finishedAt: ").append(toIndentedString(finishedAt)).append("\n"); + sb.append(" failure: ").append(toIndentedString(failure)).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 `input` to the URL query string + if (getInput() != null) { + joiner.add(getInput().toUrlQueryString(prefix + "input" + suffix)); + } + + // add `output` to the URL query string + if (getOutput() != null) { + joiner.add(getOutput().toUrlQueryString(prefix + "output" + suffix)); + } + + // add `payoutId` to the URL query string + if (getPayoutId() != null) { + joiner.add( + String.format( + "%spayoutId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getPayoutId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `startedAt` to the URL query string + if (getStartedAt() != null) { + joiner.add( + String.format( + "%sstartedAt%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getStartedAt()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `finishedAt` to the URL query string + if (getFinishedAt() != null) { + joiner.add( + String.format( + "%sfinishedAt%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getFinishedAt()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `failure` to the URL query string + if (getFailure() != null) { + joiner.add(getFailure().toUrlQueryString(prefix + "failure" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DisbursementOperationExecutionOutput.java b/src/main/java/com/fireblocks/sdk/model/DisbursementOperationExecutionOutput.java new file mode 100644 index 0000000..e05974c --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DisbursementOperationExecutionOutput.java @@ -0,0 +1,163 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** DisbursementOperationExecutionOutput */ +@JsonPropertyOrder({DisbursementOperationExecutionOutput.JSON_PROPERTY_INSTRUCTION_SET}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DisbursementOperationExecutionOutput { + public static final String JSON_PROPERTY_INSTRUCTION_SET = "instructionSet"; + private List instructionSet = new ArrayList<>(); + + public DisbursementOperationExecutionOutput() {} + + public DisbursementOperationExecutionOutput instructionSet( + List instructionSet) { + this.instructionSet = instructionSet; + return this; + } + + public DisbursementOperationExecutionOutput addInstructionSetItem( + DisbursementInstructionOutput instructionSetItem) { + if (this.instructionSet == null) { + this.instructionSet = new ArrayList<>(); + } + this.instructionSet.add(instructionSetItem); + return this; + } + + /** + * Get instructionSet + * + * @return instructionSet + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INSTRUCTION_SET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getInstructionSet() { + return instructionSet; + } + + @JsonProperty(JSON_PROPERTY_INSTRUCTION_SET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInstructionSet(List instructionSet) { + this.instructionSet = instructionSet; + } + + /** Return true if this DisbursementOperationExecutionOutput object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisbursementOperationExecutionOutput disbursementOperationExecutionOutput = + (DisbursementOperationExecutionOutput) o; + return Objects.equals( + this.instructionSet, disbursementOperationExecutionOutput.instructionSet); + } + + @Override + public int hashCode() { + return Objects.hash(instructionSet); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisbursementOperationExecutionOutput {\n"); + sb.append(" instructionSet: ").append(toIndentedString(instructionSet)).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 `instructionSet` to the URL query string + if (getInstructionSet() != null) { + for (int i = 0; i < getInstructionSet().size(); i++) { + if (getInstructionSet().get(i) != null) { + joiner.add( + getInstructionSet() + .get(i) + .toUrlQueryString( + String.format( + "%sinstructionSet%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/DisbursementOperationExecutionParams.java b/src/main/java/com/fireblocks/sdk/model/DisbursementOperationExecutionParams.java new file mode 100644 index 0000000..b25c908 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DisbursementOperationExecutionParams.java @@ -0,0 +1,185 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** DisbursementOperationExecutionParams */ +@JsonPropertyOrder({ + DisbursementOperationExecutionParams.JSON_PROPERTY_CONFIG_OPERATION_ID, + DisbursementOperationExecutionParams.JSON_PROPERTY_EXECUTION_PARAMS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DisbursementOperationExecutionParams { + public static final String JSON_PROPERTY_CONFIG_OPERATION_ID = "configOperationId"; + private String configOperationId; + + public static final String JSON_PROPERTY_EXECUTION_PARAMS = "executionParams"; + private DisbursementOperationExecutionParamsExecutionParams executionParams; + + public DisbursementOperationExecutionParams() {} + + public DisbursementOperationExecutionParams configOperationId(String configOperationId) { + this.configOperationId = configOperationId; + return this; + } + + /** + * Get configOperationId + * + * @return configOperationId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIG_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConfigOperationId() { + return configOperationId; + } + + @JsonProperty(JSON_PROPERTY_CONFIG_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setConfigOperationId(String configOperationId) { + this.configOperationId = configOperationId; + } + + public DisbursementOperationExecutionParams executionParams( + DisbursementOperationExecutionParamsExecutionParams executionParams) { + this.executionParams = executionParams; + return this; + } + + /** + * Get executionParams + * + * @return executionParams + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DisbursementOperationExecutionParamsExecutionParams getExecutionParams() { + return executionParams; + } + + @JsonProperty(JSON_PROPERTY_EXECUTION_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutionParams( + DisbursementOperationExecutionParamsExecutionParams executionParams) { + this.executionParams = executionParams; + } + + /** Return true if this DisbursementOperationExecutionParams object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisbursementOperationExecutionParams disbursementOperationExecutionParams = + (DisbursementOperationExecutionParams) o; + return Objects.equals( + this.configOperationId, + disbursementOperationExecutionParams.configOperationId) + && Objects.equals( + this.executionParams, disbursementOperationExecutionParams.executionParams); + } + + @Override + public int hashCode() { + return Objects.hash(configOperationId, executionParams); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisbursementOperationExecutionParams {\n"); + sb.append(" configOperationId: ") + .append(toIndentedString(configOperationId)) + .append("\n"); + sb.append(" executionParams: ").append(toIndentedString(executionParams)).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 `configOperationId` to the URL query string + if (getConfigOperationId() != null) { + joiner.add( + String.format( + "%sconfigOperationId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getConfigOperationId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `executionParams` to the URL query string + if (getExecutionParams() != null) { + joiner.add(getExecutionParams().toUrlQueryString(prefix + "executionParams" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DisbursementOperationExecutionParamsExecutionParams.java b/src/main/java/com/fireblocks/sdk/model/DisbursementOperationExecutionParamsExecutionParams.java new file mode 100644 index 0000000..dc7ca82 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DisbursementOperationExecutionParamsExecutionParams.java @@ -0,0 +1,250 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** DisbursementOperationExecutionParamsExecutionParams */ +@JsonPropertyOrder({ + DisbursementOperationExecutionParamsExecutionParams.JSON_PROPERTY_AMOUNT, + DisbursementOperationExecutionParamsExecutionParams.JSON_PROPERTY_PAYMENT_ACCOUNT, + DisbursementOperationExecutionParamsExecutionParams.JSON_PROPERTY_INSTRUCTION_SET +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DisbursementOperationExecutionParamsExecutionParams { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private String amount; + + public static final String JSON_PROPERTY_PAYMENT_ACCOUNT = "paymentAccount"; + private Account paymentAccount; + + public static final String JSON_PROPERTY_INSTRUCTION_SET = "instructionSet"; + private List instructionSet; + + public DisbursementOperationExecutionParamsExecutionParams() {} + + public DisbursementOperationExecutionParamsExecutionParams amount(String amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * + * @return amount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAmount(String amount) { + this.amount = amount; + } + + public DisbursementOperationExecutionParamsExecutionParams paymentAccount( + Account paymentAccount) { + this.paymentAccount = paymentAccount; + return this; + } + + /** + * Get paymentAccount + * + * @return paymentAccount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAYMENT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Account getPaymentAccount() { + return paymentAccount; + } + + @JsonProperty(JSON_PROPERTY_PAYMENT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaymentAccount(Account paymentAccount) { + this.paymentAccount = paymentAccount; + } + + public DisbursementOperationExecutionParamsExecutionParams instructionSet( + List instructionSet) { + this.instructionSet = instructionSet; + return this; + } + + public DisbursementOperationExecutionParamsExecutionParams addInstructionSetItem( + DisbursementInstruction instructionSetItem) { + if (this.instructionSet == null) { + this.instructionSet = new ArrayList<>(); + } + this.instructionSet.add(instructionSetItem); + return this; + } + + /** + * Get instructionSet + * + * @return instructionSet + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INSTRUCTION_SET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getInstructionSet() { + return instructionSet; + } + + @JsonProperty(JSON_PROPERTY_INSTRUCTION_SET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInstructionSet(List instructionSet) { + this.instructionSet = instructionSet; + } + + /** + * Return true if this DisbursementOperationExecutionParams_executionParams object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisbursementOperationExecutionParamsExecutionParams + disbursementOperationExecutionParamsExecutionParams = + (DisbursementOperationExecutionParamsExecutionParams) o; + return Objects.equals( + this.amount, disbursementOperationExecutionParamsExecutionParams.amount) + && Objects.equals( + this.paymentAccount, + disbursementOperationExecutionParamsExecutionParams.paymentAccount) + && Objects.equals( + this.instructionSet, + disbursementOperationExecutionParamsExecutionParams.instructionSet); + } + + @Override + public int hashCode() { + return Objects.hash(amount, paymentAccount, instructionSet); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisbursementOperationExecutionParamsExecutionParams {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" paymentAccount: ").append(toIndentedString(paymentAccount)).append("\n"); + sb.append(" instructionSet: ").append(toIndentedString(instructionSet)).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 `amount` to the URL query string + if (getAmount() != null) { + joiner.add( + String.format( + "%samount%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `paymentAccount` to the URL query string + if (getPaymentAccount() != null) { + joiner.add(getPaymentAccount().toUrlQueryString(prefix + "paymentAccount" + suffix)); + } + + // add `instructionSet` to the URL query string + if (getInstructionSet() != null) { + for (int i = 0; i < getInstructionSet().size(); i++) { + if (getInstructionSet().get(i) != null) { + joiner.add( + getInstructionSet() + .get(i) + .toUrlQueryString( + String.format( + "%sinstructionSet%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/DisbursementOperationInput.java b/src/main/java/com/fireblocks/sdk/model/DisbursementOperationInput.java new file mode 100644 index 0000000..ff0dce0 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DisbursementOperationInput.java @@ -0,0 +1,238 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** DisbursementOperationInput */ +@JsonPropertyOrder({ + DisbursementOperationInput.JSON_PROPERTY_AMOUNT, + DisbursementOperationInput.JSON_PROPERTY_PAYMENT_ACCOUNT, + DisbursementOperationInput.JSON_PROPERTY_INSTRUCTION_SET +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DisbursementOperationInput { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private String amount; + + public static final String JSON_PROPERTY_PAYMENT_ACCOUNT = "paymentAccount"; + private Account paymentAccount; + + public static final String JSON_PROPERTY_INSTRUCTION_SET = "instructionSet"; + private List instructionSet = new ArrayList<>(); + + public DisbursementOperationInput() {} + + public DisbursementOperationInput amount(String amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * + * @return amount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAmount(String amount) { + this.amount = amount; + } + + public DisbursementOperationInput paymentAccount(Account paymentAccount) { + this.paymentAccount = paymentAccount; + return this; + } + + /** + * Get paymentAccount + * + * @return paymentAccount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAYMENT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Account getPaymentAccount() { + return paymentAccount; + } + + @JsonProperty(JSON_PROPERTY_PAYMENT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPaymentAccount(Account paymentAccount) { + this.paymentAccount = paymentAccount; + } + + public DisbursementOperationInput instructionSet(List instructionSet) { + this.instructionSet = instructionSet; + return this; + } + + public DisbursementOperationInput addInstructionSetItem( + DisbursementInstruction instructionSetItem) { + if (this.instructionSet == null) { + this.instructionSet = new ArrayList<>(); + } + this.instructionSet.add(instructionSetItem); + return this; + } + + /** + * Get instructionSet + * + * @return instructionSet + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INSTRUCTION_SET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getInstructionSet() { + return instructionSet; + } + + @JsonProperty(JSON_PROPERTY_INSTRUCTION_SET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInstructionSet(List instructionSet) { + this.instructionSet = instructionSet; + } + + /** Return true if this DisbursementOperationInput object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisbursementOperationInput disbursementOperationInput = (DisbursementOperationInput) o; + return Objects.equals(this.amount, disbursementOperationInput.amount) + && Objects.equals(this.paymentAccount, disbursementOperationInput.paymentAccount) + && Objects.equals(this.instructionSet, disbursementOperationInput.instructionSet); + } + + @Override + public int hashCode() { + return Objects.hash(amount, paymentAccount, instructionSet); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisbursementOperationInput {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" paymentAccount: ").append(toIndentedString(paymentAccount)).append("\n"); + sb.append(" instructionSet: ").append(toIndentedString(instructionSet)).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 `amount` to the URL query string + if (getAmount() != null) { + joiner.add( + String.format( + "%samount%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `paymentAccount` to the URL query string + if (getPaymentAccount() != null) { + joiner.add(getPaymentAccount().toUrlQueryString(prefix + "paymentAccount" + suffix)); + } + + // add `instructionSet` to the URL query string + if (getInstructionSet() != null) { + for (int i = 0; i < getInstructionSet().size(); i++) { + if (getInstructionSet().get(i) != null) { + joiner.add( + getInstructionSet() + .get(i) + .toUrlQueryString( + String.format( + "%sinstructionSet%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/DisbursementOperationPreview.java b/src/main/java/com/fireblocks/sdk/model/DisbursementOperationPreview.java new file mode 100644 index 0000000..662a0d6 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DisbursementOperationPreview.java @@ -0,0 +1,202 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.util.Objects; +import java.util.StringJoiner; + +/** DisbursementOperationPreview */ +@JsonPropertyOrder({ + DisbursementOperationPreview.JSON_PROPERTY_INPUT, + DisbursementOperationPreview.JSON_PROPERTY_OUTPUT, + DisbursementOperationPreview.JSON_PROPERTY_FAILURE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DisbursementOperationPreview { + public static final String JSON_PROPERTY_INPUT = "input"; + private DisbursementOperationInput input; + + public static final String JSON_PROPERTY_OUTPUT = "output"; + private DisbursementOperationPreviewOutput output; + + public static final String JSON_PROPERTY_FAILURE = "failure"; + private OperationExecutionFailure failure; + + public DisbursementOperationPreview() {} + + public DisbursementOperationPreview input(DisbursementOperationInput input) { + this.input = input; + return this; + } + + /** + * Get input + * + * @return input + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DisbursementOperationInput getInput() { + return input; + } + + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInput(DisbursementOperationInput input) { + this.input = input; + } + + public DisbursementOperationPreview output(DisbursementOperationPreviewOutput output) { + this.output = output; + return this; + } + + /** + * Get output + * + * @return output + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DisbursementOperationPreviewOutput getOutput() { + return output; + } + + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOutput(DisbursementOperationPreviewOutput output) { + this.output = output; + } + + public DisbursementOperationPreview failure(OperationExecutionFailure failure) { + this.failure = failure; + return this; + } + + /** + * Get failure + * + * @return failure + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OperationExecutionFailure getFailure() { + return failure; + } + + @JsonProperty(JSON_PROPERTY_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFailure(OperationExecutionFailure failure) { + this.failure = failure; + } + + /** Return true if this DisbursementOperationPreview object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisbursementOperationPreview disbursementOperationPreview = + (DisbursementOperationPreview) o; + return Objects.equals(this.input, disbursementOperationPreview.input) + && Objects.equals(this.output, disbursementOperationPreview.output) + && Objects.equals(this.failure, disbursementOperationPreview.failure); + } + + @Override + public int hashCode() { + return Objects.hash(input, output, failure); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisbursementOperationPreview {\n"); + sb.append(" input: ").append(toIndentedString(input)).append("\n"); + sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append(" failure: ").append(toIndentedString(failure)).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 `input` to the URL query string + if (getInput() != null) { + joiner.add(getInput().toUrlQueryString(prefix + "input" + suffix)); + } + + // add `output` to the URL query string + if (getOutput() != null) { + joiner.add(getOutput().toUrlQueryString(prefix + "output" + suffix)); + } + + // add `failure` to the URL query string + if (getFailure() != null) { + joiner.add(getFailure().toUrlQueryString(prefix + "failure" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DisbursementOperationPreviewOutput.java b/src/main/java/com/fireblocks/sdk/model/DisbursementOperationPreviewOutput.java new file mode 100644 index 0000000..891a7dd --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DisbursementOperationPreviewOutput.java @@ -0,0 +1,165 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** DisbursementOperationPreviewOutput */ +@JsonPropertyOrder({DisbursementOperationPreviewOutput.JSON_PROPERTY_INSTRUCTION_SET}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DisbursementOperationPreviewOutput { + public static final String JSON_PROPERTY_INSTRUCTION_SET = "instructionSet"; + private List instructionSet = + new ArrayList<>(); + + public DisbursementOperationPreviewOutput() {} + + public DisbursementOperationPreviewOutput instructionSet( + List instructionSet) { + this.instructionSet = instructionSet; + return this; + } + + public DisbursementOperationPreviewOutput addInstructionSetItem( + DisbursementOperationPreviewOutputInstructionSetInner instructionSetItem) { + if (this.instructionSet == null) { + this.instructionSet = new ArrayList<>(); + } + this.instructionSet.add(instructionSetItem); + return this; + } + + /** + * Get instructionSet + * + * @return instructionSet + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INSTRUCTION_SET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getInstructionSet() { + return instructionSet; + } + + @JsonProperty(JSON_PROPERTY_INSTRUCTION_SET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInstructionSet( + List instructionSet) { + this.instructionSet = instructionSet; + } + + /** Return true if this DisbursementOperationPreviewOutput object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisbursementOperationPreviewOutput disbursementOperationPreviewOutput = + (DisbursementOperationPreviewOutput) o; + return Objects.equals( + this.instructionSet, disbursementOperationPreviewOutput.instructionSet); + } + + @Override + public int hashCode() { + return Objects.hash(instructionSet); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisbursementOperationPreviewOutput {\n"); + sb.append(" instructionSet: ").append(toIndentedString(instructionSet)).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 `instructionSet` to the URL query string + if (getInstructionSet() != null) { + for (int i = 0; i < getInstructionSet().size(); i++) { + if (getInstructionSet().get(i) != null) { + joiner.add( + getInstructionSet() + .get(i) + .toUrlQueryString( + String.format( + "%sinstructionSet%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/DisbursementOperationPreviewOutputInstructionSetInner.java b/src/main/java/com/fireblocks/sdk/model/DisbursementOperationPreviewOutputInstructionSetInner.java new file mode 100644 index 0000000..67f1a22 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DisbursementOperationPreviewOutputInstructionSetInner.java @@ -0,0 +1,259 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** DisbursementOperationPreviewOutputInstructionSetInner */ +@JsonPropertyOrder({ + DisbursementOperationPreviewOutputInstructionSetInner.JSON_PROPERTY_AMOUNT, + DisbursementOperationPreviewOutputInstructionSetInner.JSON_PROPERTY_FEE, + DisbursementOperationPreviewOutputInstructionSetInner.JSON_PROPERTY_PAYEE_ACCOUNT, + DisbursementOperationPreviewOutputInstructionSetInner.JSON_PROPERTY_TIME_SECONDS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DisbursementOperationPreviewOutputInstructionSetInner { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private AssetAmount amount; + + public static final String JSON_PROPERTY_FEE = "fee"; + private AssetAmount fee; + + public static final String JSON_PROPERTY_PAYEE_ACCOUNT = "payeeAccount"; + private Destination payeeAccount; + + public static final String JSON_PROPERTY_TIME_SECONDS = "timeSeconds"; + private BigDecimal timeSeconds; + + public DisbursementOperationPreviewOutputInstructionSetInner() {} + + public DisbursementOperationPreviewOutputInstructionSetInner amount(AssetAmount amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * + * @return amount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetAmount getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(AssetAmount amount) { + this.amount = amount; + } + + public DisbursementOperationPreviewOutputInstructionSetInner fee(AssetAmount fee) { + this.fee = fee; + return this; + } + + /** + * Get fee + * + * @return fee + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetAmount getFee() { + return fee; + } + + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFee(AssetAmount fee) { + this.fee = fee; + } + + public DisbursementOperationPreviewOutputInstructionSetInner payeeAccount( + Destination payeeAccount) { + this.payeeAccount = payeeAccount; + return this; + } + + /** + * Get payeeAccount + * + * @return payeeAccount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAYEE_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Destination getPayeeAccount() { + return payeeAccount; + } + + @JsonProperty(JSON_PROPERTY_PAYEE_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPayeeAccount(Destination payeeAccount) { + this.payeeAccount = payeeAccount; + } + + public DisbursementOperationPreviewOutputInstructionSetInner timeSeconds( + BigDecimal timeSeconds) { + this.timeSeconds = timeSeconds; + return this; + } + + /** + * Get timeSeconds + * + * @return timeSeconds + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TIME_SECONDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getTimeSeconds() { + return timeSeconds; + } + + @JsonProperty(JSON_PROPERTY_TIME_SECONDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTimeSeconds(BigDecimal timeSeconds) { + this.timeSeconds = timeSeconds; + } + + /** + * Return true if this DisbursementOperationPreviewOutput_instructionSet_inner object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisbursementOperationPreviewOutputInstructionSetInner + disbursementOperationPreviewOutputInstructionSetInner = + (DisbursementOperationPreviewOutputInstructionSetInner) o; + return Objects.equals( + this.amount, disbursementOperationPreviewOutputInstructionSetInner.amount) + && Objects.equals( + this.fee, disbursementOperationPreviewOutputInstructionSetInner.fee) + && Objects.equals( + this.payeeAccount, + disbursementOperationPreviewOutputInstructionSetInner.payeeAccount) + && Objects.equals( + this.timeSeconds, + disbursementOperationPreviewOutputInstructionSetInner.timeSeconds); + } + + @Override + public int hashCode() { + return Objects.hash(amount, fee, payeeAccount, timeSeconds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisbursementOperationPreviewOutputInstructionSetInner {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); + sb.append(" payeeAccount: ").append(toIndentedString(payeeAccount)).append("\n"); + sb.append(" timeSeconds: ").append(toIndentedString(timeSeconds)).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 `amount` to the URL query string + if (getAmount() != null) { + joiner.add(getAmount().toUrlQueryString(prefix + "amount" + suffix)); + } + + // add `fee` to the URL query string + if (getFee() != null) { + joiner.add(getFee().toUrlQueryString(prefix + "fee" + suffix)); + } + + // add `payeeAccount` to the URL query string + if (getPayeeAccount() != null) { + joiner.add(getPayeeAccount().toUrlQueryString(prefix + "payeeAccount" + suffix)); + } + + // add `timeSeconds` to the URL query string + if (getTimeSeconds() != null) { + joiner.add( + String.format( + "%stimeSeconds%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTimeSeconds()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DisbursementOperationType.java b/src/main/java/com/fireblocks/sdk/model/DisbursementOperationType.java new file mode 100644 index 0000000..4aa33c0 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DisbursementOperationType.java @@ -0,0 +1,62 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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; + +/** Gets or Sets DisbursementOperationType */ +public enum DisbursementOperationType { + DISBURSEMENT("DISBURSEMENT"); + + private String value; + + DisbursementOperationType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DisbursementOperationType fromValue(String value) { + for (DisbursementOperationType b : DisbursementOperationType.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/DisbursementPercentageInstruction.java b/src/main/java/com/fireblocks/sdk/model/DisbursementPercentageInstruction.java new file mode 100644 index 0000000..92e13f6 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DisbursementPercentageInstruction.java @@ -0,0 +1,217 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** DisbursementPercentageInstruction */ +@JsonPropertyOrder({ + DisbursementPercentageInstruction.JSON_PROPERTY_PAYEE_ACCOUNT, + DisbursementPercentageInstruction.JSON_PROPERTY_ASSET_ID, + DisbursementPercentageInstruction.JSON_PROPERTY_PERCENTAGE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DisbursementPercentageInstruction { + public static final String JSON_PROPERTY_PAYEE_ACCOUNT = "payeeAccount"; + private Destination payeeAccount; + + public static final String JSON_PROPERTY_ASSET_ID = "assetId"; + private String assetId; + + public static final String JSON_PROPERTY_PERCENTAGE = "percentage"; + private String percentage; + + public DisbursementPercentageInstruction() {} + + public DisbursementPercentageInstruction payeeAccount(Destination payeeAccount) { + this.payeeAccount = payeeAccount; + return this; + } + + /** + * Get payeeAccount + * + * @return payeeAccount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAYEE_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Destination getPayeeAccount() { + return payeeAccount; + } + + @JsonProperty(JSON_PROPERTY_PAYEE_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPayeeAccount(Destination payeeAccount) { + this.payeeAccount = payeeAccount; + } + + public DisbursementPercentageInstruction assetId(String assetId) { + this.assetId = assetId; + return this; + } + + /** + * Get assetId + * + * @return assetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAssetId() { + return assetId; + } + + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAssetId(String assetId) { + this.assetId = assetId; + } + + public DisbursementPercentageInstruction percentage(String percentage) { + this.percentage = percentage; + return this; + } + + /** + * Get percentage + * + * @return percentage + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PERCENTAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPercentage() { + return percentage; + } + + @JsonProperty(JSON_PROPERTY_PERCENTAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPercentage(String percentage) { + this.percentage = percentage; + } + + /** Return true if this DisbursementPercentageInstruction object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisbursementPercentageInstruction disbursementPercentageInstruction = + (DisbursementPercentageInstruction) o; + return Objects.equals(this.payeeAccount, disbursementPercentageInstruction.payeeAccount) + && Objects.equals(this.assetId, disbursementPercentageInstruction.assetId) + && Objects.equals(this.percentage, disbursementPercentageInstruction.percentage); + } + + @Override + public int hashCode() { + return Objects.hash(payeeAccount, assetId, percentage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisbursementPercentageInstruction {\n"); + sb.append(" payeeAccount: ").append(toIndentedString(payeeAccount)).append("\n"); + sb.append(" assetId: ").append(toIndentedString(assetId)).append("\n"); + sb.append(" percentage: ").append(toIndentedString(percentage)).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 `payeeAccount` to the URL query string + if (getPayeeAccount() != null) { + joiner.add(getPayeeAccount().toUrlQueryString(prefix + "payeeAccount" + suffix)); + } + + // add `assetId` to the URL query string + if (getAssetId() != null) { + joiner.add( + String.format( + "%sassetId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAssetId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `percentage` to the URL query string + if (getPercentage() != null) { + joiner.add( + String.format( + "%spercentage%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getPercentage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DisbursementValidationFailure.java b/src/main/java/com/fireblocks/sdk/model/DisbursementValidationFailure.java new file mode 100644 index 0000000..b913025 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DisbursementValidationFailure.java @@ -0,0 +1,262 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.StringJoiner; + +/** DisbursementValidationFailure */ +@JsonPropertyOrder({ + DisbursementValidationFailure.JSON_PROPERTY_REASON, + DisbursementValidationFailure.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DisbursementValidationFailure { + /** Gets or Sets reason */ + public enum ReasonEnum { + ACCOUNT_NOT_FOUND("ACCOUNT_NOT_FOUND"), + + ACCOUNT_TYPE_NOT_SUPPORTED("ACCOUNT_TYPE_NOT_SUPPORTED"), + + INSUFFICIENT_BALANCE("INSUFFICIENT_BALANCE"), + + ASSET_NOT_FOUND("ASSET_NOT_FOUND"), + + ASSETS_CONTINUITY_MISMATCH("ASSETS_CONTINUITY_MISMATCH"), + + EXCHANGE_BASKETS_MISMATCH("EXCHANGE_BASKETS_MISMATCH"), + + ACCOUNTS_CONTINUITY_MISMATCH("ACCOUNTS_CONTINUITY_MISMATCH"), + + ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED("ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED"), + + EQUAL_ACCOUNTS_NOT_ALLOWED("EQUAL_ACCOUNTS_NOT_ALLOWED"), + + EQUAL_ASSETS_NOT_ALLOWED("EQUAL_ASSETS_NOT_ALLOWED"), + + INVALID_AMOUNT("INVALID_AMOUNT"), + + UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED("UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED"), + + MANAGED_OPERATION_PARAMS_INVALID_SCHEMA("MANAGED_OPERATION_PARAMS_INVALID_SCHEMA"), + + INSTRUCTIONS_EXCEED_HUNDRED_PERCENT("INSTRUCTIONS_EXCEED_HUNDRED_PERCENT"), + + INSTRUCTIONS_ARRAY_EMPTY("INSTRUCTIONS_ARRAY_EMPTY"); + + private String value; + + ReasonEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ReasonEnum fromValue(String value) { + for (ReasonEnum b : ReasonEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_REASON = "reason"; + private ReasonEnum reason; + + public static final String JSON_PROPERTY_DATA = "data"; + private Map data = new HashMap<>(); + + public DisbursementValidationFailure() {} + + public DisbursementValidationFailure reason(ReasonEnum reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * + * @return reason + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReasonEnum getReason() { + return reason; + } + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReason(ReasonEnum reason) { + this.reason = reason; + } + + public DisbursementValidationFailure data(Map data) { + this.data = data; + return this; + } + + public DisbursementValidationFailure putDataItem(String key, Object dataItem) { + if (this.data == null) { + this.data = new HashMap<>(); + } + this.data.put(key, dataItem); + return this; + } + + /** + * Get data + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Map data) { + this.data = data; + } + + /** Return true if this DisbursementValidationFailure object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisbursementValidationFailure disbursementValidationFailure = + (DisbursementValidationFailure) o; + return Objects.equals(this.reason, disbursementValidationFailure.reason) + && Objects.equals(this.data, disbursementValidationFailure.data); + } + + @Override + public int hashCode() { + return Objects.hash(reason, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisbursementValidationFailure {\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).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 `reason` to the URL query string + if (getReason() != null) { + joiner.add( + String.format( + "%sreason%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `data` to the URL query string + if (getData() != null) { + for (String _key : getData().keySet()) { + joiner.add( + String.format( + "%sdata%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, _key, containerSuffix), + getData().get(_key), + URLEncoder.encode( + String.valueOf(getData().get(_key)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/EditGasStationConfigurationResponse.java b/src/main/java/com/fireblocks/sdk/model/EditGasStationConfigurationResponse.java new file mode 100644 index 0000000..8c2c399 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/EditGasStationConfigurationResponse.java @@ -0,0 +1,140 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** EditGasStationConfigurationResponse */ +@JsonPropertyOrder({EditGasStationConfigurationResponse.JSON_PROPERTY_SUCCESS}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EditGasStationConfigurationResponse { + public static final String JSON_PROPERTY_SUCCESS = "success"; + private Boolean success; + + public EditGasStationConfigurationResponse() {} + + public EditGasStationConfigurationResponse success(Boolean success) { + this.success = success; + return this; + } + + /** + * Indicates whether editing the gas station configuration was successful + * + * @return success + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getSuccess() { + return success; + } + + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSuccess(Boolean success) { + this.success = success; + } + + /** Return true if this EditGasStationConfigurationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EditGasStationConfigurationResponse editGasStationConfigurationResponse = + (EditGasStationConfigurationResponse) o; + return Objects.equals(this.success, editGasStationConfigurationResponse.success); + } + + @Override + public int hashCode() { + return Objects.hash(success); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EditGasStationConfigurationResponse {\n"); + sb.append(" success: ").append(toIndentedString(success)).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 `success` to the URL query string + if (getSuccess() != null) { + joiner.add( + String.format( + "%ssuccess%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSuccess()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ExecutionConversionOperation.java b/src/main/java/com/fireblocks/sdk/model/ExecutionConversionOperation.java new file mode 100644 index 0000000..13ea4f8 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ExecutionConversionOperation.java @@ -0,0 +1,334 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ExecutionConversionOperation */ +@JsonPropertyOrder({ + ExecutionConversionOperation.JSON_PROPERTY_OPERATION_ID, + ExecutionConversionOperation.JSON_PROPERTY_STATUS, + ExecutionConversionOperation.JSON_PROPERTY_VALIDATION_FAILURE, + ExecutionConversionOperation.JSON_PROPERTY_OPERATION_TYPE, + ExecutionConversionOperation.JSON_PROPERTY_PREVIEW, + ExecutionConversionOperation.JSON_PROPERTY_EXECUTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecutionConversionOperation { + public static final String JSON_PROPERTY_OPERATION_ID = "operationId"; + private String operationId; + + public static final String JSON_PROPERTY_STATUS = "status"; + private ExecutionOperationStatus status; + + public static final String JSON_PROPERTY_VALIDATION_FAILURE = "validationFailure"; + private ConversionValidationFailure validationFailure; + + public static final String JSON_PROPERTY_OPERATION_TYPE = "operationType"; + private ConversionOperationType operationType; + + public static final String JSON_PROPERTY_PREVIEW = "preview"; + private ConversionOperationPreview preview; + + public static final String JSON_PROPERTY_EXECUTION = "execution"; + private ConversionOperationExecution execution; + + public ExecutionConversionOperation() {} + + public ExecutionConversionOperation operationId(String operationId) { + this.operationId = operationId; + return this; + } + + /** + * Get operationId + * + * @return operationId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOperationId() { + return operationId; + } + + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOperationId(String operationId) { + this.operationId = operationId; + } + + public ExecutionConversionOperation status(ExecutionOperationStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExecutionOperationStatus getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(ExecutionOperationStatus status) { + this.status = status; + } + + public ExecutionConversionOperation validationFailure( + ConversionValidationFailure validationFailure) { + this.validationFailure = validationFailure; + return this; + } + + /** + * Get validationFailure + * + * @return validationFailure + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALIDATION_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ConversionValidationFailure getValidationFailure() { + return validationFailure; + } + + @JsonProperty(JSON_PROPERTY_VALIDATION_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValidationFailure(ConversionValidationFailure validationFailure) { + this.validationFailure = validationFailure; + } + + public ExecutionConversionOperation operationType(ConversionOperationType operationType) { + this.operationType = operationType; + return this; + } + + /** + * Get operationType + * + * @return operationType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPERATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConversionOperationType getOperationType() { + return operationType; + } + + @JsonProperty(JSON_PROPERTY_OPERATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOperationType(ConversionOperationType operationType) { + this.operationType = operationType; + } + + public ExecutionConversionOperation preview(ConversionOperationPreview preview) { + this.preview = preview; + return this; + } + + /** + * Get preview + * + * @return preview + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREVIEW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ConversionOperationPreview getPreview() { + return preview; + } + + @JsonProperty(JSON_PROPERTY_PREVIEW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPreview(ConversionOperationPreview preview) { + this.preview = preview; + } + + public ExecutionConversionOperation execution(ConversionOperationExecution execution) { + this.execution = execution; + return this; + } + + /** + * Get execution + * + * @return execution + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ConversionOperationExecution getExecution() { + return execution; + } + + @JsonProperty(JSON_PROPERTY_EXECUTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecution(ConversionOperationExecution execution) { + this.execution = execution; + } + + /** Return true if this ExecutionConversionOperation object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecutionConversionOperation executionConversionOperation = + (ExecutionConversionOperation) o; + return Objects.equals(this.operationId, executionConversionOperation.operationId) + && Objects.equals(this.status, executionConversionOperation.status) + && Objects.equals( + this.validationFailure, executionConversionOperation.validationFailure) + && Objects.equals(this.operationType, executionConversionOperation.operationType) + && Objects.equals(this.preview, executionConversionOperation.preview) + && Objects.equals(this.execution, executionConversionOperation.execution); + } + + @Override + public int hashCode() { + return Objects.hash( + operationId, status, validationFailure, operationType, preview, execution); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecutionConversionOperation {\n"); + sb.append(" operationId: ").append(toIndentedString(operationId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" validationFailure: ") + .append(toIndentedString(validationFailure)) + .append("\n"); + sb.append(" operationType: ").append(toIndentedString(operationType)).append("\n"); + sb.append(" preview: ").append(toIndentedString(preview)).append("\n"); + sb.append(" execution: ").append(toIndentedString(execution)).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 `operationId` to the URL query string + if (getOperationId() != null) { + joiner.add( + String.format( + "%soperationId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getOperationId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `validationFailure` to the URL query string + if (getValidationFailure() != null) { + joiner.add( + getValidationFailure().toUrlQueryString(prefix + "validationFailure" + suffix)); + } + + // add `operationType` to the URL query string + if (getOperationType() != null) { + joiner.add( + String.format( + "%soperationType%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getOperationType()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `preview` to the URL query string + if (getPreview() != null) { + joiner.add(getPreview().toUrlQueryString(prefix + "preview" + suffix)); + } + + // add `execution` to the URL query string + if (getExecution() != null) { + joiner.add(getExecution().toUrlQueryString(prefix + "execution" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ExecutionDisbursementOperation.java b/src/main/java/com/fireblocks/sdk/model/ExecutionDisbursementOperation.java new file mode 100644 index 0000000..8ce86dc --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ExecutionDisbursementOperation.java @@ -0,0 +1,334 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ExecutionDisbursementOperation */ +@JsonPropertyOrder({ + ExecutionDisbursementOperation.JSON_PROPERTY_OPERATION_ID, + ExecutionDisbursementOperation.JSON_PROPERTY_STATUS, + ExecutionDisbursementOperation.JSON_PROPERTY_VALIDATION_FAILURE, + ExecutionDisbursementOperation.JSON_PROPERTY_OPERATION_TYPE, + ExecutionDisbursementOperation.JSON_PROPERTY_PREVIEW, + ExecutionDisbursementOperation.JSON_PROPERTY_EXECUTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecutionDisbursementOperation { + public static final String JSON_PROPERTY_OPERATION_ID = "operationId"; + private String operationId; + + public static final String JSON_PROPERTY_STATUS = "status"; + private ExecutionOperationStatus status; + + public static final String JSON_PROPERTY_VALIDATION_FAILURE = "validationFailure"; + private DisbursementValidationFailure validationFailure; + + public static final String JSON_PROPERTY_OPERATION_TYPE = "operationType"; + private DisbursementOperationType operationType; + + public static final String JSON_PROPERTY_PREVIEW = "preview"; + private DisbursementOperationPreview preview; + + public static final String JSON_PROPERTY_EXECUTION = "execution"; + private DisbursementOperationExecution execution; + + public ExecutionDisbursementOperation() {} + + public ExecutionDisbursementOperation operationId(String operationId) { + this.operationId = operationId; + return this; + } + + /** + * Get operationId + * + * @return operationId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOperationId() { + return operationId; + } + + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOperationId(String operationId) { + this.operationId = operationId; + } + + public ExecutionDisbursementOperation status(ExecutionOperationStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExecutionOperationStatus getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(ExecutionOperationStatus status) { + this.status = status; + } + + public ExecutionDisbursementOperation validationFailure( + DisbursementValidationFailure validationFailure) { + this.validationFailure = validationFailure; + return this; + } + + /** + * Get validationFailure + * + * @return validationFailure + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALIDATION_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DisbursementValidationFailure getValidationFailure() { + return validationFailure; + } + + @JsonProperty(JSON_PROPERTY_VALIDATION_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValidationFailure(DisbursementValidationFailure validationFailure) { + this.validationFailure = validationFailure; + } + + public ExecutionDisbursementOperation operationType(DisbursementOperationType operationType) { + this.operationType = operationType; + return this; + } + + /** + * Get operationType + * + * @return operationType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPERATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DisbursementOperationType getOperationType() { + return operationType; + } + + @JsonProperty(JSON_PROPERTY_OPERATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOperationType(DisbursementOperationType operationType) { + this.operationType = operationType; + } + + public ExecutionDisbursementOperation preview(DisbursementOperationPreview preview) { + this.preview = preview; + return this; + } + + /** + * Get preview + * + * @return preview + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREVIEW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DisbursementOperationPreview getPreview() { + return preview; + } + + @JsonProperty(JSON_PROPERTY_PREVIEW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPreview(DisbursementOperationPreview preview) { + this.preview = preview; + } + + public ExecutionDisbursementOperation execution(DisbursementOperationExecution execution) { + this.execution = execution; + return this; + } + + /** + * Get execution + * + * @return execution + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DisbursementOperationExecution getExecution() { + return execution; + } + + @JsonProperty(JSON_PROPERTY_EXECUTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecution(DisbursementOperationExecution execution) { + this.execution = execution; + } + + /** Return true if this ExecutionDisbursementOperation object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecutionDisbursementOperation executionDisbursementOperation = + (ExecutionDisbursementOperation) o; + return Objects.equals(this.operationId, executionDisbursementOperation.operationId) + && Objects.equals(this.status, executionDisbursementOperation.status) + && Objects.equals( + this.validationFailure, executionDisbursementOperation.validationFailure) + && Objects.equals(this.operationType, executionDisbursementOperation.operationType) + && Objects.equals(this.preview, executionDisbursementOperation.preview) + && Objects.equals(this.execution, executionDisbursementOperation.execution); + } + + @Override + public int hashCode() { + return Objects.hash( + operationId, status, validationFailure, operationType, preview, execution); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecutionDisbursementOperation {\n"); + sb.append(" operationId: ").append(toIndentedString(operationId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" validationFailure: ") + .append(toIndentedString(validationFailure)) + .append("\n"); + sb.append(" operationType: ").append(toIndentedString(operationType)).append("\n"); + sb.append(" preview: ").append(toIndentedString(preview)).append("\n"); + sb.append(" execution: ").append(toIndentedString(execution)).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 `operationId` to the URL query string + if (getOperationId() != null) { + joiner.add( + String.format( + "%soperationId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getOperationId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `validationFailure` to the URL query string + if (getValidationFailure() != null) { + joiner.add( + getValidationFailure().toUrlQueryString(prefix + "validationFailure" + suffix)); + } + + // add `operationType` to the URL query string + if (getOperationType() != null) { + joiner.add( + String.format( + "%soperationType%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getOperationType()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `preview` to the URL query string + if (getPreview() != null) { + joiner.add(getPreview().toUrlQueryString(prefix + "preview" + suffix)); + } + + // add `execution` to the URL query string + if (getExecution() != null) { + joiner.add(getExecution().toUrlQueryString(prefix + "execution" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ExecutionOperationStatus.java b/src/main/java/com/fireblocks/sdk/model/ExecutionOperationStatus.java new file mode 100644 index 0000000..2d46c3f --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ExecutionOperationStatus.java @@ -0,0 +1,84 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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; + +/** Gets or Sets ExecutionOperationStatus */ +public enum ExecutionOperationStatus { + PENDING("PENDING"), + + VALIDATION_IN_PROGRESS("VALIDATION_IN_PROGRESS"), + + VALIDATION_FAILED("VALIDATION_FAILED"), + + VALIDATION_COMPLETED("VALIDATION_COMPLETED"), + + PREVIEW_REQUESTED("PREVIEW_REQUESTED"), + + PREVIEW_IN_PROGRESS("PREVIEW_IN_PROGRESS"), + + PREVIEW_FAILED("PREVIEW_FAILED"), + + READY_FOR_LAUNCH("READY_FOR_LAUNCH"), + + EXECUTION_REQUESTED("EXECUTION_REQUESTED"), + + EXECUTION_IN_PROGRESS("EXECUTION_IN_PROGRESS"), + + EXECUTION_COMPLETED("EXECUTION_COMPLETED"), + + EXECUTION_FAILED("EXECUTION_FAILED"); + + private String value; + + ExecutionOperationStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ExecutionOperationStatus fromValue(String value) { + for (ExecutionOperationStatus b : ExecutionOperationStatus.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/ExecutionScreeningOperation.java b/src/main/java/com/fireblocks/sdk/model/ExecutionScreeningOperation.java new file mode 100644 index 0000000..7323094 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ExecutionScreeningOperation.java @@ -0,0 +1,298 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ExecutionScreeningOperation */ +@JsonPropertyOrder({ + ExecutionScreeningOperation.JSON_PROPERTY_OPERATION_ID, + ExecutionScreeningOperation.JSON_PROPERTY_STATUS, + ExecutionScreeningOperation.JSON_PROPERTY_OPERATION_TYPE, + ExecutionScreeningOperation.JSON_PROPERTY_VALIDATION_FAILURE, + ExecutionScreeningOperation.JSON_PROPERTY_EXECUTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecutionScreeningOperation { + public static final String JSON_PROPERTY_OPERATION_ID = "operationId"; + private String operationId; + + public static final String JSON_PROPERTY_STATUS = "status"; + private ExecutionOperationStatus status; + + public static final String JSON_PROPERTY_OPERATION_TYPE = "operationType"; + private ScreeningOperationType operationType; + + public static final String JSON_PROPERTY_VALIDATION_FAILURE = "validationFailure"; + private ScreeningValidationFailure validationFailure; + + public static final String JSON_PROPERTY_EXECUTION = "execution"; + private ScreeningOperationExecution execution; + + public ExecutionScreeningOperation() {} + + public ExecutionScreeningOperation operationId(String operationId) { + this.operationId = operationId; + return this; + } + + /** + * Get operationId + * + * @return operationId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOperationId() { + return operationId; + } + + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOperationId(String operationId) { + this.operationId = operationId; + } + + public ExecutionScreeningOperation status(ExecutionOperationStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExecutionOperationStatus getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(ExecutionOperationStatus status) { + this.status = status; + } + + public ExecutionScreeningOperation operationType(ScreeningOperationType operationType) { + this.operationType = operationType; + return this; + } + + /** + * Get operationType + * + * @return operationType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPERATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ScreeningOperationType getOperationType() { + return operationType; + } + + @JsonProperty(JSON_PROPERTY_OPERATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOperationType(ScreeningOperationType operationType) { + this.operationType = operationType; + } + + public ExecutionScreeningOperation validationFailure( + ScreeningValidationFailure validationFailure) { + this.validationFailure = validationFailure; + return this; + } + + /** + * Get validationFailure + * + * @return validationFailure + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALIDATION_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScreeningValidationFailure getValidationFailure() { + return validationFailure; + } + + @JsonProperty(JSON_PROPERTY_VALIDATION_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValidationFailure(ScreeningValidationFailure validationFailure) { + this.validationFailure = validationFailure; + } + + public ExecutionScreeningOperation execution(ScreeningOperationExecution execution) { + this.execution = execution; + return this; + } + + /** + * Get execution + * + * @return execution + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScreeningOperationExecution getExecution() { + return execution; + } + + @JsonProperty(JSON_PROPERTY_EXECUTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecution(ScreeningOperationExecution execution) { + this.execution = execution; + } + + /** Return true if this ExecutionScreeningOperation object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecutionScreeningOperation executionScreeningOperation = (ExecutionScreeningOperation) o; + return Objects.equals(this.operationId, executionScreeningOperation.operationId) + && Objects.equals(this.status, executionScreeningOperation.status) + && Objects.equals(this.operationType, executionScreeningOperation.operationType) + && Objects.equals( + this.validationFailure, executionScreeningOperation.validationFailure) + && Objects.equals(this.execution, executionScreeningOperation.execution); + } + + @Override + public int hashCode() { + return Objects.hash(operationId, status, operationType, validationFailure, execution); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecutionScreeningOperation {\n"); + sb.append(" operationId: ").append(toIndentedString(operationId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" operationType: ").append(toIndentedString(operationType)).append("\n"); + sb.append(" validationFailure: ") + .append(toIndentedString(validationFailure)) + .append("\n"); + sb.append(" execution: ").append(toIndentedString(execution)).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 `operationId` to the URL query string + if (getOperationId() != null) { + joiner.add( + String.format( + "%soperationId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getOperationId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `operationType` to the URL query string + if (getOperationType() != null) { + joiner.add( + String.format( + "%soperationType%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getOperationType()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `validationFailure` to the URL query string + if (getValidationFailure() != null) { + joiner.add( + getValidationFailure().toUrlQueryString(prefix + "validationFailure" + suffix)); + } + + // add `execution` to the URL query string + if (getExecution() != null) { + joiner.add(getExecution().toUrlQueryString(prefix + "execution" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ExecutionTransferOperation.java b/src/main/java/com/fireblocks/sdk/model/ExecutionTransferOperation.java new file mode 100644 index 0000000..deca398 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ExecutionTransferOperation.java @@ -0,0 +1,333 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ExecutionTransferOperation */ +@JsonPropertyOrder({ + ExecutionTransferOperation.JSON_PROPERTY_OPERATION_ID, + ExecutionTransferOperation.JSON_PROPERTY_STATUS, + ExecutionTransferOperation.JSON_PROPERTY_VALIDATION_FAILURE, + ExecutionTransferOperation.JSON_PROPERTY_OPERATION_TYPE, + ExecutionTransferOperation.JSON_PROPERTY_PREVIEW, + ExecutionTransferOperation.JSON_PROPERTY_EXECUTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecutionTransferOperation { + public static final String JSON_PROPERTY_OPERATION_ID = "operationId"; + private String operationId; + + public static final String JSON_PROPERTY_STATUS = "status"; + private ExecutionOperationStatus status; + + public static final String JSON_PROPERTY_VALIDATION_FAILURE = "validationFailure"; + private TransferValidationFailure validationFailure; + + public static final String JSON_PROPERTY_OPERATION_TYPE = "operationType"; + private TransferOperationType operationType; + + public static final String JSON_PROPERTY_PREVIEW = "preview"; + private TransferOperationPreview preview; + + public static final String JSON_PROPERTY_EXECUTION = "execution"; + private TransferOperationExecution execution; + + public ExecutionTransferOperation() {} + + public ExecutionTransferOperation operationId(String operationId) { + this.operationId = operationId; + return this; + } + + /** + * Get operationId + * + * @return operationId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOperationId() { + return operationId; + } + + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOperationId(String operationId) { + this.operationId = operationId; + } + + public ExecutionTransferOperation status(ExecutionOperationStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExecutionOperationStatus getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(ExecutionOperationStatus status) { + this.status = status; + } + + public ExecutionTransferOperation validationFailure( + TransferValidationFailure validationFailure) { + this.validationFailure = validationFailure; + return this; + } + + /** + * Get validationFailure + * + * @return validationFailure + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALIDATION_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransferValidationFailure getValidationFailure() { + return validationFailure; + } + + @JsonProperty(JSON_PROPERTY_VALIDATION_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValidationFailure(TransferValidationFailure validationFailure) { + this.validationFailure = validationFailure; + } + + public ExecutionTransferOperation operationType(TransferOperationType operationType) { + this.operationType = operationType; + return this; + } + + /** + * Get operationType + * + * @return operationType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPERATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TransferOperationType getOperationType() { + return operationType; + } + + @JsonProperty(JSON_PROPERTY_OPERATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOperationType(TransferOperationType operationType) { + this.operationType = operationType; + } + + public ExecutionTransferOperation preview(TransferOperationPreview preview) { + this.preview = preview; + return this; + } + + /** + * Get preview + * + * @return preview + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREVIEW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransferOperationPreview getPreview() { + return preview; + } + + @JsonProperty(JSON_PROPERTY_PREVIEW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPreview(TransferOperationPreview preview) { + this.preview = preview; + } + + public ExecutionTransferOperation execution(TransferOperationExecution execution) { + this.execution = execution; + return this; + } + + /** + * Get execution + * + * @return execution + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransferOperationExecution getExecution() { + return execution; + } + + @JsonProperty(JSON_PROPERTY_EXECUTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecution(TransferOperationExecution execution) { + this.execution = execution; + } + + /** Return true if this ExecutionTransferOperation object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecutionTransferOperation executionTransferOperation = (ExecutionTransferOperation) o; + return Objects.equals(this.operationId, executionTransferOperation.operationId) + && Objects.equals(this.status, executionTransferOperation.status) + && Objects.equals( + this.validationFailure, executionTransferOperation.validationFailure) + && Objects.equals(this.operationType, executionTransferOperation.operationType) + && Objects.equals(this.preview, executionTransferOperation.preview) + && Objects.equals(this.execution, executionTransferOperation.execution); + } + + @Override + public int hashCode() { + return Objects.hash( + operationId, status, validationFailure, operationType, preview, execution); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecutionTransferOperation {\n"); + sb.append(" operationId: ").append(toIndentedString(operationId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" validationFailure: ") + .append(toIndentedString(validationFailure)) + .append("\n"); + sb.append(" operationType: ").append(toIndentedString(operationType)).append("\n"); + sb.append(" preview: ").append(toIndentedString(preview)).append("\n"); + sb.append(" execution: ").append(toIndentedString(execution)).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 `operationId` to the URL query string + if (getOperationId() != null) { + joiner.add( + String.format( + "%soperationId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getOperationId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `validationFailure` to the URL query string + if (getValidationFailure() != null) { + joiner.add( + getValidationFailure().toUrlQueryString(prefix + "validationFailure" + suffix)); + } + + // add `operationType` to the URL query string + if (getOperationType() != null) { + joiner.add( + String.format( + "%soperationType%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getOperationType()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `preview` to the URL query string + if (getPreview() != null) { + joiner.add(getPreview().toUrlQueryString(prefix + "preview" + suffix)); + } + + // add `execution` to the URL query string + if (getExecution() != null) { + joiner.add(getExecution().toUrlQueryString(prefix + "execution" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/GetAPIUsersResponse.java b/src/main/java/com/fireblocks/sdk/model/GetAPIUsersResponse.java new file mode 100644 index 0000000..1751fdd --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/GetAPIUsersResponse.java @@ -0,0 +1,159 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** GetAPIUsersResponse */ +@JsonPropertyOrder({GetAPIUsersResponse.JSON_PROPERTY_USERS}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetAPIUsersResponse { + public static final String JSON_PROPERTY_USERS = "users"; + private List users = new ArrayList<>(); + + public GetAPIUsersResponse() {} + + public GetAPIUsersResponse users(List users) { + this.users = users; + return this; + } + + public GetAPIUsersResponse addUsersItem(APIUser usersItem) { + if (this.users == null) { + this.users = new ArrayList<>(); + } + this.users.add(usersItem); + return this; + } + + /** + * Get users + * + * @return users + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getUsers() { + return users; + } + + @JsonProperty(JSON_PROPERTY_USERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUsers(List users) { + this.users = users; + } + + /** Return true if this GetAPIUsersResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAPIUsersResponse getAPIUsersResponse = (GetAPIUsersResponse) o; + return Objects.equals(this.users, getAPIUsersResponse.users); + } + + @Override + public int hashCode() { + return Objects.hash(users); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAPIUsersResponse {\n"); + sb.append(" users: ").append(toIndentedString(users)).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 `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)))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/GetAuditLogsResponse.java b/src/main/java/com/fireblocks/sdk/model/GetAuditLogsResponse.java new file mode 100644 index 0000000..1612ca4 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/GetAuditLogsResponse.java @@ -0,0 +1,244 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** GetAuditLogsResponse */ +@JsonPropertyOrder({ + GetAuditLogsResponse.JSON_PROPERTY_DATA, + GetAuditLogsResponse.JSON_PROPERTY_CURSOR, + GetAuditLogsResponse.JSON_PROPERTY_TOTAL +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetAuditLogsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public static final String JSON_PROPERTY_CURSOR = "cursor"; + private String cursor; + + public static final String JSON_PROPERTY_TOTAL = "total"; + private BigDecimal total; + + public GetAuditLogsResponse() {} + + public GetAuditLogsResponse data(List data) { + this.data = data; + return this; + } + + public GetAuditLogsResponse addDataItem(AuditLogData dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + public GetAuditLogsResponse cursor(String cursor) { + this.cursor = cursor; + return this; + } + + /** + * The next id to start fetch audit logs from + * + * @return cursor + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CURSOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCursor() { + return cursor; + } + + @JsonProperty(JSON_PROPERTY_CURSOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCursor(String cursor) { + this.cursor = cursor; + } + + public GetAuditLogsResponse total(BigDecimal total) { + this.total = total; + return this; + } + + /** + * The total number of audit logs + * + * @return total + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getTotal() { + return total; + } + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotal(BigDecimal total) { + this.total = total; + } + + /** Return true if this GetAuditLogsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAuditLogsResponse getAuditLogsResponse = (GetAuditLogsResponse) o; + return Objects.equals(this.data, getAuditLogsResponse.data) + && Objects.equals(this.cursor, getAuditLogsResponse.cursor) + && Objects.equals(this.total, getAuditLogsResponse.total); + } + + @Override + public int hashCode() { + return Objects.hash(data, cursor, total); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAuditLogsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" cursor: ").append(toIndentedString(cursor)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).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 `cursor` to the URL query string + if (getCursor() != null) { + joiner.add( + String.format( + "%scursor%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getCursor()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add( + String.format( + "%stotal%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTotal()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/GetConsoleUsersResponse.java b/src/main/java/com/fireblocks/sdk/model/GetConsoleUsersResponse.java new file mode 100644 index 0000000..fc2792c --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/GetConsoleUsersResponse.java @@ -0,0 +1,159 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** GetConsoleUsersResponse */ +@JsonPropertyOrder({GetConsoleUsersResponse.JSON_PROPERTY_USERS}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetConsoleUsersResponse { + public static final String JSON_PROPERTY_USERS = "users"; + private List users = new ArrayList<>(); + + public GetConsoleUsersResponse() {} + + public GetConsoleUsersResponse users(List users) { + this.users = users; + return this; + } + + public GetConsoleUsersResponse addUsersItem(ConsoleUser usersItem) { + if (this.users == null) { + this.users = new ArrayList<>(); + } + this.users.add(usersItem); + return this; + } + + /** + * Get users + * + * @return users + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getUsers() { + return users; + } + + @JsonProperty(JSON_PROPERTY_USERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUsers(List users) { + this.users = users; + } + + /** Return true if this GetConsoleUsersResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetConsoleUsersResponse getConsoleUsersResponse = (GetConsoleUsersResponse) o; + return Objects.equals(this.users, getConsoleUsersResponse.users); + } + + @Override + public int hashCode() { + return Objects.hash(users); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetConsoleUsersResponse {\n"); + sb.append(" users: ").append(toIndentedString(users)).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 `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)))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/GetMaxSpendableAmountResponse.java b/src/main/java/com/fireblocks/sdk/model/GetMaxSpendableAmountResponse.java new file mode 100644 index 0000000..1404a21 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/GetMaxSpendableAmountResponse.java @@ -0,0 +1,145 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** GetMaxSpendableAmountResponse */ +@JsonPropertyOrder({GetMaxSpendableAmountResponse.JSON_PROPERTY_MAX_SPENDABLE_AMOUNT}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetMaxSpendableAmountResponse { + public static final String JSON_PROPERTY_MAX_SPENDABLE_AMOUNT = "maxSpendableAmount"; + private String maxSpendableAmount; + + public GetMaxSpendableAmountResponse() {} + + public GetMaxSpendableAmountResponse maxSpendableAmount(String maxSpendableAmount) { + this.maxSpendableAmount = maxSpendableAmount; + return this; + } + + /** + * The maximum amount that can be spent from the vault account + * + * @return maxSpendableAmount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_SPENDABLE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMaxSpendableAmount() { + return maxSpendableAmount; + } + + @JsonProperty(JSON_PROPERTY_MAX_SPENDABLE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaxSpendableAmount(String maxSpendableAmount) { + this.maxSpendableAmount = maxSpendableAmount; + } + + /** Return true if this GetMaxSpendableAmountResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMaxSpendableAmountResponse getMaxSpendableAmountResponse = + (GetMaxSpendableAmountResponse) o; + return Objects.equals( + this.maxSpendableAmount, getMaxSpendableAmountResponse.maxSpendableAmount); + } + + @Override + public int hashCode() { + return Objects.hash(maxSpendableAmount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetMaxSpendableAmountResponse {\n"); + sb.append(" maxSpendableAmount: ") + .append(toIndentedString(maxSpendableAmount)) + .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 `maxSpendableAmount` to the URL query string + if (getMaxSpendableAmount() != null) { + joiner.add( + String.format( + "%smaxSpendableAmount%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getMaxSpendableAmount()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/GetWhitelistIpAddressesResponse.java b/src/main/java/com/fireblocks/sdk/model/GetWhitelistIpAddressesResponse.java new file mode 100644 index 0000000..1019e5d --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/GetWhitelistIpAddressesResponse.java @@ -0,0 +1,201 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** GetWhitelistIpAddressesResponse */ +@JsonPropertyOrder({ + GetWhitelistIpAddressesResponse.JSON_PROPERTY_USER_ID, + GetWhitelistIpAddressesResponse.JSON_PROPERTY_WHITELISTED_IPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetWhitelistIpAddressesResponse { + public static final String JSON_PROPERTY_USER_ID = "userId"; + private String userId; + + public static final String JSON_PROPERTY_WHITELISTED_IPS = "whitelistedIps"; + private List whitelistedIps; + + public GetWhitelistIpAddressesResponse() {} + + public GetWhitelistIpAddressesResponse userId(String userId) { + this.userId = userId; + return this; + } + + /** + * The ID of the user + * + * @return userId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUserId() { + return userId; + } + + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUserId(String userId) { + this.userId = userId; + } + + public GetWhitelistIpAddressesResponse whitelistedIps(List whitelistedIps) { + this.whitelistedIps = whitelistedIps; + return this; + } + + public GetWhitelistIpAddressesResponse addWhitelistedIpsItem(String whitelistedIpsItem) { + if (this.whitelistedIps == null) { + this.whitelistedIps = new ArrayList<>(); + } + this.whitelistedIps.add(whitelistedIpsItem); + return this; + } + + /** + * List of whitelisted ip addresses + * + * @return whitelistedIps + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WHITELISTED_IPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getWhitelistedIps() { + return whitelistedIps; + } + + @JsonProperty(JSON_PROPERTY_WHITELISTED_IPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWhitelistedIps(List whitelistedIps) { + this.whitelistedIps = whitelistedIps; + } + + /** Return true if this GetWhitelistIpAddressesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetWhitelistIpAddressesResponse getWhitelistIpAddressesResponse = + (GetWhitelistIpAddressesResponse) o; + return Objects.equals(this.userId, getWhitelistIpAddressesResponse.userId) + && Objects.equals( + this.whitelistedIps, getWhitelistIpAddressesResponse.whitelistedIps); + } + + @Override + public int hashCode() { + return Objects.hash(userId, whitelistedIps); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetWhitelistIpAddressesResponse {\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" whitelistedIps: ").append(toIndentedString(whitelistedIps)).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 `userId` to the URL query string + if (getUserId() != null) { + joiner.add( + String.format( + "%suserId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getUserId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `whitelistedIps` to the URL query string + if (getWhitelistedIps() != null) { + for (int i = 0; i < getWhitelistedIps().size(); i++) { + joiner.add( + String.format( + "%swhitelistedIps%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getWhitelistedIps().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/InternalTransferResponse.java b/src/main/java/com/fireblocks/sdk/model/InternalTransferResponse.java new file mode 100644 index 0000000..2bb8693 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/InternalTransferResponse.java @@ -0,0 +1,139 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** InternalTransferResponse */ +@JsonPropertyOrder({InternalTransferResponse.JSON_PROPERTY_SUCCESS}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InternalTransferResponse { + public static final String JSON_PROPERTY_SUCCESS = "success"; + private Boolean success; + + public InternalTransferResponse() {} + + public InternalTransferResponse success(Boolean success) { + this.success = success; + return this; + } + + /** + * Indicates whether the transfer was successful + * + * @return success + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getSuccess() { + return success; + } + + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSuccess(Boolean success) { + this.success = success; + } + + /** Return true if this InternalTransferResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InternalTransferResponse internalTransferResponse = (InternalTransferResponse) o; + return Objects.equals(this.success, internalTransferResponse.success); + } + + @Override + public int hashCode() { + return Objects.hash(success); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InternalTransferResponse {\n"); + sb.append(" success: ").append(toIndentedString(success)).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 `success` to the URL query string + if (getSuccess() != null) { + joiner.add( + String.format( + "%ssuccess%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSuccess()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/NetworkConnection.java b/src/main/java/com/fireblocks/sdk/model/NetworkConnection.java index fe4c506..1613870 100644 --- a/src/main/java/com/fireblocks/sdk/model/NetworkConnection.java +++ b/src/main/java/com/fireblocks/sdk/model/NetworkConnection.java @@ -18,6 +18,8 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.StringJoiner; @@ -36,7 +38,7 @@ public class NetworkConnection { private String remoteNetworkId; public static final String JSON_PROPERTY_ROUTING_POLICY = "routingPolicy"; - private NetworkConnectionRoutingPolicy routingPolicy; + private Map routingPolicy = new HashMap<>(); public NetworkConnection() {} @@ -86,11 +88,21 @@ public void setRemoteNetworkId(String remoteNetworkId) { this.remoteNetworkId = remoteNetworkId; } - public NetworkConnection routingPolicy(NetworkConnectionRoutingPolicy routingPolicy) { + public NetworkConnection routingPolicy( + Map routingPolicy) { this.routingPolicy = routingPolicy; return this; } + public NetworkConnection putRoutingPolicyItem( + String key, NetworkConnectionRoutingPolicyValue routingPolicyItem) { + if (this.routingPolicy == null) { + this.routingPolicy = new HashMap<>(); + } + this.routingPolicy.put(key, routingPolicyItem); + return this; + } + /** * Get routingPolicy * @@ -99,13 +111,13 @@ public NetworkConnection routingPolicy(NetworkConnectionRoutingPolicy routingPol @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ROUTING_POLICY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NetworkConnectionRoutingPolicy getRoutingPolicy() { + public Map getRoutingPolicy() { return routingPolicy; } @JsonProperty(JSON_PROPERTY_ROUTING_POLICY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRoutingPolicy(NetworkConnectionRoutingPolicy routingPolicy) { + public void setRoutingPolicy(Map routingPolicy) { this.routingPolicy = routingPolicy; } @@ -211,7 +223,25 @@ public String toUrlQueryString(String prefix) { // add `routingPolicy` to the URL query string if (getRoutingPolicy() != null) { - joiner.add(getRoutingPolicy().toUrlQueryString(prefix + "routingPolicy" + suffix)); + for (String _key : getRoutingPolicy().keySet()) { + if (getRoutingPolicy().get(_key) != null) { + joiner.add( + getRoutingPolicy() + .get(_key) + .toUrlQueryString( + String.format( + "%sroutingPolicy%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + _key, + containerSuffix)))); + } + } } return joiner.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/NetworkConnectionResponse.java b/src/main/java/com/fireblocks/sdk/model/NetworkConnectionResponse.java index 7d8ae1c..e226459 100644 --- a/src/main/java/com/fireblocks/sdk/model/NetworkConnectionResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/NetworkConnectionResponse.java @@ -18,6 +18,8 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.StringJoiner; @@ -52,7 +54,7 @@ public class NetworkConnectionResponse { private NetworkId remoteNetworkId; public static final String JSON_PROPERTY_ROUTING_POLICY = "routingPolicy"; - private NetworkConnectionRoutingPolicy routingPolicy; + private Map routingPolicy = new HashMap<>(); public NetworkConnectionResponse() {} @@ -198,11 +200,21 @@ public void setRemoteNetworkId(NetworkId remoteNetworkId) { this.remoteNetworkId = remoteNetworkId; } - public NetworkConnectionResponse routingPolicy(NetworkConnectionRoutingPolicy routingPolicy) { + public NetworkConnectionResponse routingPolicy( + Map routingPolicy) { this.routingPolicy = routingPolicy; return this; } + public NetworkConnectionResponse putRoutingPolicyItem( + String key, NetworkConnectionRoutingPolicyValue routingPolicyItem) { + if (this.routingPolicy == null) { + this.routingPolicy = new HashMap<>(); + } + this.routingPolicy.put(key, routingPolicyItem); + return this; + } + /** * Get routingPolicy * @@ -211,13 +223,13 @@ public NetworkConnectionResponse routingPolicy(NetworkConnectionRoutingPolicy ro @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_ROUTING_POLICY) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NetworkConnectionRoutingPolicy getRoutingPolicy() { + public Map getRoutingPolicy() { return routingPolicy; } @JsonProperty(JSON_PROPERTY_ROUTING_POLICY) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRoutingPolicy(NetworkConnectionRoutingPolicy routingPolicy) { + public void setRoutingPolicy(Map routingPolicy) { this.routingPolicy = routingPolicy; } @@ -354,7 +366,25 @@ public String toUrlQueryString(String prefix) { // add `routingPolicy` to the URL query string if (getRoutingPolicy() != null) { - joiner.add(getRoutingPolicy().toUrlQueryString(prefix + "routingPolicy" + suffix)); + for (String _key : getRoutingPolicy().keySet()) { + if (getRoutingPolicy().get(_key) != null) { + joiner.add( + getRoutingPolicy() + .get(_key) + .toUrlQueryString( + String.format( + "%sroutingPolicy%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + _key, + containerSuffix)))); + } + } } return joiner.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicy.java b/src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicy.java deleted file mode 100644 index 87c58a9..0000000 --- a/src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicy.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@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 java.util.Objects; -import java.util.StringJoiner; - -/** NetworkConnectionRoutingPolicy */ -@JsonPropertyOrder({ - NetworkConnectionRoutingPolicy.JSON_PROPERTY_CRYPTO, - NetworkConnectionRoutingPolicy.JSON_PROPERTY_SEN, - NetworkConnectionRoutingPolicy.JSON_PROPERTY_SIGNET, - NetworkConnectionRoutingPolicy.JSON_PROPERTY_SEN_TEST, - NetworkConnectionRoutingPolicy.JSON_PROPERTY_SIGNET_TEST -}) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NetworkConnectionRoutingPolicy { - public static final String JSON_PROPERTY_CRYPTO = "crypto"; - private NetworkConnectionRoutingPolicyCrypto crypto; - - public static final String JSON_PROPERTY_SEN = "sen"; - private NetworkConnectionRoutingPolicySen sen; - - public static final String JSON_PROPERTY_SIGNET = "signet"; - private NetworkConnectionRoutingPolicySignet signet; - - public static final String JSON_PROPERTY_SEN_TEST = "sen_test"; - private NetworkConnectionRoutingPolicySenTest senTest; - - public static final String JSON_PROPERTY_SIGNET_TEST = "signet_test"; - private NetworkConnectionRoutingPolicySignetTest signetTest; - - public NetworkConnectionRoutingPolicy() {} - - public NetworkConnectionRoutingPolicy crypto(NetworkConnectionRoutingPolicyCrypto crypto) { - this.crypto = crypto; - return this; - } - - /** - * Get crypto - * - * @return crypto - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CRYPTO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NetworkConnectionRoutingPolicyCrypto getCrypto() { - return crypto; - } - - @JsonProperty(JSON_PROPERTY_CRYPTO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCrypto(NetworkConnectionRoutingPolicyCrypto crypto) { - this.crypto = crypto; - } - - public NetworkConnectionRoutingPolicy sen(NetworkConnectionRoutingPolicySen sen) { - this.sen = sen; - return this; - } - - /** - * Get sen - * - * @return sen - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SEN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NetworkConnectionRoutingPolicySen getSen() { - return sen; - } - - @JsonProperty(JSON_PROPERTY_SEN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSen(NetworkConnectionRoutingPolicySen sen) { - this.sen = sen; - } - - public NetworkConnectionRoutingPolicy signet(NetworkConnectionRoutingPolicySignet signet) { - this.signet = signet; - return this; - } - - /** - * Get signet - * - * @return signet - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SIGNET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NetworkConnectionRoutingPolicySignet getSignet() { - return signet; - } - - @JsonProperty(JSON_PROPERTY_SIGNET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignet(NetworkConnectionRoutingPolicySignet signet) { - this.signet = signet; - } - - public NetworkConnectionRoutingPolicy senTest(NetworkConnectionRoutingPolicySenTest senTest) { - this.senTest = senTest; - return this; - } - - /** - * Get senTest - * - * @return senTest - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SEN_TEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NetworkConnectionRoutingPolicySenTest getSenTest() { - return senTest; - } - - @JsonProperty(JSON_PROPERTY_SEN_TEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSenTest(NetworkConnectionRoutingPolicySenTest senTest) { - this.senTest = senTest; - } - - public NetworkConnectionRoutingPolicy signetTest( - NetworkConnectionRoutingPolicySignetTest signetTest) { - this.signetTest = signetTest; - return this; - } - - /** - * Get signetTest - * - * @return signetTest - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SIGNET_TEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NetworkConnectionRoutingPolicySignetTest getSignetTest() { - return signetTest; - } - - @JsonProperty(JSON_PROPERTY_SIGNET_TEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignetTest(NetworkConnectionRoutingPolicySignetTest signetTest) { - this.signetTest = signetTest; - } - - /** Return true if this NetworkConnectionRoutingPolicy object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NetworkConnectionRoutingPolicy networkConnectionRoutingPolicy = - (NetworkConnectionRoutingPolicy) o; - return Objects.equals(this.crypto, networkConnectionRoutingPolicy.crypto) - && Objects.equals(this.sen, networkConnectionRoutingPolicy.sen) - && Objects.equals(this.signet, networkConnectionRoutingPolicy.signet) - && Objects.equals(this.senTest, networkConnectionRoutingPolicy.senTest) - && Objects.equals(this.signetTest, networkConnectionRoutingPolicy.signetTest); - } - - @Override - public int hashCode() { - return Objects.hash(crypto, sen, signet, senTest, signetTest); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NetworkConnectionRoutingPolicy {\n"); - sb.append(" crypto: ").append(toIndentedString(crypto)).append("\n"); - sb.append(" sen: ").append(toIndentedString(sen)).append("\n"); - sb.append(" signet: ").append(toIndentedString(signet)).append("\n"); - sb.append(" senTest: ").append(toIndentedString(senTest)).append("\n"); - sb.append(" signetTest: ").append(toIndentedString(signetTest)).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 `crypto` to the URL query string - if (getCrypto() != null) { - joiner.add(getCrypto().toUrlQueryString(prefix + "crypto" + suffix)); - } - - // add `sen` to the URL query string - if (getSen() != null) { - joiner.add(getSen().toUrlQueryString(prefix + "sen" + suffix)); - } - - // add `signet` to the URL query string - if (getSignet() != null) { - joiner.add(getSignet().toUrlQueryString(prefix + "signet" + suffix)); - } - - // add `sen_test` to the URL query string - if (getSenTest() != null) { - joiner.add(getSenTest().toUrlQueryString(prefix + "sen_test" + suffix)); - } - - // add `signet_test` to the URL query string - if (getSignetTest() != null) { - joiner.add(getSignetTest().toUrlQueryString(prefix + "signet_test" + suffix)); - } - - return joiner.toString(); - } -} diff --git a/src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySenTest.java b/src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySenTest.java deleted file mode 100644 index f8199d2..0000000 --- a/src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySenTest.java +++ /dev/null @@ -1,421 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@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") -@JsonDeserialize( - using = - NetworkConnectionRoutingPolicySenTest - .NetworkConnectionRoutingPolicySenTestDeserializer.class) -@JsonSerialize( - using = - NetworkConnectionRoutingPolicySenTest - .NetworkConnectionRoutingPolicySenTestSerializer.class) -public class NetworkConnectionRoutingPolicySenTest extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(NetworkConnectionRoutingPolicySenTest.class.getName()); - - public static class NetworkConnectionRoutingPolicySenTestSerializer - extends StdSerializer { - public NetworkConnectionRoutingPolicySenTestSerializer( - Class t) { - super(t); - } - - public NetworkConnectionRoutingPolicySenTestSerializer() { - this(null); - } - - @Override - public void serialize( - NetworkConnectionRoutingPolicySenTest value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); - } - } - - public static class NetworkConnectionRoutingPolicySenTestDeserializer - extends StdDeserializer { - public NetworkConnectionRoutingPolicySenTestDeserializer() { - this(NetworkConnectionRoutingPolicySenTest.class); - } - - public NetworkConnectionRoutingPolicySenTestDeserializer(Class vc) { - super(vc); - } - - @Override - public NetworkConnectionRoutingPolicySenTest 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 CustomFiatRoutingDest - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (CustomFiatRoutingDest.class.equals(Integer.class) - || CustomFiatRoutingDest.class.equals(Long.class) - || CustomFiatRoutingDest.class.equals(Float.class) - || CustomFiatRoutingDest.class.equals(Double.class) - || CustomFiatRoutingDest.class.equals(Boolean.class) - || CustomFiatRoutingDest.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((CustomFiatRoutingDest.class.equals(Integer.class) - || CustomFiatRoutingDest.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((CustomFiatRoutingDest.class.equals(Float.class) - || CustomFiatRoutingDest.class.equals(Double.class)) - && token == JsonToken.VALUE_NUMBER_FLOAT); - attemptParsing |= - (CustomFiatRoutingDest.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE - || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (CustomFiatRoutingDest.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - deserialized = - tree.traverse(jp.getCodec()).readValueAs(CustomFiatRoutingDest.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 'CustomFiatRoutingDest'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'CustomFiatRoutingDest'", e); - } - - // deserialize DefaultNetworkRoutingDest - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (DefaultNetworkRoutingDest.class.equals(Integer.class) - || DefaultNetworkRoutingDest.class.equals(Long.class) - || DefaultNetworkRoutingDest.class.equals(Float.class) - || DefaultNetworkRoutingDest.class.equals(Double.class) - || DefaultNetworkRoutingDest.class.equals(Boolean.class) - || DefaultNetworkRoutingDest.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((DefaultNetworkRoutingDest.class.equals(Integer.class) - || DefaultNetworkRoutingDest.class.equals( - Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((DefaultNetworkRoutingDest.class.equals(Float.class) - || DefaultNetworkRoutingDest.class.equals( - Double.class)) - && token == JsonToken.VALUE_NUMBER_FLOAT); - attemptParsing |= - (DefaultNetworkRoutingDest.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE - || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (DefaultNetworkRoutingDest.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - deserialized = - tree.traverse(jp.getCodec()) - .readValueAs(DefaultNetworkRoutingDest.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 'DefaultNetworkRoutingDest'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'DefaultNetworkRoutingDest'", - e); - } - - // deserialize NoneNetworkRoutingDest - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NoneNetworkRoutingDest.class.equals(Integer.class) - || NoneNetworkRoutingDest.class.equals(Long.class) - || NoneNetworkRoutingDest.class.equals(Float.class) - || NoneNetworkRoutingDest.class.equals(Double.class) - || NoneNetworkRoutingDest.class.equals(Boolean.class) - || NoneNetworkRoutingDest.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NoneNetworkRoutingDest.class.equals(Integer.class) - || NoneNetworkRoutingDest.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NoneNetworkRoutingDest.class.equals(Float.class) - || NoneNetworkRoutingDest.class.equals( - Double.class)) - && token == JsonToken.VALUE_NUMBER_FLOAT); - attemptParsing |= - (NoneNetworkRoutingDest.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE - || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NoneNetworkRoutingDest.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - deserialized = - tree.traverse(jp.getCodec()).readValueAs(NoneNetworkRoutingDest.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 'NoneNetworkRoutingDest'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'NoneNetworkRoutingDest'", - e); - } - - if (match == 1) { - NetworkConnectionRoutingPolicySenTest ret = - new NetworkConnectionRoutingPolicySenTest(); - ret.setActualInstance(deserialized); - return ret; - } - throw new IOException( - String.format( - "Failed deserialization for NetworkConnectionRoutingPolicySenTest: %d" - + " classes match result, expected 1", - match)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public NetworkConnectionRoutingPolicySenTest getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "NetworkConnectionRoutingPolicySenTest cannot be null"); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap<>(); - - public NetworkConnectionRoutingPolicySenTest() { - super("oneOf", Boolean.FALSE); - } - - public NetworkConnectionRoutingPolicySenTest(CustomFiatRoutingDest o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public NetworkConnectionRoutingPolicySenTest(DefaultNetworkRoutingDest o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public NetworkConnectionRoutingPolicySenTest(NoneNetworkRoutingDest o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("CustomFiatRoutingDest", CustomFiatRoutingDest.class); - schemas.put("DefaultNetworkRoutingDest", DefaultNetworkRoutingDest.class); - schemas.put("NoneNetworkRoutingDest", NoneNetworkRoutingDest.class); - JSON.registerDescendants( - NetworkConnectionRoutingPolicySenTest.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map> getSchemas() { - return NetworkConnectionRoutingPolicySenTest.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: CustomFiatRoutingDest, DefaultNetworkRoutingDest, - * NoneNetworkRoutingDest - * - *

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(CustomFiatRoutingDest.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - - if (JSON.isInstanceOf(DefaultNetworkRoutingDest.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - - if (JSON.isInstanceOf(NoneNetworkRoutingDest.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException( - "Invalid instance type. Must be CustomFiatRoutingDest, DefaultNetworkRoutingDest," - + " NoneNetworkRoutingDest"); - } - - /** - * Get the actual instance, which can be the following: CustomFiatRoutingDest, - * DefaultNetworkRoutingDest, NoneNetworkRoutingDest - * - * @return The actual instance (CustomFiatRoutingDest, DefaultNetworkRoutingDest, - * NoneNetworkRoutingDest) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `CustomFiatRoutingDest`. If the actual instance is not - * `CustomFiatRoutingDest`, the ClassCastException will be thrown. - * - * @return The actual instance of `CustomFiatRoutingDest` - * @throws ClassCastException if the instance is not `CustomFiatRoutingDest` - */ - public CustomFiatRoutingDest getCustomFiatRoutingDest() throws ClassCastException { - return (CustomFiatRoutingDest) super.getActualInstance(); - } - - /** - * Get the actual instance of `DefaultNetworkRoutingDest`. If the actual instance is not - * `DefaultNetworkRoutingDest`, the ClassCastException will be thrown. - * - * @return The actual instance of `DefaultNetworkRoutingDest` - * @throws ClassCastException if the instance is not `DefaultNetworkRoutingDest` - */ - public DefaultNetworkRoutingDest getDefaultNetworkRoutingDest() throws ClassCastException { - return (DefaultNetworkRoutingDest) super.getActualInstance(); - } - - /** - * Get the actual instance of `NoneNetworkRoutingDest`. If the actual instance is not - * `NoneNetworkRoutingDest`, the ClassCastException will be thrown. - * - * @return The actual instance of `NoneNetworkRoutingDest` - * @throws ClassCastException if the instance is not `NoneNetworkRoutingDest` - */ - public NoneNetworkRoutingDest getNoneNetworkRoutingDest() throws ClassCastException { - return (NoneNetworkRoutingDest) 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 DefaultNetworkRoutingDest) { - if (getActualInstance() != null) { - joiner.add( - ((DefaultNetworkRoutingDest) getActualInstance()) - .toUrlQueryString(prefix + "one_of_0" + suffix)); - } - return joiner.toString(); - } - if (getActualInstance() instanceof NoneNetworkRoutingDest) { - if (getActualInstance() != null) { - joiner.add( - ((NoneNetworkRoutingDest) getActualInstance()) - .toUrlQueryString(prefix + "one_of_1" + suffix)); - } - return joiner.toString(); - } - if (getActualInstance() instanceof CustomFiatRoutingDest) { - if (getActualInstance() != null) { - joiner.add( - ((CustomFiatRoutingDest) getActualInstance()) - .toUrlQueryString(prefix + "one_of_2" + suffix)); - } - return joiner.toString(); - } - return null; - } -} diff --git a/src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySignet.java b/src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySignet.java deleted file mode 100644 index 53aab72..0000000 --- a/src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySignet.java +++ /dev/null @@ -1,421 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@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") -@JsonDeserialize( - using = - NetworkConnectionRoutingPolicySignet - .NetworkConnectionRoutingPolicySignetDeserializer.class) -@JsonSerialize( - using = - NetworkConnectionRoutingPolicySignet.NetworkConnectionRoutingPolicySignetSerializer - .class) -public class NetworkConnectionRoutingPolicySignet extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(NetworkConnectionRoutingPolicySignet.class.getName()); - - public static class NetworkConnectionRoutingPolicySignetSerializer - extends StdSerializer { - public NetworkConnectionRoutingPolicySignetSerializer( - Class t) { - super(t); - } - - public NetworkConnectionRoutingPolicySignetSerializer() { - this(null); - } - - @Override - public void serialize( - NetworkConnectionRoutingPolicySignet value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); - } - } - - public static class NetworkConnectionRoutingPolicySignetDeserializer - extends StdDeserializer { - public NetworkConnectionRoutingPolicySignetDeserializer() { - this(NetworkConnectionRoutingPolicySignet.class); - } - - public NetworkConnectionRoutingPolicySignetDeserializer(Class vc) { - super(vc); - } - - @Override - public NetworkConnectionRoutingPolicySignet 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 CustomFiatRoutingDest - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (CustomFiatRoutingDest.class.equals(Integer.class) - || CustomFiatRoutingDest.class.equals(Long.class) - || CustomFiatRoutingDest.class.equals(Float.class) - || CustomFiatRoutingDest.class.equals(Double.class) - || CustomFiatRoutingDest.class.equals(Boolean.class) - || CustomFiatRoutingDest.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((CustomFiatRoutingDest.class.equals(Integer.class) - || CustomFiatRoutingDest.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((CustomFiatRoutingDest.class.equals(Float.class) - || CustomFiatRoutingDest.class.equals(Double.class)) - && token == JsonToken.VALUE_NUMBER_FLOAT); - attemptParsing |= - (CustomFiatRoutingDest.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE - || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (CustomFiatRoutingDest.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - deserialized = - tree.traverse(jp.getCodec()).readValueAs(CustomFiatRoutingDest.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 'CustomFiatRoutingDest'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'CustomFiatRoutingDest'", e); - } - - // deserialize DefaultNetworkRoutingDest - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (DefaultNetworkRoutingDest.class.equals(Integer.class) - || DefaultNetworkRoutingDest.class.equals(Long.class) - || DefaultNetworkRoutingDest.class.equals(Float.class) - || DefaultNetworkRoutingDest.class.equals(Double.class) - || DefaultNetworkRoutingDest.class.equals(Boolean.class) - || DefaultNetworkRoutingDest.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((DefaultNetworkRoutingDest.class.equals(Integer.class) - || DefaultNetworkRoutingDest.class.equals( - Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((DefaultNetworkRoutingDest.class.equals(Float.class) - || DefaultNetworkRoutingDest.class.equals( - Double.class)) - && token == JsonToken.VALUE_NUMBER_FLOAT); - attemptParsing |= - (DefaultNetworkRoutingDest.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE - || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (DefaultNetworkRoutingDest.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - deserialized = - tree.traverse(jp.getCodec()) - .readValueAs(DefaultNetworkRoutingDest.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 'DefaultNetworkRoutingDest'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'DefaultNetworkRoutingDest'", - e); - } - - // deserialize NoneNetworkRoutingDest - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NoneNetworkRoutingDest.class.equals(Integer.class) - || NoneNetworkRoutingDest.class.equals(Long.class) - || NoneNetworkRoutingDest.class.equals(Float.class) - || NoneNetworkRoutingDest.class.equals(Double.class) - || NoneNetworkRoutingDest.class.equals(Boolean.class) - || NoneNetworkRoutingDest.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NoneNetworkRoutingDest.class.equals(Integer.class) - || NoneNetworkRoutingDest.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NoneNetworkRoutingDest.class.equals(Float.class) - || NoneNetworkRoutingDest.class.equals( - Double.class)) - && token == JsonToken.VALUE_NUMBER_FLOAT); - attemptParsing |= - (NoneNetworkRoutingDest.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE - || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NoneNetworkRoutingDest.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - deserialized = - tree.traverse(jp.getCodec()).readValueAs(NoneNetworkRoutingDest.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 'NoneNetworkRoutingDest'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'NoneNetworkRoutingDest'", - e); - } - - if (match == 1) { - NetworkConnectionRoutingPolicySignet ret = - new NetworkConnectionRoutingPolicySignet(); - ret.setActualInstance(deserialized); - return ret; - } - throw new IOException( - String.format( - "Failed deserialization for NetworkConnectionRoutingPolicySignet: %d" - + " classes match result, expected 1", - match)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public NetworkConnectionRoutingPolicySignet getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "NetworkConnectionRoutingPolicySignet cannot be null"); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap<>(); - - public NetworkConnectionRoutingPolicySignet() { - super("oneOf", Boolean.FALSE); - } - - public NetworkConnectionRoutingPolicySignet(CustomFiatRoutingDest o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public NetworkConnectionRoutingPolicySignet(DefaultNetworkRoutingDest o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public NetworkConnectionRoutingPolicySignet(NoneNetworkRoutingDest o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("CustomFiatRoutingDest", CustomFiatRoutingDest.class); - schemas.put("DefaultNetworkRoutingDest", DefaultNetworkRoutingDest.class); - schemas.put("NoneNetworkRoutingDest", NoneNetworkRoutingDest.class); - JSON.registerDescendants( - NetworkConnectionRoutingPolicySignet.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map> getSchemas() { - return NetworkConnectionRoutingPolicySignet.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: CustomFiatRoutingDest, DefaultNetworkRoutingDest, - * NoneNetworkRoutingDest - * - *

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(CustomFiatRoutingDest.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - - if (JSON.isInstanceOf(DefaultNetworkRoutingDest.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - - if (JSON.isInstanceOf(NoneNetworkRoutingDest.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException( - "Invalid instance type. Must be CustomFiatRoutingDest, DefaultNetworkRoutingDest," - + " NoneNetworkRoutingDest"); - } - - /** - * Get the actual instance, which can be the following: CustomFiatRoutingDest, - * DefaultNetworkRoutingDest, NoneNetworkRoutingDest - * - * @return The actual instance (CustomFiatRoutingDest, DefaultNetworkRoutingDest, - * NoneNetworkRoutingDest) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `CustomFiatRoutingDest`. If the actual instance is not - * `CustomFiatRoutingDest`, the ClassCastException will be thrown. - * - * @return The actual instance of `CustomFiatRoutingDest` - * @throws ClassCastException if the instance is not `CustomFiatRoutingDest` - */ - public CustomFiatRoutingDest getCustomFiatRoutingDest() throws ClassCastException { - return (CustomFiatRoutingDest) super.getActualInstance(); - } - - /** - * Get the actual instance of `DefaultNetworkRoutingDest`. If the actual instance is not - * `DefaultNetworkRoutingDest`, the ClassCastException will be thrown. - * - * @return The actual instance of `DefaultNetworkRoutingDest` - * @throws ClassCastException if the instance is not `DefaultNetworkRoutingDest` - */ - public DefaultNetworkRoutingDest getDefaultNetworkRoutingDest() throws ClassCastException { - return (DefaultNetworkRoutingDest) super.getActualInstance(); - } - - /** - * Get the actual instance of `NoneNetworkRoutingDest`. If the actual instance is not - * `NoneNetworkRoutingDest`, the ClassCastException will be thrown. - * - * @return The actual instance of `NoneNetworkRoutingDest` - * @throws ClassCastException if the instance is not `NoneNetworkRoutingDest` - */ - public NoneNetworkRoutingDest getNoneNetworkRoutingDest() throws ClassCastException { - return (NoneNetworkRoutingDest) 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 DefaultNetworkRoutingDest) { - if (getActualInstance() != null) { - joiner.add( - ((DefaultNetworkRoutingDest) getActualInstance()) - .toUrlQueryString(prefix + "one_of_0" + suffix)); - } - return joiner.toString(); - } - if (getActualInstance() instanceof CustomFiatRoutingDest) { - if (getActualInstance() != null) { - joiner.add( - ((CustomFiatRoutingDest) getActualInstance()) - .toUrlQueryString(prefix + "one_of_1" + suffix)); - } - return joiner.toString(); - } - if (getActualInstance() instanceof NoneNetworkRoutingDest) { - if (getActualInstance() != null) { - joiner.add( - ((NoneNetworkRoutingDest) getActualInstance()) - .toUrlQueryString(prefix + "one_of_2" + suffix)); - } - return joiner.toString(); - } - return null; - } -} diff --git a/src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySignetTest.java b/src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySignetTest.java deleted file mode 100644 index b007d0b..0000000 --- a/src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySignetTest.java +++ /dev/null @@ -1,422 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@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") -@JsonDeserialize( - using = - NetworkConnectionRoutingPolicySignetTest - .NetworkConnectionRoutingPolicySignetTestDeserializer.class) -@JsonSerialize( - using = - NetworkConnectionRoutingPolicySignetTest - .NetworkConnectionRoutingPolicySignetTestSerializer.class) -public class NetworkConnectionRoutingPolicySignetTest extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(NetworkConnectionRoutingPolicySignetTest.class.getName()); - - public static class NetworkConnectionRoutingPolicySignetTestSerializer - extends StdSerializer { - public NetworkConnectionRoutingPolicySignetTestSerializer( - Class t) { - super(t); - } - - public NetworkConnectionRoutingPolicySignetTestSerializer() { - this(null); - } - - @Override - public void serialize( - NetworkConnectionRoutingPolicySignetTest value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); - } - } - - public static class NetworkConnectionRoutingPolicySignetTestDeserializer - extends StdDeserializer { - public NetworkConnectionRoutingPolicySignetTestDeserializer() { - this(NetworkConnectionRoutingPolicySignetTest.class); - } - - public NetworkConnectionRoutingPolicySignetTestDeserializer(Class vc) { - super(vc); - } - - @Override - public NetworkConnectionRoutingPolicySignetTest 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 CustomFiatRoutingDest - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (CustomFiatRoutingDest.class.equals(Integer.class) - || CustomFiatRoutingDest.class.equals(Long.class) - || CustomFiatRoutingDest.class.equals(Float.class) - || CustomFiatRoutingDest.class.equals(Double.class) - || CustomFiatRoutingDest.class.equals(Boolean.class) - || CustomFiatRoutingDest.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((CustomFiatRoutingDest.class.equals(Integer.class) - || CustomFiatRoutingDest.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((CustomFiatRoutingDest.class.equals(Float.class) - || CustomFiatRoutingDest.class.equals(Double.class)) - && token == JsonToken.VALUE_NUMBER_FLOAT); - attemptParsing |= - (CustomFiatRoutingDest.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE - || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (CustomFiatRoutingDest.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - deserialized = - tree.traverse(jp.getCodec()).readValueAs(CustomFiatRoutingDest.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 'CustomFiatRoutingDest'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'CustomFiatRoutingDest'", e); - } - - // deserialize DefaultNetworkRoutingDest - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (DefaultNetworkRoutingDest.class.equals(Integer.class) - || DefaultNetworkRoutingDest.class.equals(Long.class) - || DefaultNetworkRoutingDest.class.equals(Float.class) - || DefaultNetworkRoutingDest.class.equals(Double.class) - || DefaultNetworkRoutingDest.class.equals(Boolean.class) - || DefaultNetworkRoutingDest.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((DefaultNetworkRoutingDest.class.equals(Integer.class) - || DefaultNetworkRoutingDest.class.equals( - Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((DefaultNetworkRoutingDest.class.equals(Float.class) - || DefaultNetworkRoutingDest.class.equals( - Double.class)) - && token == JsonToken.VALUE_NUMBER_FLOAT); - attemptParsing |= - (DefaultNetworkRoutingDest.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE - || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (DefaultNetworkRoutingDest.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - deserialized = - tree.traverse(jp.getCodec()) - .readValueAs(DefaultNetworkRoutingDest.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 'DefaultNetworkRoutingDest'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'DefaultNetworkRoutingDest'", - e); - } - - // deserialize NoneNetworkRoutingDest - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NoneNetworkRoutingDest.class.equals(Integer.class) - || NoneNetworkRoutingDest.class.equals(Long.class) - || NoneNetworkRoutingDest.class.equals(Float.class) - || NoneNetworkRoutingDest.class.equals(Double.class) - || NoneNetworkRoutingDest.class.equals(Boolean.class) - || NoneNetworkRoutingDest.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NoneNetworkRoutingDest.class.equals(Integer.class) - || NoneNetworkRoutingDest.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NoneNetworkRoutingDest.class.equals(Float.class) - || NoneNetworkRoutingDest.class.equals( - Double.class)) - && token == JsonToken.VALUE_NUMBER_FLOAT); - attemptParsing |= - (NoneNetworkRoutingDest.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE - || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NoneNetworkRoutingDest.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - deserialized = - tree.traverse(jp.getCodec()).readValueAs(NoneNetworkRoutingDest.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 'NoneNetworkRoutingDest'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'NoneNetworkRoutingDest'", - e); - } - - if (match == 1) { - NetworkConnectionRoutingPolicySignetTest ret = - new NetworkConnectionRoutingPolicySignetTest(); - ret.setActualInstance(deserialized); - return ret; - } - throw new IOException( - String.format( - "Failed deserialization for NetworkConnectionRoutingPolicySignetTest:" - + " %d classes match result, expected 1", - match)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public NetworkConnectionRoutingPolicySignetTest getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "NetworkConnectionRoutingPolicySignetTest cannot be null"); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap<>(); - - public NetworkConnectionRoutingPolicySignetTest() { - super("oneOf", Boolean.FALSE); - } - - public NetworkConnectionRoutingPolicySignetTest(CustomFiatRoutingDest o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public NetworkConnectionRoutingPolicySignetTest(DefaultNetworkRoutingDest o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public NetworkConnectionRoutingPolicySignetTest(NoneNetworkRoutingDest o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("CustomFiatRoutingDest", CustomFiatRoutingDest.class); - schemas.put("DefaultNetworkRoutingDest", DefaultNetworkRoutingDest.class); - schemas.put("NoneNetworkRoutingDest", NoneNetworkRoutingDest.class); - JSON.registerDescendants( - NetworkConnectionRoutingPolicySignetTest.class, - Collections.unmodifiableMap(schemas)); - } - - @Override - public Map> getSchemas() { - return NetworkConnectionRoutingPolicySignetTest.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: CustomFiatRoutingDest, DefaultNetworkRoutingDest, - * NoneNetworkRoutingDest - * - *

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(CustomFiatRoutingDest.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - - if (JSON.isInstanceOf(DefaultNetworkRoutingDest.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - - if (JSON.isInstanceOf(NoneNetworkRoutingDest.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException( - "Invalid instance type. Must be CustomFiatRoutingDest, DefaultNetworkRoutingDest," - + " NoneNetworkRoutingDest"); - } - - /** - * Get the actual instance, which can be the following: CustomFiatRoutingDest, - * DefaultNetworkRoutingDest, NoneNetworkRoutingDest - * - * @return The actual instance (CustomFiatRoutingDest, DefaultNetworkRoutingDest, - * NoneNetworkRoutingDest) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `CustomFiatRoutingDest`. If the actual instance is not - * `CustomFiatRoutingDest`, the ClassCastException will be thrown. - * - * @return The actual instance of `CustomFiatRoutingDest` - * @throws ClassCastException if the instance is not `CustomFiatRoutingDest` - */ - public CustomFiatRoutingDest getCustomFiatRoutingDest() throws ClassCastException { - return (CustomFiatRoutingDest) super.getActualInstance(); - } - - /** - * Get the actual instance of `DefaultNetworkRoutingDest`. If the actual instance is not - * `DefaultNetworkRoutingDest`, the ClassCastException will be thrown. - * - * @return The actual instance of `DefaultNetworkRoutingDest` - * @throws ClassCastException if the instance is not `DefaultNetworkRoutingDest` - */ - public DefaultNetworkRoutingDest getDefaultNetworkRoutingDest() throws ClassCastException { - return (DefaultNetworkRoutingDest) super.getActualInstance(); - } - - /** - * Get the actual instance of `NoneNetworkRoutingDest`. If the actual instance is not - * `NoneNetworkRoutingDest`, the ClassCastException will be thrown. - * - * @return The actual instance of `NoneNetworkRoutingDest` - * @throws ClassCastException if the instance is not `NoneNetworkRoutingDest` - */ - public NoneNetworkRoutingDest getNoneNetworkRoutingDest() throws ClassCastException { - return (NoneNetworkRoutingDest) 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 NoneNetworkRoutingDest) { - if (getActualInstance() != null) { - joiner.add( - ((NoneNetworkRoutingDest) getActualInstance()) - .toUrlQueryString(prefix + "one_of_0" + suffix)); - } - return joiner.toString(); - } - if (getActualInstance() instanceof CustomFiatRoutingDest) { - if (getActualInstance() != null) { - joiner.add( - ((CustomFiatRoutingDest) getActualInstance()) - .toUrlQueryString(prefix + "one_of_1" + suffix)); - } - return joiner.toString(); - } - if (getActualInstance() instanceof DefaultNetworkRoutingDest) { - if (getActualInstance() != null) { - joiner.add( - ((DefaultNetworkRoutingDest) getActualInstance()) - .toUrlQueryString(prefix + "one_of_2" + suffix)); - } - return joiner.toString(); - } - return null; - } -} diff --git a/src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySen.java b/src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicyValue.java similarity index 80% rename from src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySen.java rename to src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicyValue.java index a51c3f4..21071ac 100644 --- a/src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySen.java +++ b/src/main/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicyValue.java @@ -39,28 +39,30 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @JsonDeserialize( using = - NetworkConnectionRoutingPolicySen.NetworkConnectionRoutingPolicySenDeserializer + NetworkConnectionRoutingPolicyValue.NetworkConnectionRoutingPolicyValueDeserializer .class) @JsonSerialize( - using = NetworkConnectionRoutingPolicySen.NetworkConnectionRoutingPolicySenSerializer.class) -public class NetworkConnectionRoutingPolicySen extends AbstractOpenApiSchema { + using = + NetworkConnectionRoutingPolicyValue.NetworkConnectionRoutingPolicyValueSerializer + .class) +public class NetworkConnectionRoutingPolicyValue extends AbstractOpenApiSchema { private static final Logger log = - Logger.getLogger(NetworkConnectionRoutingPolicySen.class.getName()); + Logger.getLogger(NetworkConnectionRoutingPolicyValue.class.getName()); - public static class NetworkConnectionRoutingPolicySenSerializer - extends StdSerializer { - public NetworkConnectionRoutingPolicySenSerializer( - Class t) { + public static class NetworkConnectionRoutingPolicyValueSerializer + extends StdSerializer { + public NetworkConnectionRoutingPolicyValueSerializer( + Class t) { super(t); } - public NetworkConnectionRoutingPolicySenSerializer() { + public NetworkConnectionRoutingPolicyValueSerializer() { this(null); } @Override public void serialize( - NetworkConnectionRoutingPolicySen value, + NetworkConnectionRoutingPolicyValue value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { @@ -68,18 +70,18 @@ public void serialize( } } - public static class NetworkConnectionRoutingPolicySenDeserializer - extends StdDeserializer { - public NetworkConnectionRoutingPolicySenDeserializer() { - this(NetworkConnectionRoutingPolicySen.class); + public static class NetworkConnectionRoutingPolicyValueDeserializer + extends StdDeserializer { + public NetworkConnectionRoutingPolicyValueDeserializer() { + this(NetworkConnectionRoutingPolicyValue.class); } - public NetworkConnectionRoutingPolicySenDeserializer(Class vc) { + public NetworkConnectionRoutingPolicyValueDeserializer(Class vc) { super(vc); } @Override - public NetworkConnectionRoutingPolicySen deserialize( + public NetworkConnectionRoutingPolicyValue deserialize( JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { JsonNode tree = jp.readValueAsTree(); @@ -87,47 +89,47 @@ public NetworkConnectionRoutingPolicySen deserialize( boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); int match = 0; JsonToken token = tree.traverse(jp.getCodec()).nextToken(); - // deserialize CustomFiatRoutingDest + // deserialize CustomRoutingDest try { boolean attemptParsing = true; // ensure that we respect type coercion as set on the client ObjectMapper - if (CustomFiatRoutingDest.class.equals(Integer.class) - || CustomFiatRoutingDest.class.equals(Long.class) - || CustomFiatRoutingDest.class.equals(Float.class) - || CustomFiatRoutingDest.class.equals(Double.class) - || CustomFiatRoutingDest.class.equals(Boolean.class) - || CustomFiatRoutingDest.class.equals(String.class)) { + if (CustomRoutingDest.class.equals(Integer.class) + || CustomRoutingDest.class.equals(Long.class) + || CustomRoutingDest.class.equals(Float.class) + || CustomRoutingDest.class.equals(Double.class) + || CustomRoutingDest.class.equals(Boolean.class) + || CustomRoutingDest.class.equals(String.class)) { attemptParsing = typeCoercion; if (!attemptParsing) { attemptParsing |= - ((CustomFiatRoutingDest.class.equals(Integer.class) - || CustomFiatRoutingDest.class.equals(Long.class)) + ((CustomRoutingDest.class.equals(Integer.class) + || CustomRoutingDest.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); attemptParsing |= - ((CustomFiatRoutingDest.class.equals(Float.class) - || CustomFiatRoutingDest.class.equals(Double.class)) + ((CustomRoutingDest.class.equals(Float.class) + || CustomRoutingDest.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); attemptParsing |= - (CustomFiatRoutingDest.class.equals(Boolean.class) + (CustomRoutingDest.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); attemptParsing |= - (CustomFiatRoutingDest.class.equals(String.class) + (CustomRoutingDest.class.equals(String.class) && token == JsonToken.VALUE_STRING); } } if (attemptParsing) { deserialized = - tree.traverse(jp.getCodec()).readValueAs(CustomFiatRoutingDest.class); + tree.traverse(jp.getCodec()).readValueAs(CustomRoutingDest.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 'CustomFiatRoutingDest'"); + log.log(Level.FINER, "Input data matches schema 'CustomRoutingDest'"); } } catch (Exception e) { // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'CustomFiatRoutingDest'", e); + log.log(Level.FINER, "Input data does not match schema 'CustomRoutingDest'", e); } // deserialize DefaultNetworkRoutingDest @@ -227,64 +229,64 @@ public NetworkConnectionRoutingPolicySen deserialize( } if (match == 1) { - NetworkConnectionRoutingPolicySen ret = new NetworkConnectionRoutingPolicySen(); + NetworkConnectionRoutingPolicyValue ret = new NetworkConnectionRoutingPolicyValue(); ret.setActualInstance(deserialized); return ret; } throw new IOException( String.format( - "Failed deserialization for NetworkConnectionRoutingPolicySen: %d" + "Failed deserialization for NetworkConnectionRoutingPolicyValue: %d" + " classes match result, expected 1", match)); } /** Handle deserialization of the 'null' value. */ @Override - public NetworkConnectionRoutingPolicySen getNullValue(DeserializationContext ctxt) + public NetworkConnectionRoutingPolicyValue getNullValue(DeserializationContext ctxt) throws JsonMappingException { throw new JsonMappingException( - ctxt.getParser(), "NetworkConnectionRoutingPolicySen cannot be null"); + ctxt.getParser(), "NetworkConnectionRoutingPolicyValue cannot be null"); } } // store a list of schema names defined in oneOf public static final Map> schemas = new HashMap<>(); - public NetworkConnectionRoutingPolicySen() { + public NetworkConnectionRoutingPolicyValue() { super("oneOf", Boolean.FALSE); } - public NetworkConnectionRoutingPolicySen(CustomFiatRoutingDest o) { + public NetworkConnectionRoutingPolicyValue(CustomRoutingDest o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } - public NetworkConnectionRoutingPolicySen(DefaultNetworkRoutingDest o) { + public NetworkConnectionRoutingPolicyValue(DefaultNetworkRoutingDest o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } - public NetworkConnectionRoutingPolicySen(NoneNetworkRoutingDest o) { + public NetworkConnectionRoutingPolicyValue(NoneNetworkRoutingDest o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } static { - schemas.put("CustomFiatRoutingDest", CustomFiatRoutingDest.class); + schemas.put("CustomRoutingDest", CustomRoutingDest.class); schemas.put("DefaultNetworkRoutingDest", DefaultNetworkRoutingDest.class); schemas.put("NoneNetworkRoutingDest", NoneNetworkRoutingDest.class); JSON.registerDescendants( - NetworkConnectionRoutingPolicySen.class, Collections.unmodifiableMap(schemas)); + NetworkConnectionRoutingPolicyValue.class, Collections.unmodifiableMap(schemas)); } @Override public Map> getSchemas() { - return NetworkConnectionRoutingPolicySen.schemas; + return NetworkConnectionRoutingPolicyValue.schemas; } /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: CustomFiatRoutingDest, DefaultNetworkRoutingDest, + * against the oneOf child schemas: CustomRoutingDest, DefaultNetworkRoutingDest, * NoneNetworkRoutingDest * *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be @@ -292,7 +294,7 @@ public Map> getSchemas() { */ @Override public void setActualInstance(Object instance) { - if (JSON.isInstanceOf(CustomFiatRoutingDest.class, instance, new HashSet>())) { + if (JSON.isInstanceOf(CustomRoutingDest.class, instance, new HashSet>())) { super.setActualInstance(instance); return; } @@ -308,15 +310,15 @@ public void setActualInstance(Object instance) { } throw new RuntimeException( - "Invalid instance type. Must be CustomFiatRoutingDest, DefaultNetworkRoutingDest," + "Invalid instance type. Must be CustomRoutingDest, DefaultNetworkRoutingDest," + " NoneNetworkRoutingDest"); } /** - * Get the actual instance, which can be the following: CustomFiatRoutingDest, + * Get the actual instance, which can be the following: CustomRoutingDest, * DefaultNetworkRoutingDest, NoneNetworkRoutingDest * - * @return The actual instance (CustomFiatRoutingDest, DefaultNetworkRoutingDest, + * @return The actual instance (CustomRoutingDest, DefaultNetworkRoutingDest, * NoneNetworkRoutingDest) */ @Override @@ -325,14 +327,14 @@ public Object getActualInstance() { } /** - * Get the actual instance of `CustomFiatRoutingDest`. If the actual instance is not - * `CustomFiatRoutingDest`, the ClassCastException will be thrown. + * Get the actual instance of `CustomRoutingDest`. If the actual instance is not + * `CustomRoutingDest`, the ClassCastException will be thrown. * - * @return The actual instance of `CustomFiatRoutingDest` - * @throws ClassCastException if the instance is not `CustomFiatRoutingDest` + * @return The actual instance of `CustomRoutingDest` + * @throws ClassCastException if the instance is not `CustomRoutingDest` */ - public CustomFiatRoutingDest getCustomFiatRoutingDest() throws ClassCastException { - return (CustomFiatRoutingDest) super.getActualInstance(); + public CustomRoutingDest getCustomRoutingDest() throws ClassCastException { + return (CustomRoutingDest) super.getActualInstance(); } /** @@ -389,10 +391,10 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - if (getActualInstance() instanceof CustomFiatRoutingDest) { + if (getActualInstance() instanceof CustomRoutingDest) { if (getActualInstance() != null) { joiner.add( - ((CustomFiatRoutingDest) getActualInstance()) + ((CustomRoutingDest) getActualInstance()) .toUrlQueryString(prefix + "one_of_0" + suffix)); } return joiner.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/NetworkIdResponse.java b/src/main/java/com/fireblocks/sdk/model/NetworkIdResponse.java index 93fd860..436453f 100644 --- a/src/main/java/com/fireblocks/sdk/model/NetworkIdResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/NetworkIdResponse.java @@ -18,6 +18,8 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.StringJoiner; @@ -37,7 +39,7 @@ public class NetworkIdResponse { private String name; public static final String JSON_PROPERTY_ROUTING_POLICY = "routingPolicy"; - private NetworkIdRoutingPolicy routingPolicy; + private Map routingPolicy = new HashMap<>(); public static final String JSON_PROPERTY_IS_DISCOVERABLE = "isDiscoverable"; private Boolean isDiscoverable; @@ -90,11 +92,20 @@ public void setName(String name) { this.name = name; } - public NetworkIdResponse routingPolicy(NetworkIdRoutingPolicy routingPolicy) { + public NetworkIdResponse routingPolicy(Map routingPolicy) { this.routingPolicy = routingPolicy; return this; } + public NetworkIdResponse putRoutingPolicyItem( + String key, NetworkIdRoutingPolicyValue routingPolicyItem) { + if (this.routingPolicy == null) { + this.routingPolicy = new HashMap<>(); + } + this.routingPolicy.put(key, routingPolicyItem); + return this; + } + /** * Get routingPolicy * @@ -103,13 +114,13 @@ public NetworkIdResponse routingPolicy(NetworkIdRoutingPolicy routingPolicy) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ROUTING_POLICY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NetworkIdRoutingPolicy getRoutingPolicy() { + public Map getRoutingPolicy() { return routingPolicy; } @JsonProperty(JSON_PROPERTY_ROUTING_POLICY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRoutingPolicy(NetworkIdRoutingPolicy routingPolicy) { + public void setRoutingPolicy(Map routingPolicy) { this.routingPolicy = routingPolicy; } @@ -236,7 +247,25 @@ public String toUrlQueryString(String prefix) { // add `routingPolicy` to the URL query string if (getRoutingPolicy() != null) { - joiner.add(getRoutingPolicy().toUrlQueryString(prefix + "routingPolicy" + suffix)); + for (String _key : getRoutingPolicy().keySet()) { + if (getRoutingPolicy().get(_key) != null) { + joiner.add( + getRoutingPolicy() + .get(_key) + .toUrlQueryString( + String.format( + "%sroutingPolicy%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + _key, + containerSuffix)))); + } + } } // add `isDiscoverable` to the URL query string diff --git a/src/main/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicy.java b/src/main/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicy.java deleted file mode 100644 index 113f01e..0000000 --- a/src/main/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicy.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@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 java.util.Objects; -import java.util.StringJoiner; - -/** NetworkIdRoutingPolicy */ -@JsonPropertyOrder({ - NetworkIdRoutingPolicy.JSON_PROPERTY_CRYPTO, - NetworkIdRoutingPolicy.JSON_PROPERTY_SEN, - NetworkIdRoutingPolicy.JSON_PROPERTY_SIGNET, - NetworkIdRoutingPolicy.JSON_PROPERTY_SEN_TEST, - NetworkIdRoutingPolicy.JSON_PROPERTY_SIGNET_TEST -}) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NetworkIdRoutingPolicy { - public static final String JSON_PROPERTY_CRYPTO = "crypto"; - private NetworkIdRoutingPolicyCrypto crypto; - - public static final String JSON_PROPERTY_SEN = "sen"; - private NetworkIdRoutingPolicySen sen; - - public static final String JSON_PROPERTY_SIGNET = "signet"; - private NetworkIdRoutingPolicySen signet; - - public static final String JSON_PROPERTY_SEN_TEST = "sen_test"; - private NetworkIdRoutingPolicySenTest senTest; - - public static final String JSON_PROPERTY_SIGNET_TEST = "signet_test"; - private NetworkIdRoutingPolicySenTest signetTest; - - public NetworkIdRoutingPolicy() {} - - public NetworkIdRoutingPolicy crypto(NetworkIdRoutingPolicyCrypto crypto) { - this.crypto = crypto; - return this; - } - - /** - * Get crypto - * - * @return crypto - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CRYPTO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NetworkIdRoutingPolicyCrypto getCrypto() { - return crypto; - } - - @JsonProperty(JSON_PROPERTY_CRYPTO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCrypto(NetworkIdRoutingPolicyCrypto crypto) { - this.crypto = crypto; - } - - public NetworkIdRoutingPolicy sen(NetworkIdRoutingPolicySen sen) { - this.sen = sen; - return this; - } - - /** - * Get sen - * - * @return sen - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SEN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NetworkIdRoutingPolicySen getSen() { - return sen; - } - - @JsonProperty(JSON_PROPERTY_SEN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSen(NetworkIdRoutingPolicySen sen) { - this.sen = sen; - } - - public NetworkIdRoutingPolicy signet(NetworkIdRoutingPolicySen signet) { - this.signet = signet; - return this; - } - - /** - * Get signet - * - * @return signet - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SIGNET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NetworkIdRoutingPolicySen getSignet() { - return signet; - } - - @JsonProperty(JSON_PROPERTY_SIGNET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignet(NetworkIdRoutingPolicySen signet) { - this.signet = signet; - } - - public NetworkIdRoutingPolicy senTest(NetworkIdRoutingPolicySenTest senTest) { - this.senTest = senTest; - return this; - } - - /** - * Get senTest - * - * @return senTest - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SEN_TEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NetworkIdRoutingPolicySenTest getSenTest() { - return senTest; - } - - @JsonProperty(JSON_PROPERTY_SEN_TEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSenTest(NetworkIdRoutingPolicySenTest senTest) { - this.senTest = senTest; - } - - public NetworkIdRoutingPolicy signetTest(NetworkIdRoutingPolicySenTest signetTest) { - this.signetTest = signetTest; - return this; - } - - /** - * Get signetTest - * - * @return signetTest - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SIGNET_TEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NetworkIdRoutingPolicySenTest getSignetTest() { - return signetTest; - } - - @JsonProperty(JSON_PROPERTY_SIGNET_TEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignetTest(NetworkIdRoutingPolicySenTest signetTest) { - this.signetTest = signetTest; - } - - /** Return true if this NetworkIdRoutingPolicy object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NetworkIdRoutingPolicy networkIdRoutingPolicy = (NetworkIdRoutingPolicy) o; - return Objects.equals(this.crypto, networkIdRoutingPolicy.crypto) - && Objects.equals(this.sen, networkIdRoutingPolicy.sen) - && Objects.equals(this.signet, networkIdRoutingPolicy.signet) - && Objects.equals(this.senTest, networkIdRoutingPolicy.senTest) - && Objects.equals(this.signetTest, networkIdRoutingPolicy.signetTest); - } - - @Override - public int hashCode() { - return Objects.hash(crypto, sen, signet, senTest, signetTest); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NetworkIdRoutingPolicy {\n"); - sb.append(" crypto: ").append(toIndentedString(crypto)).append("\n"); - sb.append(" sen: ").append(toIndentedString(sen)).append("\n"); - sb.append(" signet: ").append(toIndentedString(signet)).append("\n"); - sb.append(" senTest: ").append(toIndentedString(senTest)).append("\n"); - sb.append(" signetTest: ").append(toIndentedString(signetTest)).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 `crypto` to the URL query string - if (getCrypto() != null) { - joiner.add(getCrypto().toUrlQueryString(prefix + "crypto" + suffix)); - } - - // add `sen` to the URL query string - if (getSen() != null) { - joiner.add(getSen().toUrlQueryString(prefix + "sen" + suffix)); - } - - // add `signet` to the URL query string - if (getSignet() != null) { - joiner.add(getSignet().toUrlQueryString(prefix + "signet" + suffix)); - } - - // add `sen_test` to the URL query string - if (getSenTest() != null) { - joiner.add(getSenTest().toUrlQueryString(prefix + "sen_test" + suffix)); - } - - // add `signet_test` to the URL query string - if (getSignetTest() != null) { - joiner.add(getSignetTest().toUrlQueryString(prefix + "signet_test" + suffix)); - } - - return joiner.toString(); - } -} diff --git a/src/main/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicySen.java b/src/main/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicyValue.java similarity index 73% rename from src/main/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicySen.java rename to src/main/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicyValue.java index fcdd3e9..2fa8b2a 100644 --- a/src/main/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicySen.java +++ b/src/main/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicyValue.java @@ -37,88 +37,88 @@ import java.util.logging.Logger; @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonDeserialize(using = NetworkIdRoutingPolicySen.NetworkIdRoutingPolicySenDeserializer.class) -@JsonSerialize(using = NetworkIdRoutingPolicySen.NetworkIdRoutingPolicySenSerializer.class) -public class NetworkIdRoutingPolicySen extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(NetworkIdRoutingPolicySen.class.getName()); +@JsonDeserialize(using = NetworkIdRoutingPolicyValue.NetworkIdRoutingPolicyValueDeserializer.class) +@JsonSerialize(using = NetworkIdRoutingPolicyValue.NetworkIdRoutingPolicyValueSerializer.class) +public class NetworkIdRoutingPolicyValue extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(NetworkIdRoutingPolicyValue.class.getName()); - public static class NetworkIdRoutingPolicySenSerializer - extends StdSerializer { - public NetworkIdRoutingPolicySenSerializer(Class t) { + public static class NetworkIdRoutingPolicyValueSerializer + extends StdSerializer { + public NetworkIdRoutingPolicyValueSerializer(Class t) { super(t); } - public NetworkIdRoutingPolicySenSerializer() { + public NetworkIdRoutingPolicyValueSerializer() { this(null); } @Override public void serialize( - NetworkIdRoutingPolicySen value, JsonGenerator jgen, SerializerProvider provider) + NetworkIdRoutingPolicyValue value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { jgen.writeObject(value.getActualInstance()); } } - public static class NetworkIdRoutingPolicySenDeserializer - extends StdDeserializer { - public NetworkIdRoutingPolicySenDeserializer() { - this(NetworkIdRoutingPolicySen.class); + public static class NetworkIdRoutingPolicyValueDeserializer + extends StdDeserializer { + public NetworkIdRoutingPolicyValueDeserializer() { + this(NetworkIdRoutingPolicyValue.class); } - public NetworkIdRoutingPolicySenDeserializer(Class vc) { + public NetworkIdRoutingPolicyValueDeserializer(Class vc) { super(vc); } @Override - public NetworkIdRoutingPolicySen deserialize(JsonParser jp, DeserializationContext ctxt) + public NetworkIdRoutingPolicyValue 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 CustomFiatRoutingDest + // deserialize CustomRoutingDest try { boolean attemptParsing = true; // ensure that we respect type coercion as set on the client ObjectMapper - if (CustomFiatRoutingDest.class.equals(Integer.class) - || CustomFiatRoutingDest.class.equals(Long.class) - || CustomFiatRoutingDest.class.equals(Float.class) - || CustomFiatRoutingDest.class.equals(Double.class) - || CustomFiatRoutingDest.class.equals(Boolean.class) - || CustomFiatRoutingDest.class.equals(String.class)) { + if (CustomRoutingDest.class.equals(Integer.class) + || CustomRoutingDest.class.equals(Long.class) + || CustomRoutingDest.class.equals(Float.class) + || CustomRoutingDest.class.equals(Double.class) + || CustomRoutingDest.class.equals(Boolean.class) + || CustomRoutingDest.class.equals(String.class)) { attemptParsing = typeCoercion; if (!attemptParsing) { attemptParsing |= - ((CustomFiatRoutingDest.class.equals(Integer.class) - || CustomFiatRoutingDest.class.equals(Long.class)) + ((CustomRoutingDest.class.equals(Integer.class) + || CustomRoutingDest.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); attemptParsing |= - ((CustomFiatRoutingDest.class.equals(Float.class) - || CustomFiatRoutingDest.class.equals(Double.class)) + ((CustomRoutingDest.class.equals(Float.class) + || CustomRoutingDest.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); attemptParsing |= - (CustomFiatRoutingDest.class.equals(Boolean.class) + (CustomRoutingDest.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); attemptParsing |= - (CustomFiatRoutingDest.class.equals(String.class) + (CustomRoutingDest.class.equals(String.class) && token == JsonToken.VALUE_STRING); } } if (attemptParsing) { deserialized = - tree.traverse(jp.getCodec()).readValueAs(CustomFiatRoutingDest.class); + tree.traverse(jp.getCodec()).readValueAs(CustomRoutingDest.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 'CustomFiatRoutingDest'"); + log.log(Level.FINER, "Input data matches schema 'CustomRoutingDest'"); } } catch (Exception e) { // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'CustomFiatRoutingDest'", e); + log.log(Level.FINER, "Input data does not match schema 'CustomRoutingDest'", e); } // deserialize NoneNetworkRoutingDest @@ -169,65 +169,65 @@ public NetworkIdRoutingPolicySen deserialize(JsonParser jp, DeserializationConte } if (match == 1) { - NetworkIdRoutingPolicySen ret = new NetworkIdRoutingPolicySen(); + NetworkIdRoutingPolicyValue ret = new NetworkIdRoutingPolicyValue(); ret.setActualInstance(deserialized); return ret; } throw new IOException( String.format( - "Failed deserialization for NetworkIdRoutingPolicySen: %d classes match" - + " result, expected 1", + "Failed deserialization for NetworkIdRoutingPolicyValue: %d classes" + + " match result, expected 1", match)); } /** Handle deserialization of the 'null' value. */ @Override - public NetworkIdRoutingPolicySen getNullValue(DeserializationContext ctxt) + public NetworkIdRoutingPolicyValue getNullValue(DeserializationContext ctxt) throws JsonMappingException { throw new JsonMappingException( - ctxt.getParser(), "NetworkIdRoutingPolicySen cannot be null"); + ctxt.getParser(), "NetworkIdRoutingPolicyValue cannot be null"); } } // store a list of schema names defined in oneOf public static final Map> schemas = new HashMap<>(); - public NetworkIdRoutingPolicySen() { + public NetworkIdRoutingPolicyValue() { super("oneOf", Boolean.FALSE); } - public NetworkIdRoutingPolicySen(CustomFiatRoutingDest o) { + public NetworkIdRoutingPolicyValue(CustomRoutingDest o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } - public NetworkIdRoutingPolicySen(NoneNetworkRoutingDest o) { + public NetworkIdRoutingPolicyValue(NoneNetworkRoutingDest o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } static { - schemas.put("CustomFiatRoutingDest", CustomFiatRoutingDest.class); + schemas.put("CustomRoutingDest", CustomRoutingDest.class); schemas.put("NoneNetworkRoutingDest", NoneNetworkRoutingDest.class); JSON.registerDescendants( - NetworkIdRoutingPolicySen.class, Collections.unmodifiableMap(schemas)); + NetworkIdRoutingPolicyValue.class, Collections.unmodifiableMap(schemas)); } @Override public Map> getSchemas() { - return NetworkIdRoutingPolicySen.schemas; + return NetworkIdRoutingPolicyValue.schemas; } /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: CustomFiatRoutingDest, NoneNetworkRoutingDest + * against the oneOf child schemas: CustomRoutingDest, NoneNetworkRoutingDest * *

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(CustomFiatRoutingDest.class, instance, new HashSet>())) { + if (JSON.isInstanceOf(CustomRoutingDest.class, instance, new HashSet>())) { super.setActualInstance(instance); return; } @@ -238,14 +238,14 @@ public void setActualInstance(Object instance) { } throw new RuntimeException( - "Invalid instance type. Must be CustomFiatRoutingDest, NoneNetworkRoutingDest"); + "Invalid instance type. Must be CustomRoutingDest, NoneNetworkRoutingDest"); } /** - * Get the actual instance, which can be the following: CustomFiatRoutingDest, + * Get the actual instance, which can be the following: CustomRoutingDest, * NoneNetworkRoutingDest * - * @return The actual instance (CustomFiatRoutingDest, NoneNetworkRoutingDest) + * @return The actual instance (CustomRoutingDest, NoneNetworkRoutingDest) */ @Override public Object getActualInstance() { @@ -253,14 +253,14 @@ public Object getActualInstance() { } /** - * Get the actual instance of `CustomFiatRoutingDest`. If the actual instance is not - * `CustomFiatRoutingDest`, the ClassCastException will be thrown. + * Get the actual instance of `CustomRoutingDest`. If the actual instance is not + * `CustomRoutingDest`, the ClassCastException will be thrown. * - * @return The actual instance of `CustomFiatRoutingDest` - * @throws ClassCastException if the instance is not `CustomFiatRoutingDest` + * @return The actual instance of `CustomRoutingDest` + * @throws ClassCastException if the instance is not `CustomRoutingDest` */ - public CustomFiatRoutingDest getCustomFiatRoutingDest() throws ClassCastException { - return (CustomFiatRoutingDest) super.getActualInstance(); + public CustomRoutingDest getCustomRoutingDest() throws ClassCastException { + return (CustomRoutingDest) super.getActualInstance(); } /** @@ -306,10 +306,10 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - if (getActualInstance() instanceof CustomFiatRoutingDest) { + if (getActualInstance() instanceof CustomRoutingDest) { if (getActualInstance() != null) { joiner.add( - ((CustomFiatRoutingDest) getActualInstance()) + ((CustomRoutingDest) getActualInstance()) .toUrlQueryString(prefix + "one_of_0" + suffix)); } return joiner.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/OneTimeAddressAccount.java b/src/main/java/com/fireblocks/sdk/model/OneTimeAddressAccount.java new file mode 100644 index 0000000..07fcbf7 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/OneTimeAddressAccount.java @@ -0,0 +1,183 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** OneTimeAddressAccount */ +@JsonPropertyOrder({ + OneTimeAddressAccount.JSON_PROPERTY_ONE_TIME_ADDRESS, + OneTimeAddressAccount.JSON_PROPERTY_TAG +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OneTimeAddressAccount { + public static final String JSON_PROPERTY_ONE_TIME_ADDRESS = "oneTimeAddress"; + private String oneTimeAddress; + + public static final String JSON_PROPERTY_TAG = "tag"; + private String tag; + + public OneTimeAddressAccount() {} + + public OneTimeAddressAccount oneTimeAddress(String oneTimeAddress) { + this.oneTimeAddress = oneTimeAddress; + return this; + } + + /** + * Get oneTimeAddress + * + * @return oneTimeAddress + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ONE_TIME_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOneTimeAddress() { + return oneTimeAddress; + } + + @JsonProperty(JSON_PROPERTY_ONE_TIME_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOneTimeAddress(String oneTimeAddress) { + this.oneTimeAddress = oneTimeAddress; + } + + public OneTimeAddressAccount tag(String tag) { + this.tag = tag; + return this; + } + + /** + * Get tag + * + * @return tag + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTag() { + return tag; + } + + @JsonProperty(JSON_PROPERTY_TAG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTag(String tag) { + this.tag = tag; + } + + /** Return true if this OneTimeAddressAccount object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OneTimeAddressAccount oneTimeAddressAccount = (OneTimeAddressAccount) o; + return Objects.equals(this.oneTimeAddress, oneTimeAddressAccount.oneTimeAddress) + && Objects.equals(this.tag, oneTimeAddressAccount.tag); + } + + @Override + public int hashCode() { + return Objects.hash(oneTimeAddress, tag); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OneTimeAddressAccount {\n"); + sb.append(" oneTimeAddress: ").append(toIndentedString(oneTimeAddress)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).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 `oneTimeAddress` to the URL query string + if (getOneTimeAddress() != null) { + joiner.add( + String.format( + "%soneTimeAddress%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getOneTimeAddress()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `tag` to the URL query string + if (getTag() != null) { + joiner.add( + String.format( + "%stag%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTag()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/OperationExecutionFailure.java b/src/main/java/com/fireblocks/sdk/model/OperationExecutionFailure.java new file mode 100644 index 0000000..cdd3551 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/OperationExecutionFailure.java @@ -0,0 +1,200 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.StringJoiner; + +/** OperationExecutionFailure */ +@JsonPropertyOrder({ + OperationExecutionFailure.JSON_PROPERTY_REASON, + OperationExecutionFailure.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OperationExecutionFailure { + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + public static final String JSON_PROPERTY_DATA = "data"; + private Map data = new HashMap<>(); + + public OperationExecutionFailure() {} + + public OperationExecutionFailure reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * + * @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(String reason) { + this.reason = reason; + } + + public OperationExecutionFailure data(Map data) { + this.data = data; + return this; + } + + public OperationExecutionFailure putDataItem(String key, Object dataItem) { + if (this.data == null) { + this.data = new HashMap<>(); + } + this.data.put(key, dataItem); + return this; + } + + /** + * Get data + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Map data) { + this.data = data; + } + + /** Return true if this OperationExecutionFailure object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OperationExecutionFailure operationExecutionFailure = (OperationExecutionFailure) o; + return Objects.equals(this.reason, operationExecutionFailure.reason) + && Objects.equals(this.data, operationExecutionFailure.data); + } + + @Override + public int hashCode() { + return Objects.hash(reason, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OperationExecutionFailure {\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).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 `reason` to the URL query string + if (getReason() != null) { + joiner.add( + String.format( + "%sreason%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `data` to the URL query string + if (getData() != null) { + for (String _key : getData().keySet()) { + joiner.add( + String.format( + "%sdata%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, _key, containerSuffix), + getData().get(_key), + URLEncoder.encode( + String.valueOf(getData().get(_key)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/PreScreening.java b/src/main/java/com/fireblocks/sdk/model/PreScreening.java new file mode 100644 index 0000000..70012cb --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/PreScreening.java @@ -0,0 +1,139 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** PreScreening */ +@JsonPropertyOrder({PreScreening.JSON_PROPERTY_ENABLED}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PreScreening { + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public PreScreening() {} + + public PreScreening enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get enabled + * + * @return enabled + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** Return true if this PreScreening object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PreScreening preScreening = (PreScreening) o; + return Objects.equals(this.enabled, preScreening.enabled); + } + + @Override + public int hashCode() { + return Objects.hash(enabled); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PreScreening {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).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 `enabled` to the URL query string + if (getEnabled() != null) { + joiner.add( + String.format( + "%senabled%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getEnabled()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/RedeemFundsToLinkedDDAResponse.java b/src/main/java/com/fireblocks/sdk/model/RedeemFundsToLinkedDDAResponse.java new file mode 100644 index 0000000..72e1c41 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/RedeemFundsToLinkedDDAResponse.java @@ -0,0 +1,140 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** RedeemFundsToLinkedDDAResponse */ +@JsonPropertyOrder({RedeemFundsToLinkedDDAResponse.JSON_PROPERTY_SUCCESS}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RedeemFundsToLinkedDDAResponse { + public static final String JSON_PROPERTY_SUCCESS = "success"; + private Boolean success; + + public RedeemFundsToLinkedDDAResponse() {} + + public RedeemFundsToLinkedDDAResponse success(Boolean success) { + this.success = success; + return this; + } + + /** + * Indicates whether the funds were successfully redeemed to the linked DDA + * + * @return success + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getSuccess() { + return success; + } + + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSuccess(Boolean success) { + this.success = success; + } + + /** Return true if this RedeemFundsToLinkedDDAResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RedeemFundsToLinkedDDAResponse redeemFundsToLinkedDDAResponse = + (RedeemFundsToLinkedDDAResponse) o; + return Objects.equals(this.success, redeemFundsToLinkedDDAResponse.success); + } + + @Override + public int hashCode() { + return Objects.hash(success); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RedeemFundsToLinkedDDAResponse {\n"); + sb.append(" success: ").append(toIndentedString(success)).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 `success` to the URL query string + if (getSuccess() != null) { + joiner.add( + String.format( + "%ssuccess%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSuccess()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/RegisterNewAssetRequest.java b/src/main/java/com/fireblocks/sdk/model/RegisterNewAssetRequest.java new file mode 100644 index 0000000..33dee38 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/RegisterNewAssetRequest.java @@ -0,0 +1,223 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** RegisterNewAssetRequest */ +@JsonPropertyOrder({ + RegisterNewAssetRequest.JSON_PROPERTY_BLOCKCHAIN_ID, + RegisterNewAssetRequest.JSON_PROPERTY_ADDRESS, + RegisterNewAssetRequest.JSON_PROPERTY_SYMBOL +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RegisterNewAssetRequest { + public static final String JSON_PROPERTY_BLOCKCHAIN_ID = "blockchainId"; + private String blockchainId; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private String address; + + public static final String JSON_PROPERTY_SYMBOL = "symbol"; + private String symbol; + + public RegisterNewAssetRequest() {} + + public RegisterNewAssetRequest blockchainId(String blockchainId) { + this.blockchainId = blockchainId; + return this; + } + + /** + * Native asset of blockchain + * + * @return blockchainId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBlockchainId() { + return blockchainId; + } + + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBlockchainId(String blockchainId) { + this.blockchainId = blockchainId; + } + + public RegisterNewAssetRequest address(String address) { + this.address = address; + return this; + } + + /** + * Asset address + * + * @return address + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAddress() { + return address; + } + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(String address) { + this.address = address; + } + + public RegisterNewAssetRequest symbol(String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Asset symbol + * + * @return symbol + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSymbol() { + return symbol; + } + + @JsonProperty(JSON_PROPERTY_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSymbol(String symbol) { + this.symbol = symbol; + } + + /** Return true if this RegisterNewAssetRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RegisterNewAssetRequest registerNewAssetRequest = (RegisterNewAssetRequest) o; + return Objects.equals(this.blockchainId, registerNewAssetRequest.blockchainId) + && Objects.equals(this.address, registerNewAssetRequest.address) + && Objects.equals(this.symbol, registerNewAssetRequest.symbol); + } + + @Override + public int hashCode() { + return Objects.hash(blockchainId, address, symbol); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RegisterNewAssetRequest {\n"); + sb.append(" blockchainId: ").append(toIndentedString(blockchainId)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).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 `blockchainId` to the URL query string + if (getBlockchainId() != null) { + joiner.add( + String.format( + "%sblockchainId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getBlockchainId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add( + String.format( + "%saddress%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAddress()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `symbol` to the URL query string + if (getSymbol() != null) { + joiner.add( + String.format( + "%ssymbol%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSymbol()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/RenameVaultAccountResponse.java b/src/main/java/com/fireblocks/sdk/model/RenameVaultAccountResponse.java new file mode 100644 index 0000000..d4de997 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/RenameVaultAccountResponse.java @@ -0,0 +1,181 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** RenameVaultAccountResponse */ +@JsonPropertyOrder({ + RenameVaultAccountResponse.JSON_PROPERTY_NAME, + RenameVaultAccountResponse.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RenameVaultAccountResponse { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public RenameVaultAccountResponse() {} + + public RenameVaultAccountResponse name(String name) { + this.name = name; + return this; + } + + /** + * The new name of the vault account + * + * @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(String name) { + this.name = name; + } + + public RenameVaultAccountResponse id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the vault account + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + /** Return true if this RenameVaultAccountResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RenameVaultAccountResponse renameVaultAccountResponse = (RenameVaultAccountResponse) o; + return Objects.equals(this.name, renameVaultAccountResponse.name) + && Objects.equals(this.id, renameVaultAccountResponse.id); + } + + @Override + public int hashCode() { + return Objects.hash(name, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RenameVaultAccountResponse {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).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, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add( + String.format( + "%sid%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ResendWebhooksByTransactionIdResponse.java b/src/main/java/com/fireblocks/sdk/model/ResendWebhooksByTransactionIdResponse.java new file mode 100644 index 0000000..6f69112 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ResendWebhooksByTransactionIdResponse.java @@ -0,0 +1,140 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ResendWebhooksByTransactionIdResponse */ +@JsonPropertyOrder({ResendWebhooksByTransactionIdResponse.JSON_PROPERTY_SUCCESS}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ResendWebhooksByTransactionIdResponse { + public static final String JSON_PROPERTY_SUCCESS = "success"; + private Boolean success; + + public ResendWebhooksByTransactionIdResponse() {} + + public ResendWebhooksByTransactionIdResponse success(Boolean success) { + this.success = success; + return this; + } + + /** + * Indicates whether the webhooks were successfully resent + * + * @return success + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getSuccess() { + return success; + } + + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSuccess(Boolean success) { + this.success = success; + } + + /** Return true if this ResendWebhooksByTransactionIdResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResendWebhooksByTransactionIdResponse resendWebhooksByTransactionIdResponse = + (ResendWebhooksByTransactionIdResponse) o; + return Objects.equals(this.success, resendWebhooksByTransactionIdResponse.success); + } + + @Override + public int hashCode() { + return Objects.hash(success); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResendWebhooksByTransactionIdResponse {\n"); + sb.append(" success: ").append(toIndentedString(success)).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 `success` to the URL query string + if (getSuccess() != null) { + joiner.add( + String.format( + "%ssuccess%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSuccess()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ScreeningOperationExecution.java b/src/main/java/com/fireblocks/sdk/model/ScreeningOperationExecution.java new file mode 100644 index 0000000..2eebd0d --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ScreeningOperationExecution.java @@ -0,0 +1,252 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ScreeningOperationExecution */ +@JsonPropertyOrder({ + ScreeningOperationExecution.JSON_PROPERTY_OUTPUT, + ScreeningOperationExecution.JSON_PROPERTY_STARTED_AT, + ScreeningOperationExecution.JSON_PROPERTY_FINISHED_AT, + ScreeningOperationExecution.JSON_PROPERTY_FAILURE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ScreeningOperationExecution { + public static final String JSON_PROPERTY_OUTPUT = "output"; + private ScreeningOperationExecutionOutput output; + + public static final String JSON_PROPERTY_STARTED_AT = "startedAt"; + private BigDecimal startedAt; + + public static final String JSON_PROPERTY_FINISHED_AT = "finishedAt"; + private BigDecimal finishedAt; + + public static final String JSON_PROPERTY_FAILURE = "failure"; + private ScreeningOperationFailure failure; + + public ScreeningOperationExecution() {} + + public ScreeningOperationExecution output(ScreeningOperationExecutionOutput output) { + this.output = output; + return this; + } + + /** + * Get output + * + * @return output + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScreeningOperationExecutionOutput getOutput() { + return output; + } + + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOutput(ScreeningOperationExecutionOutput output) { + this.output = output; + } + + public ScreeningOperationExecution startedAt(BigDecimal startedAt) { + this.startedAt = startedAt; + return this; + } + + /** + * Get startedAt + * + * @return startedAt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getStartedAt() { + return startedAt; + } + + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStartedAt(BigDecimal startedAt) { + this.startedAt = startedAt; + } + + public ScreeningOperationExecution finishedAt(BigDecimal finishedAt) { + this.finishedAt = finishedAt; + return this; + } + + /** + * Get finishedAt + * + * @return finishedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FINISHED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getFinishedAt() { + return finishedAt; + } + + @JsonProperty(JSON_PROPERTY_FINISHED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFinishedAt(BigDecimal finishedAt) { + this.finishedAt = finishedAt; + } + + public ScreeningOperationExecution failure(ScreeningOperationFailure failure) { + this.failure = failure; + return this; + } + + /** + * Get failure + * + * @return failure + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScreeningOperationFailure getFailure() { + return failure; + } + + @JsonProperty(JSON_PROPERTY_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFailure(ScreeningOperationFailure failure) { + this.failure = failure; + } + + /** Return true if this ScreeningOperationExecution object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScreeningOperationExecution screeningOperationExecution = (ScreeningOperationExecution) o; + return Objects.equals(this.output, screeningOperationExecution.output) + && Objects.equals(this.startedAt, screeningOperationExecution.startedAt) + && Objects.equals(this.finishedAt, screeningOperationExecution.finishedAt) + && Objects.equals(this.failure, screeningOperationExecution.failure); + } + + @Override + public int hashCode() { + return Objects.hash(output, startedAt, finishedAt, failure); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScreeningOperationExecution {\n"); + sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); + sb.append(" finishedAt: ").append(toIndentedString(finishedAt)).append("\n"); + sb.append(" failure: ").append(toIndentedString(failure)).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 `output` to the URL query string + if (getOutput() != null) { + joiner.add(getOutput().toUrlQueryString(prefix + "output" + suffix)); + } + + // add `startedAt` to the URL query string + if (getStartedAt() != null) { + joiner.add( + String.format( + "%sstartedAt%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getStartedAt()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `finishedAt` to the URL query string + if (getFinishedAt() != null) { + joiner.add( + String.format( + "%sfinishedAt%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getFinishedAt()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `failure` to the URL query string + if (getFailure() != null) { + joiner.add(getFailure().toUrlQueryString(prefix + "failure" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ScreeningOperationExecutionOutput.java b/src/main/java/com/fireblocks/sdk/model/ScreeningOperationExecutionOutput.java new file mode 100644 index 0000000..b105914 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ScreeningOperationExecutionOutput.java @@ -0,0 +1,160 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** ScreeningOperationExecutionOutput */ +@JsonPropertyOrder({ScreeningOperationExecutionOutput.JSON_PROPERTY_VERDICTS}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ScreeningOperationExecutionOutput { + public static final String JSON_PROPERTY_VERDICTS = "verdicts"; + private List verdicts = new ArrayList<>(); + + public ScreeningOperationExecutionOutput() {} + + public ScreeningOperationExecutionOutput verdicts(List verdicts) { + this.verdicts = verdicts; + return this; + } + + public ScreeningOperationExecutionOutput addVerdictsItem(ScreeningVerdict verdictsItem) { + if (this.verdicts == null) { + this.verdicts = new ArrayList<>(); + } + this.verdicts.add(verdictsItem); + return this; + } + + /** + * Get verdicts + * + * @return verdicts + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VERDICTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getVerdicts() { + return verdicts; + } + + @JsonProperty(JSON_PROPERTY_VERDICTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVerdicts(List verdicts) { + this.verdicts = verdicts; + } + + /** Return true if this ScreeningOperationExecutionOutput object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScreeningOperationExecutionOutput screeningOperationExecutionOutput = + (ScreeningOperationExecutionOutput) o; + return Objects.equals(this.verdicts, screeningOperationExecutionOutput.verdicts); + } + + @Override + public int hashCode() { + return Objects.hash(verdicts); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScreeningOperationExecutionOutput {\n"); + sb.append(" verdicts: ").append(toIndentedString(verdicts)).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 `verdicts` to the URL query string + if (getVerdicts() != null) { + for (int i = 0; i < getVerdicts().size(); i++) { + if (getVerdicts().get(i) != null) { + joiner.add( + getVerdicts() + .get(i) + .toUrlQueryString( + String.format( + "%sverdicts%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/ScreeningOperationFailure.java b/src/main/java/com/fireblocks/sdk/model/ScreeningOperationFailure.java new file mode 100644 index 0000000..b7f06bb --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ScreeningOperationFailure.java @@ -0,0 +1,210 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ScreeningOperationFailure */ +@JsonPropertyOrder({ + ScreeningOperationFailure.JSON_PROPERTY_REASON, + ScreeningOperationFailure.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ScreeningOperationFailure { + /** Gets or Sets reason */ + public enum ReasonEnum { + AML_PROCESS_FAILED("AML_PROCESS_FAILED"), + + SCREENING_REJECTED("SCREENING_REJECTED"); + + private String value; + + ReasonEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ReasonEnum fromValue(String value) { + for (ReasonEnum b : ReasonEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_REASON = "reason"; + private ReasonEnum reason; + + public static final String JSON_PROPERTY_DATA = "data"; + private ScreeningOperationExecutionOutput data; + + public ScreeningOperationFailure() {} + + public ScreeningOperationFailure reason(ReasonEnum reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * + * @return reason + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReasonEnum getReason() { + return reason; + } + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReason(ReasonEnum reason) { + this.reason = reason; + } + + public ScreeningOperationFailure data(ScreeningOperationExecutionOutput data) { + this.data = data; + return this; + } + + /** + * Get data + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScreeningOperationExecutionOutput getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(ScreeningOperationExecutionOutput data) { + this.data = data; + } + + /** Return true if this ScreeningOperationFailure object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScreeningOperationFailure screeningOperationFailure = (ScreeningOperationFailure) o; + return Objects.equals(this.reason, screeningOperationFailure.reason) + && Objects.equals(this.data, screeningOperationFailure.data); + } + + @Override + public int hashCode() { + return Objects.hash(reason, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScreeningOperationFailure {\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).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 `reason` to the URL query string + if (getReason() != null) { + joiner.add( + String.format( + "%sreason%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ScreeningOperationType.java b/src/main/java/com/fireblocks/sdk/model/ScreeningOperationType.java new file mode 100644 index 0000000..812351a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ScreeningOperationType.java @@ -0,0 +1,62 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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; + +/** Gets or Sets ScreeningOperationType */ +public enum ScreeningOperationType { + SCREENING("SCREENING"); + + private String value; + + ScreeningOperationType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ScreeningOperationType fromValue(String value) { + for (ScreeningOperationType b : ScreeningOperationType.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/ScreeningValidationFailure.java b/src/main/java/com/fireblocks/sdk/model/ScreeningValidationFailure.java new file mode 100644 index 0000000..6b3afa3 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ScreeningValidationFailure.java @@ -0,0 +1,233 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.StringJoiner; + +/** ScreeningValidationFailure */ +@JsonPropertyOrder({ + ScreeningValidationFailure.JSON_PROPERTY_REASON, + ScreeningValidationFailure.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ScreeningValidationFailure { + /** Gets or Sets reason */ + public enum ReasonEnum { + SCREENING_DISABLED_IN_TENANT("SCREENING_DISABLED_IN_TENANT"); + + private String value; + + ReasonEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ReasonEnum fromValue(String value) { + for (ReasonEnum b : ReasonEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_REASON = "reason"; + private ReasonEnum reason; + + public static final String JSON_PROPERTY_DATA = "data"; + private Map data = new HashMap<>(); + + public ScreeningValidationFailure() {} + + public ScreeningValidationFailure reason(ReasonEnum reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * + * @return reason + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReasonEnum getReason() { + return reason; + } + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReason(ReasonEnum reason) { + this.reason = reason; + } + + public ScreeningValidationFailure data(Map data) { + this.data = data; + return this; + } + + public ScreeningValidationFailure putDataItem(String key, Object dataItem) { + if (this.data == null) { + this.data = new HashMap<>(); + } + this.data.put(key, dataItem); + return this; + } + + /** + * Get data + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Map data) { + this.data = data; + } + + /** Return true if this ScreeningValidationFailure object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScreeningValidationFailure screeningValidationFailure = (ScreeningValidationFailure) o; + return Objects.equals(this.reason, screeningValidationFailure.reason) + && Objects.equals(this.data, screeningValidationFailure.data); + } + + @Override + public int hashCode() { + return Objects.hash(reason, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScreeningValidationFailure {\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).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 `reason` to the URL query string + if (getReason() != null) { + joiner.add( + String.format( + "%sreason%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `data` to the URL query string + if (getData() != null) { + for (String _key : getData().keySet()) { + joiner.add( + String.format( + "%sdata%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, _key, containerSuffix), + getData().get(_key), + URLEncoder.encode( + String.valueOf(getData().get(_key)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ScreeningVerdict.java b/src/main/java/com/fireblocks/sdk/model/ScreeningVerdict.java new file mode 100644 index 0000000..b0add60 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ScreeningVerdict.java @@ -0,0 +1,374 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ScreeningVerdict */ +@JsonPropertyOrder({ + ScreeningVerdict.JSON_PROPERTY_VERDICT, + ScreeningVerdict.JSON_PROPERTY_EXECUTION_OPERATION_ID, + ScreeningVerdict.JSON_PROPERTY_ACCOUNT, + ScreeningVerdict.JSON_PROPERTY_ASSET_ID, + ScreeningVerdict.JSON_PROPERTY_AMOUNT, + ScreeningVerdict.JSON_PROPERTY_MATCHED_RULE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ScreeningVerdict { + /** Gets or Sets verdict */ + public enum VerdictEnum { + PASSED("PASSED"), + + PASSED_WITH_ALERT("PASSED_WITH_ALERT"), + + REJECTED("REJECTED"), + + FAILED("FAILED"), + + BYPASSED("BYPASSED"); + + private String value; + + VerdictEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static VerdictEnum fromValue(String value) { + for (VerdictEnum b : VerdictEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_VERDICT = "verdict"; + private VerdictEnum verdict; + + public static final String JSON_PROPERTY_EXECUTION_OPERATION_ID = "executionOperationId"; + private String executionOperationId; + + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private Destination account; + + public static final String JSON_PROPERTY_ASSET_ID = "assetId"; + private String assetId; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private String amount; + + public static final String JSON_PROPERTY_MATCHED_RULE = "matchedRule"; + private ScreeningVerdictMatchedRule matchedRule; + + public ScreeningVerdict() {} + + public ScreeningVerdict verdict(VerdictEnum verdict) { + this.verdict = verdict; + return this; + } + + /** + * Get verdict + * + * @return verdict + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VERDICT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public VerdictEnum getVerdict() { + return verdict; + } + + @JsonProperty(JSON_PROPERTY_VERDICT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVerdict(VerdictEnum verdict) { + this.verdict = verdict; + } + + public ScreeningVerdict executionOperationId(String executionOperationId) { + this.executionOperationId = executionOperationId; + return this; + } + + /** + * Get executionOperationId + * + * @return executionOperationId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXECUTION_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getExecutionOperationId() { + return executionOperationId; + } + + @JsonProperty(JSON_PROPERTY_EXECUTION_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExecutionOperationId(String executionOperationId) { + this.executionOperationId = executionOperationId; + } + + public ScreeningVerdict account(Destination account) { + this.account = account; + return this; + } + + /** + * Get account + * + * @return account + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Destination getAccount() { + return account; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccount(Destination account) { + this.account = account; + } + + public ScreeningVerdict assetId(String assetId) { + this.assetId = assetId; + return this; + } + + /** + * Get assetId + * + * @return assetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAssetId() { + return assetId; + } + + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAssetId(String assetId) { + this.assetId = assetId; + } + + public ScreeningVerdict amount(String amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * + * @return amount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(String amount) { + this.amount = amount; + } + + public ScreeningVerdict matchedRule(ScreeningVerdictMatchedRule matchedRule) { + this.matchedRule = matchedRule; + return this; + } + + /** + * Get matchedRule + * + * @return matchedRule + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MATCHED_RULE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScreeningVerdictMatchedRule getMatchedRule() { + return matchedRule; + } + + @JsonProperty(JSON_PROPERTY_MATCHED_RULE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMatchedRule(ScreeningVerdictMatchedRule matchedRule) { + this.matchedRule = matchedRule; + } + + /** Return true if this ScreeningVerdict object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScreeningVerdict screeningVerdict = (ScreeningVerdict) o; + return Objects.equals(this.verdict, screeningVerdict.verdict) + && Objects.equals(this.executionOperationId, screeningVerdict.executionOperationId) + && Objects.equals(this.account, screeningVerdict.account) + && Objects.equals(this.assetId, screeningVerdict.assetId) + && Objects.equals(this.amount, screeningVerdict.amount) + && Objects.equals(this.matchedRule, screeningVerdict.matchedRule); + } + + @Override + public int hashCode() { + return Objects.hash(verdict, executionOperationId, account, assetId, amount, matchedRule); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScreeningVerdict {\n"); + sb.append(" verdict: ").append(toIndentedString(verdict)).append("\n"); + sb.append(" executionOperationId: ") + .append(toIndentedString(executionOperationId)) + .append("\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" assetId: ").append(toIndentedString(assetId)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" matchedRule: ").append(toIndentedString(matchedRule)).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 `verdict` to the URL query string + if (getVerdict() != null) { + joiner.add( + String.format( + "%sverdict%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getVerdict()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `executionOperationId` to the URL query string + if (getExecutionOperationId() != null) { + joiner.add( + String.format( + "%sexecutionOperationId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getExecutionOperationId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + // add `assetId` to the URL query string + if (getAssetId() != null) { + joiner.add( + String.format( + "%sassetId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAssetId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add( + String.format( + "%samount%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `matchedRule` to the URL query string + if (getMatchedRule() != null) { + joiner.add(getMatchedRule().toUrlQueryString(prefix + "matchedRule" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ScreeningVerdictMatchedRule.java b/src/main/java/com/fireblocks/sdk/model/ScreeningVerdictMatchedRule.java new file mode 100644 index 0000000..a85ee17 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ScreeningVerdictMatchedRule.java @@ -0,0 +1,199 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** ScreeningVerdictMatchedRule */ +@JsonPropertyOrder({ + ScreeningVerdictMatchedRule.JSON_PROPERTY_ACTION, + ScreeningVerdictMatchedRule.JSON_PROPERTY_CATEGORY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ScreeningVerdictMatchedRule { + public static final String JSON_PROPERTY_ACTION = "action"; + private String action; + + public static final String JSON_PROPERTY_CATEGORY = "category"; + private List category; + + public ScreeningVerdictMatchedRule() {} + + public ScreeningVerdictMatchedRule action(String action) { + this.action = action; + return this; + } + + /** + * Get action + * + * @return action + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAction() { + return action; + } + + @JsonProperty(JSON_PROPERTY_ACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAction(String action) { + this.action = action; + } + + public ScreeningVerdictMatchedRule category(List category) { + this.category = category; + return this; + } + + public ScreeningVerdictMatchedRule addCategoryItem(String categoryItem) { + if (this.category == null) { + this.category = new ArrayList<>(); + } + this.category.add(categoryItem); + return this; + } + + /** + * Get category + * + * @return category + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCategory() { + return category; + } + + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCategory(List category) { + this.category = category; + } + + /** Return true if this ScreeningVerdict_matchedRule object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScreeningVerdictMatchedRule screeningVerdictMatchedRule = (ScreeningVerdictMatchedRule) o; + return Objects.equals(this.action, screeningVerdictMatchedRule.action) + && Objects.equals(this.category, screeningVerdictMatchedRule.category); + } + + @Override + public int hashCode() { + return Objects.hash(action, category); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScreeningVerdictMatchedRule {\n"); + sb.append(" action: ").append(toIndentedString(action)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).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 `action` to the URL query string + if (getAction() != null) { + joiner.add( + String.format( + "%saction%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAction()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `category` to the URL query string + if (getCategory() != null) { + for (int i = 0; i < getCategory().size(); i++) { + joiner.add( + String.format( + "%scategory%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getCategory().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SetAdminQuorumThresholdResponse.java b/src/main/java/com/fireblocks/sdk/model/SetAdminQuorumThresholdResponse.java new file mode 100644 index 0000000..1da9566 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SetAdminQuorumThresholdResponse.java @@ -0,0 +1,140 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** SetAdminQuorumThresholdResponse */ +@JsonPropertyOrder({SetAdminQuorumThresholdResponse.JSON_PROPERTY_MESSAGE}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SetAdminQuorumThresholdResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public SetAdminQuorumThresholdResponse() {} + + public SetAdminQuorumThresholdResponse message(String message) { + this.message = message; + return this; + } + + /** + * The message which indicates the result of the operation. + * + * @return message + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(String message) { + this.message = message; + } + + /** Return true if this SetAdminQuorumThresholdResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetAdminQuorumThresholdResponse setAdminQuorumThresholdResponse = + (SetAdminQuorumThresholdResponse) o; + return Objects.equals(this.message, setAdminQuorumThresholdResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SetAdminQuorumThresholdResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).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 `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SetNetworkIdRoutingPolicyRequest.java b/src/main/java/com/fireblocks/sdk/model/SetNetworkIdRoutingPolicyRequest.java index f08231d..fd5b431 100644 --- a/src/main/java/com/fireblocks/sdk/model/SetNetworkIdRoutingPolicyRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/SetNetworkIdRoutingPolicyRequest.java @@ -16,6 +16,8 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.StringJoiner; @@ -24,15 +26,25 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class SetNetworkIdRoutingPolicyRequest { public static final String JSON_PROPERTY_ROUTING_POLICY = "routingPolicy"; - private NetworkIdRoutingPolicy routingPolicy; + private Map routingPolicy = new HashMap<>(); public SetNetworkIdRoutingPolicyRequest() {} - public SetNetworkIdRoutingPolicyRequest routingPolicy(NetworkIdRoutingPolicy routingPolicy) { + public SetNetworkIdRoutingPolicyRequest routingPolicy( + Map routingPolicy) { this.routingPolicy = routingPolicy; return this; } + public SetNetworkIdRoutingPolicyRequest putRoutingPolicyItem( + String key, NetworkIdRoutingPolicyValue routingPolicyItem) { + if (this.routingPolicy == null) { + this.routingPolicy = new HashMap<>(); + } + this.routingPolicy.put(key, routingPolicyItem); + return this; + } + /** * Get routingPolicy * @@ -41,13 +53,13 @@ public SetNetworkIdRoutingPolicyRequest routingPolicy(NetworkIdRoutingPolicy rou @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_ROUTING_POLICY) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NetworkIdRoutingPolicy getRoutingPolicy() { + public Map getRoutingPolicy() { return routingPolicy; } @JsonProperty(JSON_PROPERTY_ROUTING_POLICY) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRoutingPolicy(NetworkIdRoutingPolicy routingPolicy) { + public void setRoutingPolicy(Map routingPolicy) { this.routingPolicy = routingPolicy; } @@ -124,7 +136,25 @@ public String toUrlQueryString(String prefix) { // add `routingPolicy` to the URL query string if (getRoutingPolicy() != null) { - joiner.add(getRoutingPolicy().toUrlQueryString(prefix + "routingPolicy" + suffix)); + for (String _key : getRoutingPolicy().keySet()) { + if (getRoutingPolicy().get(_key) != null) { + joiner.add( + getRoutingPolicy() + .get(_key) + .toUrlQueryString( + String.format( + "%sroutingPolicy%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + _key, + containerSuffix)))); + } + } } return joiner.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicyCrypto.java b/src/main/java/com/fireblocks/sdk/model/SetOtaStatusResponse.java similarity index 53% rename from src/main/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicyCrypto.java rename to src/main/java/com/fireblocks/sdk/model/SetOtaStatusResponse.java index af921cb..1f7a1e2 100644 --- a/src/main/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicyCrypto.java +++ b/src/main/java/com/fireblocks/sdk/model/SetOtaStatusResponse.java @@ -28,6 +28,8 @@ import com.fasterxml.jackson.databind.ser.std.StdSerializer; import com.fireblocks.sdk.JSON; import java.io.IOException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; @@ -37,221 +39,212 @@ import java.util.logging.Logger; @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonDeserialize( - using = NetworkIdRoutingPolicyCrypto.NetworkIdRoutingPolicyCryptoDeserializer.class) -@JsonSerialize(using = NetworkIdRoutingPolicyCrypto.NetworkIdRoutingPolicyCryptoSerializer.class) -public class NetworkIdRoutingPolicyCrypto extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(NetworkIdRoutingPolicyCrypto.class.getName()); +@JsonDeserialize(using = SetOtaStatusResponse.SetOtaStatusResponseDeserializer.class) +@JsonSerialize(using = SetOtaStatusResponse.SetOtaStatusResponseSerializer.class) +public class SetOtaStatusResponse extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(SetOtaStatusResponse.class.getName()); - public static class NetworkIdRoutingPolicyCryptoSerializer - extends StdSerializer { - public NetworkIdRoutingPolicyCryptoSerializer(Class t) { + public static class SetOtaStatusResponseSerializer extends StdSerializer { + public SetOtaStatusResponseSerializer(Class t) { super(t); } - public NetworkIdRoutingPolicyCryptoSerializer() { + public SetOtaStatusResponseSerializer() { this(null); } @Override public void serialize( - NetworkIdRoutingPolicyCrypto value, JsonGenerator jgen, SerializerProvider provider) + SetOtaStatusResponse value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { jgen.writeObject(value.getActualInstance()); } } - public static class NetworkIdRoutingPolicyCryptoDeserializer - extends StdDeserializer { - public NetworkIdRoutingPolicyCryptoDeserializer() { - this(NetworkIdRoutingPolicyCrypto.class); + public static class SetOtaStatusResponseDeserializer + extends StdDeserializer { + public SetOtaStatusResponseDeserializer() { + this(SetOtaStatusResponse.class); } - public NetworkIdRoutingPolicyCryptoDeserializer(Class vc) { + public SetOtaStatusResponseDeserializer(Class vc) { super(vc); } @Override - public NetworkIdRoutingPolicyCrypto deserialize(JsonParser jp, DeserializationContext ctxt) + public SetOtaStatusResponse 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 CustomCryptoRoutingDest + // deserialize SetOtaStatusResponseOneOf try { boolean attemptParsing = true; // ensure that we respect type coercion as set on the client ObjectMapper - if (CustomCryptoRoutingDest.class.equals(Integer.class) - || CustomCryptoRoutingDest.class.equals(Long.class) - || CustomCryptoRoutingDest.class.equals(Float.class) - || CustomCryptoRoutingDest.class.equals(Double.class) - || CustomCryptoRoutingDest.class.equals(Boolean.class) - || CustomCryptoRoutingDest.class.equals(String.class)) { + if (SetOtaStatusResponseOneOf.class.equals(Integer.class) + || SetOtaStatusResponseOneOf.class.equals(Long.class) + || SetOtaStatusResponseOneOf.class.equals(Float.class) + || SetOtaStatusResponseOneOf.class.equals(Double.class) + || SetOtaStatusResponseOneOf.class.equals(Boolean.class) + || SetOtaStatusResponseOneOf.class.equals(String.class)) { attemptParsing = typeCoercion; if (!attemptParsing) { attemptParsing |= - ((CustomCryptoRoutingDest.class.equals(Integer.class) - || CustomCryptoRoutingDest.class.equals(Long.class)) + ((SetOtaStatusResponseOneOf.class.equals(Integer.class) + || SetOtaStatusResponseOneOf.class.equals( + Long.class)) && token == JsonToken.VALUE_NUMBER_INT); attemptParsing |= - ((CustomCryptoRoutingDest.class.equals(Float.class) - || CustomCryptoRoutingDest.class.equals( + ((SetOtaStatusResponseOneOf.class.equals(Float.class) + || SetOtaStatusResponseOneOf.class.equals( Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); attemptParsing |= - (CustomCryptoRoutingDest.class.equals(Boolean.class) + (SetOtaStatusResponseOneOf.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); attemptParsing |= - (CustomCryptoRoutingDest.class.equals(String.class) + (SetOtaStatusResponseOneOf.class.equals(String.class) && token == JsonToken.VALUE_STRING); } } if (attemptParsing) { deserialized = - tree.traverse(jp.getCodec()).readValueAs(CustomCryptoRoutingDest.class); + tree.traverse(jp.getCodec()) + .readValueAs(SetOtaStatusResponseOneOf.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 'CustomCryptoRoutingDest'"); + log.log(Level.FINER, "Input data matches schema 'SetOtaStatusResponseOneOf'"); } } catch (Exception e) { // deserialization failed, continue log.log( Level.FINER, - "Input data does not match schema 'CustomCryptoRoutingDest'", + "Input data does not match schema 'SetOtaStatusResponseOneOf'", e); } - // deserialize NoneNetworkRoutingDest + // deserialize String try { boolean attemptParsing = true; // ensure that we respect type coercion as set on the client ObjectMapper - if (NoneNetworkRoutingDest.class.equals(Integer.class) - || NoneNetworkRoutingDest.class.equals(Long.class) - || NoneNetworkRoutingDest.class.equals(Float.class) - || NoneNetworkRoutingDest.class.equals(Double.class) - || NoneNetworkRoutingDest.class.equals(Boolean.class) - || NoneNetworkRoutingDest.class.equals(String.class)) { + if (String.class.equals(Integer.class) + || String.class.equals(Long.class) + || String.class.equals(Float.class) + || String.class.equals(Double.class) + || String.class.equals(Boolean.class) + || String.class.equals(String.class)) { attemptParsing = typeCoercion; if (!attemptParsing) { attemptParsing |= - ((NoneNetworkRoutingDest.class.equals(Integer.class) - || NoneNetworkRoutingDest.class.equals(Long.class)) + ((String.class.equals(Integer.class) + || String.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); attemptParsing |= - ((NoneNetworkRoutingDest.class.equals(Float.class) - || NoneNetworkRoutingDest.class.equals( - Double.class)) + ((String.class.equals(Float.class) + || String.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); attemptParsing |= - (NoneNetworkRoutingDest.class.equals(Boolean.class) + (String.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); attemptParsing |= - (NoneNetworkRoutingDest.class.equals(String.class) + (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); } } if (attemptParsing) { - deserialized = - tree.traverse(jp.getCodec()).readValueAs(NoneNetworkRoutingDest.class); + deserialized = tree.traverse(jp.getCodec()).readValueAs(String.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 'NoneNetworkRoutingDest'"); + log.log(Level.FINER, "Input data matches schema 'String'"); } } catch (Exception e) { // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'NoneNetworkRoutingDest'", - e); + log.log(Level.FINER, "Input data does not match schema 'String'", e); } if (match == 1) { - NetworkIdRoutingPolicyCrypto ret = new NetworkIdRoutingPolicyCrypto(); + SetOtaStatusResponse ret = new SetOtaStatusResponse(); ret.setActualInstance(deserialized); return ret; } throw new IOException( String.format( - "Failed deserialization for NetworkIdRoutingPolicyCrypto: %d classes" - + " match result, expected 1", + "Failed deserialization for SetOtaStatusResponse: %d classes match" + + " result, expected 1", match)); } /** Handle deserialization of the 'null' value. */ @Override - public NetworkIdRoutingPolicyCrypto getNullValue(DeserializationContext ctxt) + public SetOtaStatusResponse getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "NetworkIdRoutingPolicyCrypto cannot be null"); + throw new JsonMappingException(ctxt.getParser(), "SetOtaStatusResponse cannot be null"); } } // store a list of schema names defined in oneOf public static final Map> schemas = new HashMap<>(); - public NetworkIdRoutingPolicyCrypto() { + public SetOtaStatusResponse() { super("oneOf", Boolean.FALSE); } - public NetworkIdRoutingPolicyCrypto(CustomCryptoRoutingDest o) { + public SetOtaStatusResponse(SetOtaStatusResponseOneOf o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } - public NetworkIdRoutingPolicyCrypto(NoneNetworkRoutingDest o) { + public SetOtaStatusResponse(String o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } static { - schemas.put("CustomCryptoRoutingDest", CustomCryptoRoutingDest.class); - schemas.put("NoneNetworkRoutingDest", NoneNetworkRoutingDest.class); - JSON.registerDescendants( - NetworkIdRoutingPolicyCrypto.class, Collections.unmodifiableMap(schemas)); + schemas.put("SetOtaStatusResponseOneOf", SetOtaStatusResponseOneOf.class); + schemas.put("String", String.class); + JSON.registerDescendants(SetOtaStatusResponse.class, Collections.unmodifiableMap(schemas)); } @Override public Map> getSchemas() { - return NetworkIdRoutingPolicyCrypto.schemas; + return SetOtaStatusResponse.schemas; } /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: CustomCryptoRoutingDest, NoneNetworkRoutingDest + * against the oneOf child schemas: SetOtaStatusResponseOneOf, String * *

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(CustomCryptoRoutingDest.class, instance, new HashSet>())) { + if (JSON.isInstanceOf(SetOtaStatusResponseOneOf.class, instance, new HashSet>())) { super.setActualInstance(instance); return; } - if (JSON.isInstanceOf(NoneNetworkRoutingDest.class, instance, new HashSet>())) { + if (JSON.isInstanceOf(String.class, instance, new HashSet>())) { super.setActualInstance(instance); return; } throw new RuntimeException( - "Invalid instance type. Must be CustomCryptoRoutingDest, NoneNetworkRoutingDest"); + "Invalid instance type. Must be SetOtaStatusResponseOneOf, String"); } /** - * Get the actual instance, which can be the following: CustomCryptoRoutingDest, - * NoneNetworkRoutingDest + * Get the actual instance, which can be the following: SetOtaStatusResponseOneOf, String * - * @return The actual instance (CustomCryptoRoutingDest, NoneNetworkRoutingDest) + * @return The actual instance (SetOtaStatusResponseOneOf, String) */ @Override public Object getActualInstance() { @@ -259,25 +252,25 @@ public Object getActualInstance() { } /** - * Get the actual instance of `CustomCryptoRoutingDest`. If the actual instance is not - * `CustomCryptoRoutingDest`, the ClassCastException will be thrown. + * Get the actual instance of `SetOtaStatusResponseOneOf`. If the actual instance is not + * `SetOtaStatusResponseOneOf`, the ClassCastException will be thrown. * - * @return The actual instance of `CustomCryptoRoutingDest` - * @throws ClassCastException if the instance is not `CustomCryptoRoutingDest` + * @return The actual instance of `SetOtaStatusResponseOneOf` + * @throws ClassCastException if the instance is not `SetOtaStatusResponseOneOf` */ - public CustomCryptoRoutingDest getCustomCryptoRoutingDest() throws ClassCastException { - return (CustomCryptoRoutingDest) super.getActualInstance(); + public SetOtaStatusResponseOneOf getSetOtaStatusResponseOneOf() throws ClassCastException { + return (SetOtaStatusResponseOneOf) super.getActualInstance(); } /** - * Get the actual instance of `NoneNetworkRoutingDest`. If the actual instance is not - * `NoneNetworkRoutingDest`, the ClassCastException will be thrown. + * Get the actual instance of `String`. If the actual instance is not `String`, the + * ClassCastException will be thrown. * - * @return The actual instance of `NoneNetworkRoutingDest` - * @throws ClassCastException if the instance is not `NoneNetworkRoutingDest` + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` */ - public NoneNetworkRoutingDest getNoneNetworkRoutingDest() throws ClassCastException { - return (NoneNetworkRoutingDest) super.getActualInstance(); + public String getString() throws ClassCastException { + return (String) super.getActualInstance(); } /** @@ -312,19 +305,25 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - if (getActualInstance() instanceof CustomCryptoRoutingDest) { + if (getActualInstance() instanceof SetOtaStatusResponseOneOf) { if (getActualInstance() != null) { joiner.add( - ((CustomCryptoRoutingDest) getActualInstance()) + ((SetOtaStatusResponseOneOf) getActualInstance()) .toUrlQueryString(prefix + "one_of_0" + suffix)); } return joiner.toString(); } - if (getActualInstance() instanceof NoneNetworkRoutingDest) { + if (getActualInstance() instanceof String) { if (getActualInstance() != null) { joiner.add( - ((NoneNetworkRoutingDest) getActualInstance()) - .toUrlQueryString(prefix + "one_of_1" + suffix)); + String.format( + "%sone_of_1%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getActualInstance()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); } return joiner.toString(); } diff --git a/src/main/java/com/fireblocks/sdk/model/SetOtaStatusResponseOneOf.java b/src/main/java/com/fireblocks/sdk/model/SetOtaStatusResponseOneOf.java new file mode 100644 index 0000000..8f89c42 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SetOtaStatusResponseOneOf.java @@ -0,0 +1,139 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** SetOtaStatusResponseOneOf */ +@JsonPropertyOrder({SetOtaStatusResponseOneOf.JSON_PROPERTY_MESSAGE}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SetOtaStatusResponseOneOf { + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public SetOtaStatusResponseOneOf() {} + + public SetOtaStatusResponseOneOf message(String message) { + this.message = message; + return this; + } + + /** + * Message indicating the result of the operation for example when no config change is needed + * + * @return message + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + } + + /** Return true if this SetOtaStatusResponse_oneOf object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetOtaStatusResponseOneOf setOtaStatusResponseOneOf = (SetOtaStatusResponseOneOf) o; + return Objects.equals(this.message, setOtaStatusResponseOneOf.message); + } + + @Override + public int hashCode() { + return Objects.hash(message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SetOtaStatusResponseOneOf {\n"); + sb.append(" message: ").append(toIndentedString(message)).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 `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SetRoutingPolicyRequest.java b/src/main/java/com/fireblocks/sdk/model/SetRoutingPolicyRequest.java index 52d839a..85d62c9 100644 --- a/src/main/java/com/fireblocks/sdk/model/SetRoutingPolicyRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/SetRoutingPolicyRequest.java @@ -16,6 +16,8 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.StringJoiner; @@ -24,15 +26,25 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class SetRoutingPolicyRequest { public static final String JSON_PROPERTY_ROUTING_POLICY = "routingPolicy"; - private NetworkConnectionRoutingPolicy routingPolicy; + private Map routingPolicy = new HashMap<>(); public SetRoutingPolicyRequest() {} - public SetRoutingPolicyRequest routingPolicy(NetworkConnectionRoutingPolicy routingPolicy) { + public SetRoutingPolicyRequest routingPolicy( + Map routingPolicy) { this.routingPolicy = routingPolicy; return this; } + public SetRoutingPolicyRequest putRoutingPolicyItem( + String key, NetworkConnectionRoutingPolicyValue routingPolicyItem) { + if (this.routingPolicy == null) { + this.routingPolicy = new HashMap<>(); + } + this.routingPolicy.put(key, routingPolicyItem); + return this; + } + /** * Get routingPolicy * @@ -41,13 +53,13 @@ public SetRoutingPolicyRequest routingPolicy(NetworkConnectionRoutingPolicy rout @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_ROUTING_POLICY) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NetworkConnectionRoutingPolicy getRoutingPolicy() { + public Map getRoutingPolicy() { return routingPolicy; } @JsonProperty(JSON_PROPERTY_ROUTING_POLICY) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRoutingPolicy(NetworkConnectionRoutingPolicy routingPolicy) { + public void setRoutingPolicy(Map routingPolicy) { this.routingPolicy = routingPolicy; } @@ -123,7 +135,25 @@ public String toUrlQueryString(String prefix) { // add `routingPolicy` to the URL query string if (getRoutingPolicy() != null) { - joiner.add(getRoutingPolicy().toUrlQueryString(prefix + "routingPolicy" + suffix)); + for (String _key : getRoutingPolicy().keySet()) { + if (getRoutingPolicy().get(_key) != null) { + joiner.add( + getRoutingPolicy() + .get(_key) + .toUrlQueryString( + String.format( + "%sroutingPolicy%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + _key, + containerSuffix)))); + } + } } return joiner.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/TransferConfigOperation.java b/src/main/java/com/fireblocks/sdk/model/TransferConfigOperation.java new file mode 100644 index 0000000..4e99bcb --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TransferConfigOperation.java @@ -0,0 +1,295 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** TransferConfigOperation */ +@JsonPropertyOrder({ + TransferConfigOperation.JSON_PROPERTY_OPERATION_ID, + TransferConfigOperation.JSON_PROPERTY_TYPE, + TransferConfigOperation.JSON_PROPERTY_PARAMS, + TransferConfigOperation.JSON_PROPERTY_STATUS, + TransferConfigOperation.JSON_PROPERTY_VALIDATION_FAILURE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TransferConfigOperation { + public static final String JSON_PROPERTY_OPERATION_ID = "operationId"; + private String operationId; + + public static final String JSON_PROPERTY_TYPE = "type"; + private TransferOperationType type; + + public static final String JSON_PROPERTY_PARAMS = "params"; + private TransferOperationConfigParams params; + + public static final String JSON_PROPERTY_STATUS = "status"; + private ConfigOperationStatus status; + + public static final String JSON_PROPERTY_VALIDATION_FAILURE = "validationFailure"; + private TransferValidationFailure validationFailure; + + public TransferConfigOperation() {} + + public TransferConfigOperation operationId(String operationId) { + this.operationId = operationId; + return this; + } + + /** + * Get operationId + * + * @return operationId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOperationId() { + return operationId; + } + + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOperationId(String operationId) { + this.operationId = operationId; + } + + public TransferConfigOperation type(TransferOperationType type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TransferOperationType getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TransferOperationType type) { + this.type = type; + } + + public TransferConfigOperation params(TransferOperationConfigParams params) { + this.params = params; + return this; + } + + /** + * Get params + * + * @return params + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TransferOperationConfigParams getParams() { + return params; + } + + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setParams(TransferOperationConfigParams params) { + this.params = params; + } + + public TransferConfigOperation status(ConfigOperationStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConfigOperationStatus getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(ConfigOperationStatus status) { + this.status = status; + } + + public TransferConfigOperation validationFailure(TransferValidationFailure validationFailure) { + this.validationFailure = validationFailure; + return this; + } + + /** + * Get validationFailure + * + * @return validationFailure + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALIDATION_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransferValidationFailure getValidationFailure() { + return validationFailure; + } + + @JsonProperty(JSON_PROPERTY_VALIDATION_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValidationFailure(TransferValidationFailure validationFailure) { + this.validationFailure = validationFailure; + } + + /** Return true if this TransferConfigOperation object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransferConfigOperation transferConfigOperation = (TransferConfigOperation) o; + return Objects.equals(this.operationId, transferConfigOperation.operationId) + && Objects.equals(this.type, transferConfigOperation.type) + && Objects.equals(this.params, transferConfigOperation.params) + && Objects.equals(this.status, transferConfigOperation.status) + && Objects.equals( + this.validationFailure, transferConfigOperation.validationFailure); + } + + @Override + public int hashCode() { + return Objects.hash(operationId, type, params, status, validationFailure); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransferConfigOperation {\n"); + sb.append(" operationId: ").append(toIndentedString(operationId)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" params: ").append(toIndentedString(params)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" validationFailure: ") + .append(toIndentedString(validationFailure)) + .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 `operationId` to the URL query string + if (getOperationId() != null) { + joiner.add( + String.format( + "%soperationId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getOperationId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `params` to the URL query string + if (getParams() != null) { + joiner.add(getParams().toUrlQueryString(prefix + "params" + suffix)); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `validationFailure` to the URL query string + if (getValidationFailure() != null) { + joiner.add( + getValidationFailure().toUrlQueryString(prefix + "validationFailure" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransferOperationConfigParams.java b/src/main/java/com/fireblocks/sdk/model/TransferOperationConfigParams.java new file mode 100644 index 0000000..4ce6386 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TransferOperationConfigParams.java @@ -0,0 +1,250 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** TransferOperationConfigParams */ +@JsonPropertyOrder({ + TransferOperationConfigParams.JSON_PROPERTY_AMOUNT, + TransferOperationConfigParams.JSON_PROPERTY_ASSET_ID, + TransferOperationConfigParams.JSON_PROPERTY_SOURCE, + TransferOperationConfigParams.JSON_PROPERTY_DESTINATION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TransferOperationConfigParams { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private String amount; + + public static final String JSON_PROPERTY_ASSET_ID = "assetId"; + private String assetId; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private Account source; + + public static final String JSON_PROPERTY_DESTINATION = "destination"; + private Destination destination; + + public TransferOperationConfigParams() {} + + public TransferOperationConfigParams amount(String amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * + * @return amount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAmount(String amount) { + this.amount = amount; + } + + public TransferOperationConfigParams assetId(String assetId) { + this.assetId = assetId; + return this; + } + + /** + * Get assetId + * + * @return assetId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAssetId() { + return assetId; + } + + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAssetId(String assetId) { + this.assetId = assetId; + } + + public TransferOperationConfigParams source(Account source) { + this.source = source; + return this; + } + + /** + * Get source + * + * @return source + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Account getSource() { + return source; + } + + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSource(Account source) { + this.source = source; + } + + public TransferOperationConfigParams destination(Destination destination) { + this.destination = destination; + return this; + } + + /** + * Get destination + * + * @return destination + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESTINATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Destination getDestination() { + return destination; + } + + @JsonProperty(JSON_PROPERTY_DESTINATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDestination(Destination destination) { + this.destination = destination; + } + + /** Return true if this TransferOperationConfigParams object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransferOperationConfigParams transferOperationConfigParams = + (TransferOperationConfigParams) o; + return Objects.equals(this.amount, transferOperationConfigParams.amount) + && Objects.equals(this.assetId, transferOperationConfigParams.assetId) + && Objects.equals(this.source, transferOperationConfigParams.source) + && Objects.equals(this.destination, transferOperationConfigParams.destination); + } + + @Override + public int hashCode() { + return Objects.hash(amount, assetId, source, destination); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransferOperationConfigParams {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" assetId: ").append(toIndentedString(assetId)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" destination: ").append(toIndentedString(destination)).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 `amount` to the URL query string + if (getAmount() != null) { + joiner.add( + String.format( + "%samount%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `assetId` to the URL query string + if (getAssetId() != null) { + joiner.add( + String.format( + "%sassetId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAssetId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `source` to the URL query string + if (getSource() != null) { + joiner.add(getSource().toUrlQueryString(prefix + "source" + suffix)); + } + + // add `destination` to the URL query string + if (getDestination() != null) { + joiner.add(getDestination().toUrlQueryString(prefix + "destination" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransferOperationExecution.java b/src/main/java/com/fireblocks/sdk/model/TransferOperationExecution.java new file mode 100644 index 0000000..6f20072 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TransferOperationExecution.java @@ -0,0 +1,326 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** TransferOperationExecution */ +@JsonPropertyOrder({ + TransferOperationExecution.JSON_PROPERTY_INPUT, + TransferOperationExecution.JSON_PROPERTY_OUTPUT, + TransferOperationExecution.JSON_PROPERTY_TX_ID, + TransferOperationExecution.JSON_PROPERTY_STARTED_AT, + TransferOperationExecution.JSON_PROPERTY_FINISHED_AT, + TransferOperationExecution.JSON_PROPERTY_FAILURE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TransferOperationExecution { + public static final String JSON_PROPERTY_INPUT = "input"; + private TransferOperationConfigParams input; + + public static final String JSON_PROPERTY_OUTPUT = "output"; + private TransferOperationExecutionOutput output; + + public static final String JSON_PROPERTY_TX_ID = "txId"; + private String txId; + + public static final String JSON_PROPERTY_STARTED_AT = "startedAt"; + private BigDecimal startedAt; + + public static final String JSON_PROPERTY_FINISHED_AT = "finishedAt"; + private BigDecimal finishedAt; + + public static final String JSON_PROPERTY_FAILURE = "failure"; + private TransferOperationFailure failure; + + public TransferOperationExecution() {} + + public TransferOperationExecution input(TransferOperationConfigParams input) { + this.input = input; + return this; + } + + /** + * Get input + * + * @return input + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TransferOperationConfigParams getInput() { + return input; + } + + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInput(TransferOperationConfigParams input) { + this.input = input; + } + + public TransferOperationExecution output(TransferOperationExecutionOutput output) { + this.output = output; + return this; + } + + /** + * Get output + * + * @return output + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransferOperationExecutionOutput getOutput() { + return output; + } + + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOutput(TransferOperationExecutionOutput output) { + this.output = output; + } + + public TransferOperationExecution txId(String txId) { + this.txId = txId; + return this; + } + + /** + * Get txId + * + * @return txId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TX_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTxId() { + return txId; + } + + @JsonProperty(JSON_PROPERTY_TX_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTxId(String txId) { + this.txId = txId; + } + + public TransferOperationExecution startedAt(BigDecimal startedAt) { + this.startedAt = startedAt; + return this; + } + + /** + * Get startedAt + * + * @return startedAt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getStartedAt() { + return startedAt; + } + + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStartedAt(BigDecimal startedAt) { + this.startedAt = startedAt; + } + + public TransferOperationExecution finishedAt(BigDecimal finishedAt) { + this.finishedAt = finishedAt; + return this; + } + + /** + * Get finishedAt + * + * @return finishedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FINISHED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getFinishedAt() { + return finishedAt; + } + + @JsonProperty(JSON_PROPERTY_FINISHED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFinishedAt(BigDecimal finishedAt) { + this.finishedAt = finishedAt; + } + + public TransferOperationExecution failure(TransferOperationFailure failure) { + this.failure = failure; + return this; + } + + /** + * Get failure + * + * @return failure + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransferOperationFailure getFailure() { + return failure; + } + + @JsonProperty(JSON_PROPERTY_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFailure(TransferOperationFailure failure) { + this.failure = failure; + } + + /** Return true if this TransferOperationExecution object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransferOperationExecution transferOperationExecution = (TransferOperationExecution) o; + return Objects.equals(this.input, transferOperationExecution.input) + && Objects.equals(this.output, transferOperationExecution.output) + && Objects.equals(this.txId, transferOperationExecution.txId) + && Objects.equals(this.startedAt, transferOperationExecution.startedAt) + && Objects.equals(this.finishedAt, transferOperationExecution.finishedAt) + && Objects.equals(this.failure, transferOperationExecution.failure); + } + + @Override + public int hashCode() { + return Objects.hash(input, output, txId, startedAt, finishedAt, failure); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransferOperationExecution {\n"); + sb.append(" input: ").append(toIndentedString(input)).append("\n"); + sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append(" txId: ").append(toIndentedString(txId)).append("\n"); + sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); + sb.append(" finishedAt: ").append(toIndentedString(finishedAt)).append("\n"); + sb.append(" failure: ").append(toIndentedString(failure)).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 `input` to the URL query string + if (getInput() != null) { + joiner.add(getInput().toUrlQueryString(prefix + "input" + suffix)); + } + + // add `output` to the URL query string + if (getOutput() != null) { + joiner.add(getOutput().toUrlQueryString(prefix + "output" + suffix)); + } + + // add `txId` to the URL query string + if (getTxId() != null) { + joiner.add( + String.format( + "%stxId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTxId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `startedAt` to the URL query string + if (getStartedAt() != null) { + joiner.add( + String.format( + "%sstartedAt%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getStartedAt()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `finishedAt` to the URL query string + if (getFinishedAt() != null) { + joiner.add( + String.format( + "%sfinishedAt%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getFinishedAt()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `failure` to the URL query string + if (getFailure() != null) { + joiner.add(getFailure().toUrlQueryString(prefix + "failure" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransferOperationExecutionOutput.java b/src/main/java/com/fireblocks/sdk/model/TransferOperationExecutionOutput.java new file mode 100644 index 0000000..a28d1a5 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TransferOperationExecutionOutput.java @@ -0,0 +1,168 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.util.Objects; +import java.util.StringJoiner; + +/** TransferOperationExecutionOutput */ +@JsonPropertyOrder({ + TransferOperationExecutionOutput.JSON_PROPERTY_AMOUNT, + TransferOperationExecutionOutput.JSON_PROPERTY_FEE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TransferOperationExecutionOutput { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private AssetAmount amount; + + public static final String JSON_PROPERTY_FEE = "fee"; + private AssetAmount fee; + + public TransferOperationExecutionOutput() {} + + public TransferOperationExecutionOutput amount(AssetAmount amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * + * @return amount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetAmount getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(AssetAmount amount) { + this.amount = amount; + } + + public TransferOperationExecutionOutput fee(AssetAmount fee) { + this.fee = fee; + return this; + } + + /** + * Get fee + * + * @return fee + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetAmount getFee() { + return fee; + } + + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFee(AssetAmount fee) { + this.fee = fee; + } + + /** Return true if this TransferOperationExecutionOutput object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransferOperationExecutionOutput transferOperationExecutionOutput = + (TransferOperationExecutionOutput) o; + return Objects.equals(this.amount, transferOperationExecutionOutput.amount) + && Objects.equals(this.fee, transferOperationExecutionOutput.fee); + } + + @Override + public int hashCode() { + return Objects.hash(amount, fee); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransferOperationExecutionOutput {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).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 `amount` to the URL query string + if (getAmount() != null) { + joiner.add(getAmount().toUrlQueryString(prefix + "amount" + suffix)); + } + + // add `fee` to the URL query string + if (getFee() != null) { + joiner.add(getFee().toUrlQueryString(prefix + "fee" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransferOperationExecutionParams.java b/src/main/java/com/fireblocks/sdk/model/TransferOperationExecutionParams.java new file mode 100644 index 0000000..4a7a7f4 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TransferOperationExecutionParams.java @@ -0,0 +1,184 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** TransferOperationExecutionParams */ +@JsonPropertyOrder({ + TransferOperationExecutionParams.JSON_PROPERTY_CONFIG_OPERATION_ID, + TransferOperationExecutionParams.JSON_PROPERTY_EXECUTION_PARAMS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TransferOperationExecutionParams { + public static final String JSON_PROPERTY_CONFIG_OPERATION_ID = "configOperationId"; + private String configOperationId; + + public static final String JSON_PROPERTY_EXECUTION_PARAMS = "executionParams"; + private TransferOperationExecutionParamsExecutionParams executionParams; + + public TransferOperationExecutionParams() {} + + public TransferOperationExecutionParams configOperationId(String configOperationId) { + this.configOperationId = configOperationId; + return this; + } + + /** + * Get configOperationId + * + * @return configOperationId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIG_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConfigOperationId() { + return configOperationId; + } + + @JsonProperty(JSON_PROPERTY_CONFIG_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setConfigOperationId(String configOperationId) { + this.configOperationId = configOperationId; + } + + public TransferOperationExecutionParams executionParams( + TransferOperationExecutionParamsExecutionParams executionParams) { + this.executionParams = executionParams; + return this; + } + + /** + * Get executionParams + * + * @return executionParams + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransferOperationExecutionParamsExecutionParams getExecutionParams() { + return executionParams; + } + + @JsonProperty(JSON_PROPERTY_EXECUTION_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutionParams( + TransferOperationExecutionParamsExecutionParams executionParams) { + this.executionParams = executionParams; + } + + /** Return true if this TransferOperationExecutionParams object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransferOperationExecutionParams transferOperationExecutionParams = + (TransferOperationExecutionParams) o; + return Objects.equals( + this.configOperationId, transferOperationExecutionParams.configOperationId) + && Objects.equals( + this.executionParams, transferOperationExecutionParams.executionParams); + } + + @Override + public int hashCode() { + return Objects.hash(configOperationId, executionParams); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransferOperationExecutionParams {\n"); + sb.append(" configOperationId: ") + .append(toIndentedString(configOperationId)) + .append("\n"); + sb.append(" executionParams: ").append(toIndentedString(executionParams)).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 `configOperationId` to the URL query string + if (getConfigOperationId() != null) { + joiner.add( + String.format( + "%sconfigOperationId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getConfigOperationId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `executionParams` to the URL query string + if (getExecutionParams() != null) { + joiner.add(getExecutionParams().toUrlQueryString(prefix + "executionParams" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransferOperationExecutionParamsExecutionParams.java b/src/main/java/com/fireblocks/sdk/model/TransferOperationExecutionParamsExecutionParams.java new file mode 100644 index 0000000..7b470e5 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TransferOperationExecutionParamsExecutionParams.java @@ -0,0 +1,257 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** TransferOperationExecutionParamsExecutionParams */ +@JsonPropertyOrder({ + TransferOperationExecutionParamsExecutionParams.JSON_PROPERTY_AMOUNT, + TransferOperationExecutionParamsExecutionParams.JSON_PROPERTY_ASSET_ID, + TransferOperationExecutionParamsExecutionParams.JSON_PROPERTY_SOURCE, + TransferOperationExecutionParamsExecutionParams.JSON_PROPERTY_DESTINATION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TransferOperationExecutionParamsExecutionParams { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private String amount; + + public static final String JSON_PROPERTY_ASSET_ID = "assetId"; + private String assetId; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private Account source; + + public static final String JSON_PROPERTY_DESTINATION = "destination"; + private Destination destination; + + public TransferOperationExecutionParamsExecutionParams() {} + + public TransferOperationExecutionParamsExecutionParams amount(String amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * + * @return amount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAmount(String amount) { + this.amount = amount; + } + + public TransferOperationExecutionParamsExecutionParams assetId(String assetId) { + this.assetId = assetId; + return this; + } + + /** + * Get assetId + * + * @return assetId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAssetId() { + return assetId; + } + + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAssetId(String assetId) { + this.assetId = assetId; + } + + public TransferOperationExecutionParamsExecutionParams source(Account source) { + this.source = source; + return this; + } + + /** + * Get source + * + * @return source + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Account getSource() { + return source; + } + + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSource(Account source) { + this.source = source; + } + + public TransferOperationExecutionParamsExecutionParams destination(Destination destination) { + this.destination = destination; + return this; + } + + /** + * Get destination + * + * @return destination + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESTINATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Destination getDestination() { + return destination; + } + + @JsonProperty(JSON_PROPERTY_DESTINATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDestination(Destination destination) { + this.destination = destination; + } + + /** + * Return true if this TransferOperationExecutionParams_executionParams object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransferOperationExecutionParamsExecutionParams + transferOperationExecutionParamsExecutionParams = + (TransferOperationExecutionParamsExecutionParams) o; + return Objects.equals(this.amount, transferOperationExecutionParamsExecutionParams.amount) + && Objects.equals( + this.assetId, transferOperationExecutionParamsExecutionParams.assetId) + && Objects.equals( + this.source, transferOperationExecutionParamsExecutionParams.source) + && Objects.equals( + this.destination, + transferOperationExecutionParamsExecutionParams.destination); + } + + @Override + public int hashCode() { + return Objects.hash(amount, assetId, source, destination); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransferOperationExecutionParamsExecutionParams {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" assetId: ").append(toIndentedString(assetId)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" destination: ").append(toIndentedString(destination)).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 `amount` to the URL query string + if (getAmount() != null) { + joiner.add( + String.format( + "%samount%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `assetId` to the URL query string + if (getAssetId() != null) { + joiner.add( + String.format( + "%sassetId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAssetId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `source` to the URL query string + if (getSource() != null) { + joiner.add(getSource().toUrlQueryString(prefix + "source" + suffix)); + } + + // add `destination` to the URL query string + if (getDestination() != null) { + joiner.add(getDestination().toUrlQueryString(prefix + "destination" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransferOperationFailure.java b/src/main/java/com/fireblocks/sdk/model/TransferOperationFailure.java new file mode 100644 index 0000000..5b710c7 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TransferOperationFailure.java @@ -0,0 +1,212 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** TransferOperationFailure */ +@JsonPropertyOrder({ + TransferOperationFailure.JSON_PROPERTY_REASON, + TransferOperationFailure.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TransferOperationFailure { + /** Gets or Sets reason */ + public enum ReasonEnum { + INVALID_AMOUNT("INVALID_AMOUNT"), + + SUBMISSION_FAILED("SUBMISSION_FAILED"), + + TRANSACTION_FAILED("TRANSACTION_FAILED"); + + private String value; + + ReasonEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ReasonEnum fromValue(String value) { + for (ReasonEnum b : ReasonEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_REASON = "reason"; + private ReasonEnum reason; + + public static final String JSON_PROPERTY_DATA = "data"; + private TransferOperationFailureData data; + + public TransferOperationFailure() {} + + public TransferOperationFailure reason(ReasonEnum reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * + * @return reason + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReasonEnum getReason() { + return reason; + } + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReason(ReasonEnum reason) { + this.reason = reason; + } + + public TransferOperationFailure data(TransferOperationFailureData data) { + this.data = data; + return this; + } + + /** + * Get data + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransferOperationFailureData getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(TransferOperationFailureData data) { + this.data = data; + } + + /** Return true if this TransferOperationFailure object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransferOperationFailure transferOperationFailure = (TransferOperationFailure) o; + return Objects.equals(this.reason, transferOperationFailure.reason) + && Objects.equals(this.data, transferOperationFailure.data); + } + + @Override + public int hashCode() { + return Objects.hash(reason, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransferOperationFailure {\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).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 `reason` to the URL query string + if (getReason() != null) { + joiner.add( + String.format( + "%sreason%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransferOperationFailureData.java b/src/main/java/com/fireblocks/sdk/model/TransferOperationFailureData.java new file mode 100644 index 0000000..0bcbbf6 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TransferOperationFailureData.java @@ -0,0 +1,224 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** TransferOperationFailureData */ +@JsonPropertyOrder({ + TransferOperationFailureData.JSON_PROPERTY_TX_ID, + TransferOperationFailureData.JSON_PROPERTY_TX_STATUS, + TransferOperationFailureData.JSON_PROPERTY_TX_SUB_STATUS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TransferOperationFailureData { + public static final String JSON_PROPERTY_TX_ID = "txId"; + private String txId; + + public static final String JSON_PROPERTY_TX_STATUS = "txStatus"; + private String txStatus; + + public static final String JSON_PROPERTY_TX_SUB_STATUS = "txSubStatus"; + private String txSubStatus; + + public TransferOperationFailureData() {} + + public TransferOperationFailureData txId(String txId) { + this.txId = txId; + return this; + } + + /** + * Get txId + * + * @return txId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TX_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTxId() { + return txId; + } + + @JsonProperty(JSON_PROPERTY_TX_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTxId(String txId) { + this.txId = txId; + } + + public TransferOperationFailureData txStatus(String txStatus) { + this.txStatus = txStatus; + return this; + } + + /** + * Get txStatus + * + * @return txStatus + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TX_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTxStatus() { + return txStatus; + } + + @JsonProperty(JSON_PROPERTY_TX_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTxStatus(String txStatus) { + this.txStatus = txStatus; + } + + public TransferOperationFailureData txSubStatus(String txSubStatus) { + this.txSubStatus = txSubStatus; + return this; + } + + /** + * Get txSubStatus + * + * @return txSubStatus + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TX_SUB_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTxSubStatus() { + return txSubStatus; + } + + @JsonProperty(JSON_PROPERTY_TX_SUB_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTxSubStatus(String txSubStatus) { + this.txSubStatus = txSubStatus; + } + + /** Return true if this TransferOperationFailure_data object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransferOperationFailureData transferOperationFailureData = + (TransferOperationFailureData) o; + return Objects.equals(this.txId, transferOperationFailureData.txId) + && Objects.equals(this.txStatus, transferOperationFailureData.txStatus) + && Objects.equals(this.txSubStatus, transferOperationFailureData.txSubStatus); + } + + @Override + public int hashCode() { + return Objects.hash(txId, txStatus, txSubStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransferOperationFailureData {\n"); + sb.append(" txId: ").append(toIndentedString(txId)).append("\n"); + sb.append(" txStatus: ").append(toIndentedString(txStatus)).append("\n"); + sb.append(" txSubStatus: ").append(toIndentedString(txSubStatus)).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 `txId` to the URL query string + if (getTxId() != null) { + joiner.add( + String.format( + "%stxId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTxId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `txStatus` to the URL query string + if (getTxStatus() != null) { + joiner.add( + String.format( + "%stxStatus%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTxStatus()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `txSubStatus` to the URL query string + if (getTxSubStatus() != null) { + joiner.add( + String.format( + "%stxSubStatus%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTxSubStatus()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransferOperationPreview.java b/src/main/java/com/fireblocks/sdk/model/TransferOperationPreview.java new file mode 100644 index 0000000..30b2ccd --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TransferOperationPreview.java @@ -0,0 +1,201 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.util.Objects; +import java.util.StringJoiner; + +/** TransferOperationPreview */ +@JsonPropertyOrder({ + TransferOperationPreview.JSON_PROPERTY_INPUT, + TransferOperationPreview.JSON_PROPERTY_OUTPUT, + TransferOperationPreview.JSON_PROPERTY_FAILURE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TransferOperationPreview { + public static final String JSON_PROPERTY_INPUT = "input"; + private TransferOperationConfigParams input; + + public static final String JSON_PROPERTY_OUTPUT = "output"; + private TransferOperationPreviewOutput output; + + public static final String JSON_PROPERTY_FAILURE = "failure"; + private TransferOperationFailure failure; + + public TransferOperationPreview() {} + + public TransferOperationPreview input(TransferOperationConfigParams input) { + this.input = input; + return this; + } + + /** + * Get input + * + * @return input + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TransferOperationConfigParams getInput() { + return input; + } + + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInput(TransferOperationConfigParams input) { + this.input = input; + } + + public TransferOperationPreview output(TransferOperationPreviewOutput output) { + this.output = output; + return this; + } + + /** + * Get output + * + * @return output + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransferOperationPreviewOutput getOutput() { + return output; + } + + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOutput(TransferOperationPreviewOutput output) { + this.output = output; + } + + public TransferOperationPreview failure(TransferOperationFailure failure) { + this.failure = failure; + return this; + } + + /** + * Get failure + * + * @return failure + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransferOperationFailure getFailure() { + return failure; + } + + @JsonProperty(JSON_PROPERTY_FAILURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFailure(TransferOperationFailure failure) { + this.failure = failure; + } + + /** Return true if this TransferOperationPreview object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransferOperationPreview transferOperationPreview = (TransferOperationPreview) o; + return Objects.equals(this.input, transferOperationPreview.input) + && Objects.equals(this.output, transferOperationPreview.output) + && Objects.equals(this.failure, transferOperationPreview.failure); + } + + @Override + public int hashCode() { + return Objects.hash(input, output, failure); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransferOperationPreview {\n"); + sb.append(" input: ").append(toIndentedString(input)).append("\n"); + sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append(" failure: ").append(toIndentedString(failure)).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 `input` to the URL query string + if (getInput() != null) { + joiner.add(getInput().toUrlQueryString(prefix + "input" + suffix)); + } + + // add `output` to the URL query string + if (getOutput() != null) { + joiner.add(getOutput().toUrlQueryString(prefix + "output" + suffix)); + } + + // add `failure` to the URL query string + if (getFailure() != null) { + joiner.add(getFailure().toUrlQueryString(prefix + "failure" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransferOperationPreviewOutput.java b/src/main/java/com/fireblocks/sdk/model/TransferOperationPreviewOutput.java new file mode 100644 index 0000000..3dc3e37 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TransferOperationPreviewOutput.java @@ -0,0 +1,256 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** TransferOperationPreviewOutput */ +@JsonPropertyOrder({ + TransferOperationPreviewOutput.JSON_PROPERTY_AMOUNT, + TransferOperationPreviewOutput.JSON_PROPERTY_FEE, + TransferOperationPreviewOutput.JSON_PROPERTY_IS_SIGN_REQUIRED, + TransferOperationPreviewOutput.JSON_PROPERTY_TIME_SECONDS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TransferOperationPreviewOutput { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private AssetAmount amount; + + public static final String JSON_PROPERTY_FEE = "fee"; + private AssetAmount fee; + + public static final String JSON_PROPERTY_IS_SIGN_REQUIRED = "isSignRequired"; + private Boolean isSignRequired; + + public static final String JSON_PROPERTY_TIME_SECONDS = "timeSeconds"; + private BigDecimal timeSeconds; + + public TransferOperationPreviewOutput() {} + + public TransferOperationPreviewOutput amount(AssetAmount amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * + * @return amount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetAmount getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(AssetAmount amount) { + this.amount = amount; + } + + public TransferOperationPreviewOutput fee(AssetAmount fee) { + this.fee = fee; + return this; + } + + /** + * Get fee + * + * @return fee + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetAmount getFee() { + return fee; + } + + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFee(AssetAmount fee) { + this.fee = fee; + } + + public TransferOperationPreviewOutput isSignRequired(Boolean isSignRequired) { + this.isSignRequired = isSignRequired; + return this; + } + + /** + * Get isSignRequired + * + * @return isSignRequired + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_SIGN_REQUIRED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsSignRequired() { + return isSignRequired; + } + + @JsonProperty(JSON_PROPERTY_IS_SIGN_REQUIRED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsSignRequired(Boolean isSignRequired) { + this.isSignRequired = isSignRequired; + } + + public TransferOperationPreviewOutput timeSeconds(BigDecimal timeSeconds) { + this.timeSeconds = timeSeconds; + return this; + } + + /** + * Get timeSeconds + * + * @return timeSeconds + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TIME_SECONDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getTimeSeconds() { + return timeSeconds; + } + + @JsonProperty(JSON_PROPERTY_TIME_SECONDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTimeSeconds(BigDecimal timeSeconds) { + this.timeSeconds = timeSeconds; + } + + /** Return true if this TransferOperationPreviewOutput object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransferOperationPreviewOutput transferOperationPreviewOutput = + (TransferOperationPreviewOutput) o; + return Objects.equals(this.amount, transferOperationPreviewOutput.amount) + && Objects.equals(this.fee, transferOperationPreviewOutput.fee) + && Objects.equals( + this.isSignRequired, transferOperationPreviewOutput.isSignRequired) + && Objects.equals(this.timeSeconds, transferOperationPreviewOutput.timeSeconds); + } + + @Override + public int hashCode() { + return Objects.hash(amount, fee, isSignRequired, timeSeconds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransferOperationPreviewOutput {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); + sb.append(" isSignRequired: ").append(toIndentedString(isSignRequired)).append("\n"); + sb.append(" timeSeconds: ").append(toIndentedString(timeSeconds)).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 `amount` to the URL query string + if (getAmount() != null) { + joiner.add(getAmount().toUrlQueryString(prefix + "amount" + suffix)); + } + + // add `fee` to the URL query string + if (getFee() != null) { + joiner.add(getFee().toUrlQueryString(prefix + "fee" + suffix)); + } + + // add `isSignRequired` to the URL query string + if (getIsSignRequired() != null) { + joiner.add( + String.format( + "%sisSignRequired%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getIsSignRequired()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `timeSeconds` to the URL query string + if (getTimeSeconds() != null) { + joiner.add( + String.format( + "%stimeSeconds%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTimeSeconds()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransferOperationType.java b/src/main/java/com/fireblocks/sdk/model/TransferOperationType.java new file mode 100644 index 0000000..6fd35b2 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TransferOperationType.java @@ -0,0 +1,62 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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; + +/** Gets or Sets TransferOperationType */ +public enum TransferOperationType { + TRANSFER("TRANSFER"); + + private String value; + + TransferOperationType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TransferOperationType fromValue(String value) { + for (TransferOperationType b : TransferOperationType.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/TransferValidationFailure.java b/src/main/java/com/fireblocks/sdk/model/TransferValidationFailure.java new file mode 100644 index 0000000..a16db69 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TransferValidationFailure.java @@ -0,0 +1,257 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.StringJoiner; + +/** TransferValidationFailure */ +@JsonPropertyOrder({ + TransferValidationFailure.JSON_PROPERTY_REASON, + TransferValidationFailure.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TransferValidationFailure { + /** Gets or Sets reason */ + public enum ReasonEnum { + ACCOUNT_NOT_FOUND("ACCOUNT_NOT_FOUND"), + + ACCOUNT_TYPE_NOT_SUPPORTED("ACCOUNT_TYPE_NOT_SUPPORTED"), + + INSUFFICIENT_BALANCE("INSUFFICIENT_BALANCE"), + + ASSET_NOT_FOUND("ASSET_NOT_FOUND"), + + ASSETS_CONTINUITY_MISMATCH("ASSETS_CONTINUITY_MISMATCH"), + + EXCHANGE_BASKETS_MISMATCH("EXCHANGE_BASKETS_MISMATCH"), + + ACCOUNTS_CONTINUITY_MISMATCH("ACCOUNTS_CONTINUITY_MISMATCH"), + + ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED("ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED"), + + EQUAL_ACCOUNTS_NOT_ALLOWED("EQUAL_ACCOUNTS_NOT_ALLOWED"), + + EQUAL_ASSETS_NOT_ALLOWED("EQUAL_ASSETS_NOT_ALLOWED"), + + INVALID_AMOUNT("INVALID_AMOUNT"), + + UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED("UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED"), + + MANAGED_OPERATION_PARAMS_INVALID_SCHEMA("MANAGED_OPERATION_PARAMS_INVALID_SCHEMA"); + + private String value; + + ReasonEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ReasonEnum fromValue(String value) { + for (ReasonEnum b : ReasonEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_REASON = "reason"; + private ReasonEnum reason; + + public static final String JSON_PROPERTY_DATA = "data"; + private Map data = new HashMap<>(); + + public TransferValidationFailure() {} + + public TransferValidationFailure reason(ReasonEnum reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * + * @return reason + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReasonEnum getReason() { + return reason; + } + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReason(ReasonEnum reason) { + this.reason = reason; + } + + public TransferValidationFailure data(Map data) { + this.data = data; + return this; + } + + public TransferValidationFailure putDataItem(String key, Object dataItem) { + if (this.data == null) { + this.data = new HashMap<>(); + } + this.data.put(key, dataItem); + return this; + } + + /** + * Get data + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Map data) { + this.data = data; + } + + /** Return true if this TransferValidationFailure object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransferValidationFailure transferValidationFailure = (TransferValidationFailure) o; + return Objects.equals(this.reason, transferValidationFailure.reason) + && Objects.equals(this.data, transferValidationFailure.data); + } + + @Override + public int hashCode() { + return Objects.hash(reason, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransferValidationFailure {\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).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 `reason` to the URL query string + if (getReason() != null) { + joiner.add( + String.format( + "%sreason%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `data` to the URL query string + if (getData() != null) { + for (String _key : getData().keySet()) { + joiner.add( + String.format( + "%sdata%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, _key, containerSuffix), + getData().get(_key), + URLEncoder.encode( + String.valueOf(getData().get(_key)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/UserRole.java b/src/main/java/com/fireblocks/sdk/model/UserRole.java new file mode 100644 index 0000000..48d3be5 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/UserRole.java @@ -0,0 +1,82 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 role of the user */ +public enum UserRole { + OWNER("OWNER"), + + ADMIN("ADMIN"), + + SIGNER("SIGNER"), + + COLLATERALS_SIGNER("COLLATERALS_SIGNER"), + + EDITOR("EDITOR"), + + APPROVER("APPROVER"), + + VIEWER("VIEWER"), + + NON_SIGNING_ADMIN("NON_SIGNING_ADMIN"), + + AUDITOR("AUDITOR"), + + NCW_ADMIN("NCW_ADMIN"), + + NCW_SIGNER("NCW_SIGNER"); + + private String value; + + UserRole(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static UserRole fromValue(String value) { + for (UserRole b : UserRole.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/UserStatus.java b/src/main/java/com/fireblocks/sdk/model/UserStatus.java new file mode 100644 index 0000000..89f7891 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/UserStatus.java @@ -0,0 +1,68 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 status of the user */ +public enum UserStatus { + PENDING_ACTIVATION("PENDING_ACTIVATION"), + + PENDING_DEVICE_PAIRING("PENDING_DEVICE_PAIRING"), + + PENDING_DEVICE_SETUP("PENDING_DEVICE_SETUP"), + + READY("READY"); + + private String value; + + UserStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static UserStatus fromValue(String value) { + for (UserStatus b : UserStatus.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/UserType.java b/src/main/java/com/fireblocks/sdk/model/UserType.java new file mode 100644 index 0000000..b2f3f16 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/UserType.java @@ -0,0 +1,64 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 type of the user */ +public enum UserType { + API("API"), + + CONSOLE("CONSOLE"); + + private String value; + + UserType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static UserType fromValue(String value) { + for (UserType b : UserType.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/WorkflowConfigStatus.java b/src/main/java/com/fireblocks/sdk/model/WorkflowConfigStatus.java new file mode 100644 index 0000000..920666d --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/WorkflowConfigStatus.java @@ -0,0 +1,68 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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; + +/** Gets or Sets WorkflowConfigStatus */ +public enum WorkflowConfigStatus { + PENDING("PENDING"), + + VALIDATION_IN_PROGRESS("VALIDATION_IN_PROGRESS"), + + VALIDATION_FAILED("VALIDATION_FAILED"), + + READY_FOR_EXECUTION("READY_FOR_EXECUTION"); + + private String value; + + WorkflowConfigStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WorkflowConfigStatus fromValue(String value) { + for (WorkflowConfigStatus b : WorkflowConfigStatus.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/WorkflowConfigurationId.java b/src/main/java/com/fireblocks/sdk/model/WorkflowConfigurationId.java new file mode 100644 index 0000000..1204fda --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/WorkflowConfigurationId.java @@ -0,0 +1,139 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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 java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** WorkflowConfigurationId */ +@JsonPropertyOrder({WorkflowConfigurationId.JSON_PROPERTY_CONFIG_ID}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class WorkflowConfigurationId { + public static final String JSON_PROPERTY_CONFIG_ID = "configId"; + private String configId; + + public WorkflowConfigurationId() {} + + public WorkflowConfigurationId configId(String configId) { + this.configId = configId; + return this; + } + + /** + * Get configId + * + * @return configId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConfigId() { + return configId; + } + + @JsonProperty(JSON_PROPERTY_CONFIG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setConfigId(String configId) { + this.configId = configId; + } + + /** Return true if this WorkflowConfigurationId object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkflowConfigurationId workflowConfigurationId = (WorkflowConfigurationId) o; + return Objects.equals(this.configId, workflowConfigurationId.configId); + } + + @Override + public int hashCode() { + return Objects.hash(configId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WorkflowConfigurationId {\n"); + sb.append(" configId: ").append(toIndentedString(configId)).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 `configId` to the URL query string + if (getConfigId() != null) { + joiner.add( + String.format( + "%sconfigId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getConfigId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/WorkflowExecutionOperation.java b/src/main/java/com/fireblocks/sdk/model/WorkflowExecutionOperation.java new file mode 100644 index 0000000..eeebd3d --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/WorkflowExecutionOperation.java @@ -0,0 +1,507 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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") +@JsonDeserialize(using = WorkflowExecutionOperation.WorkflowExecutionOperationDeserializer.class) +@JsonSerialize(using = WorkflowExecutionOperation.WorkflowExecutionOperationSerializer.class) +public class WorkflowExecutionOperation extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(WorkflowExecutionOperation.class.getName()); + + public static class WorkflowExecutionOperationSerializer + extends StdSerializer { + public WorkflowExecutionOperationSerializer(Class t) { + super(t); + } + + public WorkflowExecutionOperationSerializer() { + this(null); + } + + @Override + public void serialize( + WorkflowExecutionOperation value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class WorkflowExecutionOperationDeserializer + extends StdDeserializer { + public WorkflowExecutionOperationDeserializer() { + this(WorkflowExecutionOperation.class); + } + + public WorkflowExecutionOperationDeserializer(Class vc) { + super(vc); + } + + @Override + public WorkflowExecutionOperation 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 ExecutionConversionOperation + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ExecutionConversionOperation.class.equals(Integer.class) + || ExecutionConversionOperation.class.equals(Long.class) + || ExecutionConversionOperation.class.equals(Float.class) + || ExecutionConversionOperation.class.equals(Double.class) + || ExecutionConversionOperation.class.equals(Boolean.class) + || ExecutionConversionOperation.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ExecutionConversionOperation.class.equals(Integer.class) + || ExecutionConversionOperation.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ExecutionConversionOperation.class.equals(Float.class) + || ExecutionConversionOperation.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (ExecutionConversionOperation.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ExecutionConversionOperation.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(ExecutionConversionOperation.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 'ExecutionConversionOperation'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'ExecutionConversionOperation'", + e); + } + + // deserialize ExecutionDisbursementOperation + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ExecutionDisbursementOperation.class.equals(Integer.class) + || ExecutionDisbursementOperation.class.equals(Long.class) + || ExecutionDisbursementOperation.class.equals(Float.class) + || ExecutionDisbursementOperation.class.equals(Double.class) + || ExecutionDisbursementOperation.class.equals(Boolean.class) + || ExecutionDisbursementOperation.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ExecutionDisbursementOperation.class.equals(Integer.class) + || ExecutionDisbursementOperation.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ExecutionDisbursementOperation.class.equals(Float.class) + || ExecutionDisbursementOperation.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (ExecutionDisbursementOperation.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ExecutionDisbursementOperation.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(ExecutionDisbursementOperation.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 'ExecutionDisbursementOperation'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'ExecutionDisbursementOperation'", + e); + } + + // deserialize ExecutionScreeningOperation + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ExecutionScreeningOperation.class.equals(Integer.class) + || ExecutionScreeningOperation.class.equals(Long.class) + || ExecutionScreeningOperation.class.equals(Float.class) + || ExecutionScreeningOperation.class.equals(Double.class) + || ExecutionScreeningOperation.class.equals(Boolean.class) + || ExecutionScreeningOperation.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ExecutionScreeningOperation.class.equals(Integer.class) + || ExecutionScreeningOperation.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ExecutionScreeningOperation.class.equals(Float.class) + || ExecutionScreeningOperation.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (ExecutionScreeningOperation.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ExecutionScreeningOperation.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(ExecutionScreeningOperation.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 'ExecutionScreeningOperation'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'ExecutionScreeningOperation'", + e); + } + + // deserialize ExecutionTransferOperation + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ExecutionTransferOperation.class.equals(Integer.class) + || ExecutionTransferOperation.class.equals(Long.class) + || ExecutionTransferOperation.class.equals(Float.class) + || ExecutionTransferOperation.class.equals(Double.class) + || ExecutionTransferOperation.class.equals(Boolean.class) + || ExecutionTransferOperation.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ExecutionTransferOperation.class.equals(Integer.class) + || ExecutionTransferOperation.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ExecutionTransferOperation.class.equals(Float.class) + || ExecutionTransferOperation.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (ExecutionTransferOperation.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ExecutionTransferOperation.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(ExecutionTransferOperation.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 'ExecutionTransferOperation'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'ExecutionTransferOperation'", + e); + } + + if (match == 1) { + WorkflowExecutionOperation ret = new WorkflowExecutionOperation(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for WorkflowExecutionOperation: %d classes" + + " match result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public WorkflowExecutionOperation getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "WorkflowExecutionOperation cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public WorkflowExecutionOperation() { + super("oneOf", Boolean.FALSE); + } + + public WorkflowExecutionOperation(ExecutionConversionOperation o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public WorkflowExecutionOperation(ExecutionDisbursementOperation o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public WorkflowExecutionOperation(ExecutionScreeningOperation o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public WorkflowExecutionOperation(ExecutionTransferOperation o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("ExecutionConversionOperation", ExecutionConversionOperation.class); + schemas.put("ExecutionDisbursementOperation", ExecutionDisbursementOperation.class); + schemas.put("ExecutionScreeningOperation", ExecutionScreeningOperation.class); + schemas.put("ExecutionTransferOperation", ExecutionTransferOperation.class); + JSON.registerDescendants( + WorkflowExecutionOperation.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return WorkflowExecutionOperation.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: ExecutionConversionOperation, + * ExecutionDisbursementOperation, ExecutionScreeningOperation, ExecutionTransferOperation + * + *

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( + ExecutionConversionOperation.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + ExecutionDisbursementOperation.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + ExecutionScreeningOperation.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + ExecutionTransferOperation.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be ExecutionConversionOperation," + + " ExecutionDisbursementOperation, ExecutionScreeningOperation," + + " ExecutionTransferOperation"); + } + + /** + * Get the actual instance, which can be the following: ExecutionConversionOperation, + * ExecutionDisbursementOperation, ExecutionScreeningOperation, ExecutionTransferOperation + * + * @return The actual instance (ExecutionConversionOperation, ExecutionDisbursementOperation, + * ExecutionScreeningOperation, ExecutionTransferOperation) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `ExecutionConversionOperation`. If the actual instance is not + * `ExecutionConversionOperation`, the ClassCastException will be thrown. + * + * @return The actual instance of `ExecutionConversionOperation` + * @throws ClassCastException if the instance is not `ExecutionConversionOperation` + */ + public ExecutionConversionOperation getExecutionConversionOperation() + throws ClassCastException { + return (ExecutionConversionOperation) super.getActualInstance(); + } + + /** + * Get the actual instance of `ExecutionDisbursementOperation`. If the actual instance is not + * `ExecutionDisbursementOperation`, the ClassCastException will be thrown. + * + * @return The actual instance of `ExecutionDisbursementOperation` + * @throws ClassCastException if the instance is not `ExecutionDisbursementOperation` + */ + public ExecutionDisbursementOperation getExecutionDisbursementOperation() + throws ClassCastException { + return (ExecutionDisbursementOperation) super.getActualInstance(); + } + + /** + * Get the actual instance of `ExecutionScreeningOperation`. If the actual instance is not + * `ExecutionScreeningOperation`, the ClassCastException will be thrown. + * + * @return The actual instance of `ExecutionScreeningOperation` + * @throws ClassCastException if the instance is not `ExecutionScreeningOperation` + */ + public ExecutionScreeningOperation getExecutionScreeningOperation() throws ClassCastException { + return (ExecutionScreeningOperation) super.getActualInstance(); + } + + /** + * Get the actual instance of `ExecutionTransferOperation`. If the actual instance is not + * `ExecutionTransferOperation`, the ClassCastException will be thrown. + * + * @return The actual instance of `ExecutionTransferOperation` + * @throws ClassCastException if the instance is not `ExecutionTransferOperation` + */ + public ExecutionTransferOperation getExecutionTransferOperation() throws ClassCastException { + return (ExecutionTransferOperation) 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 ExecutionScreeningOperation) { + if (getActualInstance() != null) { + joiner.add( + ((ExecutionScreeningOperation) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ExecutionConversionOperation) { + if (getActualInstance() != null) { + joiner.add( + ((ExecutionConversionOperation) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ExecutionTransferOperation) { + if (getActualInstance() != null) { + joiner.add( + ((ExecutionTransferOperation) getActualInstance()) + .toUrlQueryString(prefix + "one_of_2" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ExecutionDisbursementOperation) { + if (getActualInstance() != null) { + joiner.add( + ((ExecutionDisbursementOperation) getActualInstance()) + .toUrlQueryString(prefix + "one_of_3" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/test/java/com/fireblocks/sdk/FireblocksTest.java b/src/test/java/com/fireblocks/sdk/FireblocksTest.java index ccc1ba7..cef0d48 100644 --- a/src/test/java/com/fireblocks/sdk/FireblocksTest.java +++ b/src/test/java/com/fireblocks/sdk/FireblocksTest.java @@ -308,14 +308,6 @@ public void testAuthorizationValueWithBodyAndQueryParams() { runAndVerifyAuthorizationValue(requestBuilder, expectedAuthorizationValue); } - @Test - public void testGetAdminQuorumApi() { - setupFireblocks(true, null, null); - AdminQuorumApi adminQuorum = fireblocks.adminQuorum(); - Assert.assertNotNull(adminQuorum); - Assert.assertSame(adminQuorum, fireblocks.adminQuorum()); - } - @Test public void testGetApiUserApi() { setupFireblocks(true, null, null); @@ -566,14 +558,6 @@ public void testGetWhitelistIpAddressesApi() { Assert.assertSame(whitelistIpAddresses, fireblocks.whitelistIpAddresses()); } - @Test - public void testGetWorkspaceApi() { - setupFireblocks(true, null, null); - WorkspaceApi workspace = fireblocks.workspace(); - Assert.assertNotNull(workspace); - Assert.assertSame(workspace, fireblocks.workspace()); - } - @Test public void testGetWorkspaceStatusBetaApi() { setupFireblocks(true, null, null); diff --git a/src/test/java/com/fireblocks/sdk/api/AdminQuorumApiTest.java b/src/test/java/com/fireblocks/sdk/api/AdminQuorumApiTest.java deleted file mode 100644 index 20b7ba5..0000000 --- a/src/test/java/com/fireblocks/sdk/api/AdminQuorumApiTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@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.ApiException; -import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.model.SetAdminQuorumThresholdRequest; -import java.util.concurrent.CompletableFuture; -import org.junit.Ignore; -import org.junit.Test; - -/** API tests for AdminQuorumApi */ -@Ignore -public class AdminQuorumApiTest { - - private final AdminQuorumApi api = new AdminQuorumApi(); - - /** - * Update admin quorum threshold - * - *

Update admin quorum threshold - * - * @throws ApiException if the Api call fails - */ - @Test - public void setAdminQuorumThresholdTest() throws ApiException { - SetAdminQuorumThresholdRequest setAdminQuorumThresholdRequest = null; - String idempotencyKey = null; - - CompletableFuture> response = - api.setAdminQuorumThreshold(setAdminQuorumThresholdRequest, idempotencyKey); - } -} diff --git a/src/test/java/com/fireblocks/sdk/api/ApiUserApiTest.java b/src/test/java/com/fireblocks/sdk/api/ApiUserApiTest.java index 1e709d9..add75e6 100644 --- a/src/test/java/com/fireblocks/sdk/api/ApiUserApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ApiUserApiTest.java @@ -16,6 +16,7 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.CreateAPIUser; +import com.fireblocks.sdk.model.GetAPIUsersResponse; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; import org.junit.Test; @@ -51,7 +52,6 @@ public void createApiUserTest() throws ApiException { */ @Test public void getApiUsersTest() throws ApiException { - - CompletableFuture> response = api.getApiUsers(); + CompletableFuture> response = api.getApiUsers(); } } diff --git a/src/test/java/com/fireblocks/sdk/api/AuditLogsApiTest.java b/src/test/java/com/fireblocks/sdk/api/AuditLogsApiTest.java index 3a6ab63..43289c1 100644 --- a/src/test/java/com/fireblocks/sdk/api/AuditLogsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/AuditLogsApiTest.java @@ -15,6 +15,7 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.GetAuditLogsResponse; import com.fireblocks.sdk.model.GetAuditLogsResponseDTO; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; @@ -37,8 +38,8 @@ public class AuditLogsApiTest { public void getAuditLogsTest() throws ApiException { String timePeriod = null; String cursor = null; - - CompletableFuture> response = api.getAuditLogs(timePeriod, cursor); + CompletableFuture> response = + api.getAuditLogs(timePeriod, cursor); } /** diff --git a/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java b/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java index 06e9aa0..befa2cf 100644 --- a/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java @@ -15,7 +15,9 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.AssetResponse; import com.fireblocks.sdk.model.AssetTypeResponse; +import com.fireblocks.sdk.model.RegisterNewAssetRequest; import java.util.List; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; @@ -38,4 +40,20 @@ public class BlockchainsAssetsApiTest { public void getSupportedAssetsTest() throws ApiException { CompletableFuture>> response = api.getSupportedAssets(); } + + /** + * Register an asset + * + *

Register a new asset to a workspace and return the newly created asset's details. + * Currently supported for EVM based chains only. + * + * @throws ApiException if the Api call fails + */ + @Test + public void registerNewAssetTest() throws ApiException { + RegisterNewAssetRequest registerNewAssetRequest = null; + String idempotencyKey = null; + CompletableFuture> response = + api.registerNewAsset(registerNewAssetRequest, idempotencyKey); + } } diff --git a/src/test/java/com/fireblocks/sdk/api/ConsoleUserApiTest.java b/src/test/java/com/fireblocks/sdk/api/ConsoleUserApiTest.java index 1f4ec7e..fd4f6de 100644 --- a/src/test/java/com/fireblocks/sdk/api/ConsoleUserApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ConsoleUserApiTest.java @@ -16,6 +16,7 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.CreateConsoleUser; +import com.fireblocks.sdk.model.GetConsoleUsersResponse; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; import org.junit.Test; @@ -51,7 +52,6 @@ public void createConsoleUserTest() throws ApiException { */ @Test public void getConsoleUsersTest() throws ApiException { - - CompletableFuture> response = api.getConsoleUsers(); + CompletableFuture> response = api.getConsoleUsers(); } } diff --git a/src/test/java/com/fireblocks/sdk/api/ExchangeAccountsApiTest.java b/src/test/java/com/fireblocks/sdk/api/ExchangeAccountsApiTest.java index d510f1b..998273c 100644 --- a/src/test/java/com/fireblocks/sdk/api/ExchangeAccountsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ExchangeAccountsApiTest.java @@ -16,10 +16,12 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.ConvertAssetsRequest; +import com.fireblocks.sdk.model.ConvertAssetsResponse; import com.fireblocks.sdk.model.CreateInternalTransferRequest; import com.fireblocks.sdk.model.ExchangeAccount; import com.fireblocks.sdk.model.ExchangeAccountsPaged; import com.fireblocks.sdk.model.ExchangeAsset; +import com.fireblocks.sdk.model.InternalTransferResponse; import java.math.BigDecimal; import java.util.List; import java.util.concurrent.CompletableFuture; @@ -45,8 +47,7 @@ public void convertAssetsTest() throws ApiException { String exchangeAccountId = null; ConvertAssetsRequest convertAssetsRequest = null; String idempotencyKey = null; - - CompletableFuture> response = + CompletableFuture> response = api.convertAssets(exchangeAccountId, convertAssetsRequest, idempotencyKey); } @@ -107,8 +108,7 @@ public void internalTransferTest() throws ApiException { String exchangeAccountId = null; CreateInternalTransferRequest createInternalTransferRequest = null; String idempotencyKey = null; - - CompletableFuture> response = + CompletableFuture> response = api.internalTransfer( exchangeAccountId, createInternalTransferRequest, idempotencyKey); } diff --git a/src/test/java/com/fireblocks/sdk/api/FiatAccountsApiTest.java b/src/test/java/com/fireblocks/sdk/api/FiatAccountsApiTest.java index c82c7e9..85cb2ae 100644 --- a/src/test/java/com/fireblocks/sdk/api/FiatAccountsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/FiatAccountsApiTest.java @@ -15,8 +15,10 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.DepositFundsFromLinkedDDAResponse; import com.fireblocks.sdk.model.FiatAccount; import com.fireblocks.sdk.model.Funds; +import com.fireblocks.sdk.model.RedeemFundsToLinkedDDAResponse; import java.util.List; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; @@ -40,8 +42,7 @@ public void depositFundsFromLinkedDDATest() throws ApiException { String accountId = null; Funds funds = null; String idempotencyKey = null; - - CompletableFuture> response = + CompletableFuture> response = api.depositFundsFromLinkedDDA(accountId, funds, idempotencyKey); } @@ -82,8 +83,7 @@ public void redeemFundsToLinkedDDATest() throws ApiException { String accountId = null; Funds funds = null; String idempotencyKey = null; - - CompletableFuture> response = + CompletableFuture> response = api.redeemFundsToLinkedDDA(accountId, funds, idempotencyKey); } } diff --git a/src/test/java/com/fireblocks/sdk/api/GasStationsApiTest.java b/src/test/java/com/fireblocks/sdk/api/GasStationsApiTest.java index b198a87..3934001 100644 --- a/src/test/java/com/fireblocks/sdk/api/GasStationsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/GasStationsApiTest.java @@ -15,6 +15,7 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.EditGasStationConfigurationResponse; import com.fireblocks.sdk.model.GasStationConfiguration; import com.fireblocks.sdk.model.GasStationPropertiesResponse; import java.util.concurrent.CompletableFuture; @@ -65,8 +66,7 @@ public void getGasStationInfoTest() throws ApiException { public void updateGasStationConfigurationTest() throws ApiException { GasStationConfiguration gasStationConfiguration = null; String idempotencyKey = null; - - CompletableFuture> response = + CompletableFuture> response = api.updateGasStationConfiguration(gasStationConfiguration, idempotencyKey); } @@ -82,8 +82,7 @@ public void updateGasStationConfigurationByAssetIdTest() throws ApiException { GasStationConfiguration gasStationConfiguration = null; String assetId = null; String idempotencyKey = null; - - CompletableFuture> response = + CompletableFuture> response = api.updateGasStationConfigurationByAssetId( gasStationConfiguration, assetId, idempotencyKey); } diff --git a/src/test/java/com/fireblocks/sdk/api/OtaBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/OtaBetaApiTest.java index 70b8149..19a2345 100644 --- a/src/test/java/com/fireblocks/sdk/api/OtaBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/OtaBetaApiTest.java @@ -17,6 +17,7 @@ import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.GetOtaStatus200Response; import com.fireblocks.sdk.model.SetOtaStatusRequest; +import com.fireblocks.sdk.model.SetOtaStatusResponse; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; import org.junit.Test; @@ -50,8 +51,7 @@ public void getOtaStatusTest() throws ApiException { public void setOtaStatusTest() throws ApiException { SetOtaStatusRequest setOtaStatusRequest = null; String idempotencyKey = null; - - CompletableFuture> response = + CompletableFuture> response = api.setOtaStatus(setOtaStatusRequest, idempotencyKey); } } diff --git a/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java b/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java index c9d57a1..f3be376 100644 --- a/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java @@ -21,10 +21,12 @@ import com.fireblocks.sdk.model.CreateMultipleAccountsRequest; import com.fireblocks.sdk.model.CreateVaultAccountRequest; import com.fireblocks.sdk.model.CreateVaultAssetResponse; +import com.fireblocks.sdk.model.GetMaxSpendableAmountResponse; import com.fireblocks.sdk.model.JobCreated; import com.fireblocks.sdk.model.PaginatedAddressResponse; import com.fireblocks.sdk.model.PaginatedAssetWalletResponse; import com.fireblocks.sdk.model.PublicKeyInformation; +import com.fireblocks.sdk.model.RenameVaultAccountResponse; import com.fireblocks.sdk.model.SetAutoFuelRequest; import com.fireblocks.sdk.model.SetCustomerRefIdForAddressRequest; import com.fireblocks.sdk.model.SetCustomerRefIdRequest; @@ -183,8 +185,7 @@ public void getMaxSpendableAmountTest() throws ApiException { String vaultAccountId = null; String assetId = null; Boolean manualSignging = null; - - CompletableFuture> response = + CompletableFuture> response = api.getMaxSpendableAmount(vaultAccountId, assetId, manualSignging); } @@ -441,8 +442,7 @@ public void updateVaultAccountTest() throws ApiException { UpdateVaultAccountRequest updateVaultAccountRequest = null; String vaultAccountId = null; String idempotencyKey = null; - - CompletableFuture> response = + CompletableFuture> response = api.updateVaultAccount(updateVaultAccountRequest, vaultAccountId, idempotencyKey); } diff --git a/src/test/java/com/fireblocks/sdk/api/WebhooksApiTest.java b/src/test/java/com/fireblocks/sdk/api/WebhooksApiTest.java index 2f99392..244a116 100644 --- a/src/test/java/com/fireblocks/sdk/api/WebhooksApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/WebhooksApiTest.java @@ -16,6 +16,7 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.ResendTransactionWebhooksRequest; +import com.fireblocks.sdk.model.ResendWebhooksByTransactionIdResponse; import com.fireblocks.sdk.model.ResendWebhooksResponse; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; @@ -39,8 +40,7 @@ public void resendTransactionWebhooksTest() throws ApiException { ResendTransactionWebhooksRequest resendTransactionWebhooksRequest = null; String txId = null; String idempotencyKey = null; - - CompletableFuture> response = + CompletableFuture> response = api.resendTransactionWebhooks( resendTransactionWebhooksRequest, txId, idempotencyKey); } diff --git a/src/test/java/com/fireblocks/sdk/api/WhitelistIpAddressesApiTest.java b/src/test/java/com/fireblocks/sdk/api/WhitelistIpAddressesApiTest.java index 6cbead6..94a8637 100644 --- a/src/test/java/com/fireblocks/sdk/api/WhitelistIpAddressesApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/WhitelistIpAddressesApiTest.java @@ -15,6 +15,7 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.GetWhitelistIpAddressesResponse; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; import org.junit.Test; @@ -35,7 +36,7 @@ public class WhitelistIpAddressesApiTest { @Test public void getWhitelistIpAddressesTest() throws ApiException { String userId = null; - - CompletableFuture> response = api.getWhitelistIpAddresses(userId); + CompletableFuture> response = + api.getWhitelistIpAddresses(userId); } } diff --git a/src/test/java/com/fireblocks/sdk/api/WorkspaceApiTest.java b/src/test/java/com/fireblocks/sdk/api/WorkspaceApiTest.java deleted file mode 100644 index d890d2e..0000000 --- a/src/test/java/com/fireblocks/sdk/api/WorkspaceApiTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@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.ApiException; -import com.fireblocks.sdk.ApiResponse; -import java.util.concurrent.CompletableFuture; -import org.junit.Ignore; -import org.junit.Test; - -/** API tests for WorkspaceApi */ -@Ignore -public class WorkspaceApiTest { - - private final WorkspaceApi api = new WorkspaceApi(); - - /** - * Freeze Workspace - * - *

Freezes a Workspace so that ALL operations by ANY user are blocked. You should only - * perform this action when the workspace faces imminent risk, such as when you have a security - * breach. To unfreeze a workspace, the workspace Owner must submit a request to Fireblocks - * Support. **NOTE:** - This operation can only be performed by the workspace Owner - Your - * workspace continues to receive incoming transfers during this time. - * - * @throws ApiException if the Api call fails - */ - @Test - public void freezeWorkspaceTest() throws ApiException { - String idempotencyKey = null; - - CompletableFuture> response = api.freezeWorkspace(idempotencyKey); - } -} diff --git a/src/test/java/com/fireblocks/sdk/model/APIUserTest.java b/src/test/java/com/fireblocks/sdk/model/APIUserTest.java new file mode 100644 index 0000000..db735a8 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/APIUserTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for APIUser */ +public class APIUserTest { + private final APIUser model = new APIUser(); + + /** Model tests for APIUser */ + @Test + public void testAPIUser() { + // TODO: test APIUser + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'role' */ + @Test + public void roleTest() { + // TODO: test role + } + + /** Test the property 'enabled' */ + @Test + public void enabledTest() { + // TODO: test enabled + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'userType' */ + @Test + public void userTypeTest() { + // TODO: test userType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AccountTest.java b/src/test/java/com/fireblocks/sdk/model/AccountTest.java new file mode 100644 index 0000000..912e87c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AccountTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for Account */ +public class AccountTest { + private final Account model = new Account(); + + /** Model tests for Account */ + @Test + public void testAccount() { + // TODO: test Account + } + + /** Test the property 'accountId' */ + @Test + public void accountIdTest() { + // TODO: test accountId + } + + /** Test the property 'accountType' */ + @Test + public void accountTypeTest() { + // TODO: test accountType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AccountTypeTest.java b/src/test/java/com/fireblocks/sdk/model/AccountTypeTest.java new file mode 100644 index 0000000..8c723ba --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AccountTypeTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for AccountType */ +public class AccountTypeTest { + /** Model tests for AccountType */ + @Test + public void testAccountType() { + // TODO: test AccountType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetAmountTest.java b/src/test/java/com/fireblocks/sdk/model/AssetAmountTest.java new file mode 100644 index 0000000..a19896e --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetAmountTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for AssetAmount */ +public class AssetAmountTest { + private final AssetAmount model = new AssetAmount(); + + /** Model tests for AssetAmount */ + @Test + public void testAssetAmount() { + // TODO: test AssetAmount + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** Test the property 'assetId' */ + @Test + public void assetIdTest() { + // TODO: test assetId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetBadRequestErrorResponseTest.java b/src/test/java/com/fireblocks/sdk/model/AssetBadRequestErrorResponseTest.java new file mode 100644 index 0000000..e6bcab9 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetBadRequestErrorResponseTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for AssetBadRequestErrorResponse */ +public class AssetBadRequestErrorResponseTest { + private final AssetBadRequestErrorResponse model = new AssetBadRequestErrorResponse(); + + /** Model tests for AssetBadRequestErrorResponse */ + @Test + public void testAssetBadRequestErrorResponse() { + // TODO: test AssetBadRequestErrorResponse + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } + + /** Test the property 'code' */ + @Test + public void codeTest() { + // TODO: test code + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetConflictErrorResponseTest.java b/src/test/java/com/fireblocks/sdk/model/AssetConflictErrorResponseTest.java new file mode 100644 index 0000000..f2e3f34 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetConflictErrorResponseTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for AssetConflictErrorResponse */ +public class AssetConflictErrorResponseTest { + private final AssetConflictErrorResponse model = new AssetConflictErrorResponse(); + + /** Model tests for AssetConflictErrorResponse */ + @Test + public void testAssetConflictErrorResponse() { + // TODO: test AssetConflictErrorResponse + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } + + /** Test the property 'code' */ + @Test + public void codeTest() { + // TODO: test code + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetInternalServerErrorResponseTest.java b/src/test/java/com/fireblocks/sdk/model/AssetInternalServerErrorResponseTest.java new file mode 100644 index 0000000..03450fc --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetInternalServerErrorResponseTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for AssetInternalServerErrorResponse */ +public class AssetInternalServerErrorResponseTest { + private final AssetInternalServerErrorResponse model = new AssetInternalServerErrorResponse(); + + /** Model tests for AssetInternalServerErrorResponse */ + @Test + public void testAssetInternalServerErrorResponse() { + // TODO: test AssetInternalServerErrorResponse + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } + + /** Test the property 'code' */ + @Test + public void codeTest() { + // TODO: test code + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetNotFoundErrorResponseTest.java b/src/test/java/com/fireblocks/sdk/model/AssetNotFoundErrorResponseTest.java new file mode 100644 index 0000000..7478da6 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetNotFoundErrorResponseTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for AssetNotFoundErrorResponse */ +public class AssetNotFoundErrorResponseTest { + private final AssetNotFoundErrorResponse model = new AssetNotFoundErrorResponse(); + + /** Model tests for AssetNotFoundErrorResponse */ + @Test + public void testAssetNotFoundErrorResponse() { + // TODO: test AssetNotFoundErrorResponse + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } + + /** Test the property 'code' */ + @Test + public void codeTest() { + // TODO: test code + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetResponseMetadataTest.java b/src/test/java/com/fireblocks/sdk/model/AssetResponseMetadataTest.java new file mode 100644 index 0000000..82c46d2 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetResponseMetadataTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for AssetResponseMetadata */ +public class AssetResponseMetadataTest { + private final AssetResponseMetadata model = new AssetResponseMetadata(); + + /** Model tests for AssetResponseMetadata */ + @Test + public void testAssetResponseMetadata() { + // TODO: test AssetResponseMetadata + } + + /** Test the property 'scope' */ + @Test + public void scopeTest() { + // TODO: test scope + } + + /** Test the property 'deprecated' */ + @Test + public void deprecatedTest() { + // TODO: test deprecated + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetResponseOnchainTest.java b/src/test/java/com/fireblocks/sdk/model/AssetResponseOnchainTest.java new file mode 100644 index 0000000..aff74bd --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetResponseOnchainTest.java @@ -0,0 +1,57 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for AssetResponseOnchain */ +public class AssetResponseOnchainTest { + private final AssetResponseOnchain model = new AssetResponseOnchain(); + + /** Model tests for AssetResponseOnchain */ + @Test + public void testAssetResponseOnchain() { + // TODO: test AssetResponseOnchain + } + + /** Test the property 'symbol' */ + @Test + public void symbolTest() { + // TODO: test symbol + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'address' */ + @Test + public void addressTest() { + // TODO: test address + } + + /** Test the property 'decimals' */ + @Test + public void decimalsTest() { + // TODO: test decimals + } + + /** Test the property 'standard' */ + @Test + public void standardTest() { + // TODO: test standard + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetResponseTest.java b/src/test/java/com/fireblocks/sdk/model/AssetResponseTest.java new file mode 100644 index 0000000..83ec5d9 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetResponseTest.java @@ -0,0 +1,51 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for AssetResponse */ +public class AssetResponseTest { + private final AssetResponse model = new AssetResponse(); + + /** Model tests for AssetResponse */ + @Test + public void testAssetResponse() { + // TODO: test AssetResponse + } + + /** Test the property 'legacyId' */ + @Test + public void legacyIdTest() { + // TODO: test legacyId + } + + /** Test the property 'assetClass' */ + @Test + public void assetClassTest() { + // TODO: test assetClass + } + + /** Test the property 'onchain' */ + @Test + public void onchainTest() { + // TODO: test onchain + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AuditLogDataTest.java b/src/test/java/com/fireblocks/sdk/model/AuditLogDataTest.java new file mode 100644 index 0000000..7429f4f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AuditLogDataTest.java @@ -0,0 +1,75 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for AuditLogData */ +public class AuditLogDataTest { + private final AuditLogData model = new AuditLogData(); + + /** Model tests for AuditLogData */ + @Test + public void testAuditLogData() { + // TODO: test AuditLogData + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'timestamp' */ + @Test + public void timestampTest() { + // TODO: test timestamp + } + + /** Test the property 'createdAt' */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** Test the property 'user' */ + @Test + public void userTest() { + // TODO: test user + } + + /** Test the property 'subject' */ + @Test + public void subjectTest() { + // TODO: test subject + } + + /** Test the property 'event' */ + @Test + public void eventTest() { + // TODO: test event + } + + /** Test the property 'tenantId' */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** Test the property 'userId' */ + @Test + public void userIdTest() { + // TODO: test userId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConfigConversionOperationSnapshotTest.java b/src/test/java/com/fireblocks/sdk/model/ConfigConversionOperationSnapshotTest.java new file mode 100644 index 0000000..60dab33 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConfigConversionOperationSnapshotTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ConfigConversionOperationSnapshot */ +public class ConfigConversionOperationSnapshotTest { + private final ConfigConversionOperationSnapshot model = new ConfigConversionOperationSnapshot(); + + /** Model tests for ConfigConversionOperationSnapshot */ + @Test + public void testConfigConversionOperationSnapshot() { + // TODO: test ConfigConversionOperationSnapshot + } + + /** Test the property 'operationId' */ + @Test + public void operationIdTest() { + // TODO: test operationId + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'params' */ + @Test + public void paramsTest() { + // TODO: test params + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConfigDisbursementOperationSnapshotTest.java b/src/test/java/com/fireblocks/sdk/model/ConfigDisbursementOperationSnapshotTest.java new file mode 100644 index 0000000..7749ee4 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConfigDisbursementOperationSnapshotTest.java @@ -0,0 +1,46 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ConfigDisbursementOperationSnapshot */ +public class ConfigDisbursementOperationSnapshotTest { + private final ConfigDisbursementOperationSnapshot model = + new ConfigDisbursementOperationSnapshot(); + + /** Model tests for ConfigDisbursementOperationSnapshot */ + @Test + public void testConfigDisbursementOperationSnapshot() { + // TODO: test ConfigDisbursementOperationSnapshot + } + + /** Test the property 'operationId' */ + @Test + public void operationIdTest() { + // TODO: test operationId + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'params' */ + @Test + public void paramsTest() { + // TODO: test params + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConfigOperationSnapshotTest.java b/src/test/java/com/fireblocks/sdk/model/ConfigOperationSnapshotTest.java new file mode 100644 index 0000000..3a7f67a --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConfigOperationSnapshotTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ConfigOperationSnapshot */ +public class ConfigOperationSnapshotTest { + private final ConfigOperationSnapshot model = new ConfigOperationSnapshot(); + + /** Model tests for ConfigOperationSnapshot */ + @Test + public void testConfigOperationSnapshot() { + // TODO: test ConfigOperationSnapshot + } + + /** Test the property 'operationId' */ + @Test + public void operationIdTest() { + // TODO: test operationId + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'params' */ + @Test + public void paramsTest() { + // TODO: test params + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConfigOperationStatusTest.java b/src/test/java/com/fireblocks/sdk/model/ConfigOperationStatusTest.java new file mode 100644 index 0000000..1c9e9f9 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConfigOperationStatusTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ConfigOperationStatus */ +public class ConfigOperationStatusTest { + /** Model tests for ConfigOperationStatus */ + @Test + public void testConfigOperationStatus() { + // TODO: test ConfigOperationStatus + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConfigOperationTest.java b/src/test/java/com/fireblocks/sdk/model/ConfigOperationTest.java new file mode 100644 index 0000000..e5ed13e --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConfigOperationTest.java @@ -0,0 +1,57 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ConfigOperation */ +public class ConfigOperationTest { + private final ConfigOperation model = new ConfigOperation(); + + /** Model tests for ConfigOperation */ + @Test + public void testConfigOperation() { + // TODO: test ConfigOperation + } + + /** Test the property 'operationId' */ + @Test + public void operationIdTest() { + // TODO: test operationId + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'params' */ + @Test + public void paramsTest() { + // TODO: test params + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'validationFailure' */ + @Test + public void validationFailureTest() { + // TODO: test validationFailure + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConfigTransferOperationSnapshotTest.java b/src/test/java/com/fireblocks/sdk/model/ConfigTransferOperationSnapshotTest.java new file mode 100644 index 0000000..4f1e1d8 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConfigTransferOperationSnapshotTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ConfigTransferOperationSnapshot */ +public class ConfigTransferOperationSnapshotTest { + private final ConfigTransferOperationSnapshot model = new ConfigTransferOperationSnapshot(); + + /** Model tests for ConfigTransferOperationSnapshot */ + @Test + public void testConfigTransferOperationSnapshot() { + // TODO: test ConfigTransferOperationSnapshot + } + + /** Test the property 'operationId' */ + @Test + public void operationIdTest() { + // TODO: test operationId + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'params' */ + @Test + public void paramsTest() { + // TODO: test params + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConsoleUserTest.java b/src/test/java/com/fireblocks/sdk/model/ConsoleUserTest.java new file mode 100644 index 0000000..d07181f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConsoleUserTest.java @@ -0,0 +1,75 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ConsoleUser */ +public class ConsoleUserTest { + private final ConsoleUser model = new ConsoleUser(); + + /** Model tests for ConsoleUser */ + @Test + public void testConsoleUser() { + // TODO: test ConsoleUser + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'firstName' */ + @Test + public void firstNameTest() { + // TODO: test firstName + } + + /** Test the property 'lastName' */ + @Test + public void lastNameTest() { + // TODO: test lastName + } + + /** Test the property 'email' */ + @Test + public void emailTest() { + // TODO: test email + } + + /** Test the property 'role' */ + @Test + public void roleTest() { + // TODO: test role + } + + /** Test the property 'enabled' */ + @Test + public void enabledTest() { + // TODO: test enabled + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'userType' */ + @Test + public void userTypeTest() { + // TODO: test userType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConversionConfigOperationTest.java b/src/test/java/com/fireblocks/sdk/model/ConversionConfigOperationTest.java new file mode 100644 index 0000000..3bd644b --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConversionConfigOperationTest.java @@ -0,0 +1,57 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ConversionConfigOperation */ +public class ConversionConfigOperationTest { + private final ConversionConfigOperation model = new ConversionConfigOperation(); + + /** Model tests for ConversionConfigOperation */ + @Test + public void testConversionConfigOperation() { + // TODO: test ConversionConfigOperation + } + + /** Test the property 'operationId' */ + @Test + public void operationIdTest() { + // TODO: test operationId + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'params' */ + @Test + public void paramsTest() { + // TODO: test params + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'validationFailure' */ + @Test + public void validationFailureTest() { + // TODO: test validationFailure + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConversionOperationConfigParamsTest.java b/src/test/java/com/fireblocks/sdk/model/ConversionOperationConfigParamsTest.java new file mode 100644 index 0000000..84e2ec7 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConversionOperationConfigParamsTest.java @@ -0,0 +1,57 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ConversionOperationConfigParams */ +public class ConversionOperationConfigParamsTest { + private final ConversionOperationConfigParams model = new ConversionOperationConfigParams(); + + /** Model tests for ConversionOperationConfigParams */ + @Test + public void testConversionOperationConfigParams() { + // TODO: test ConversionOperationConfigParams + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** Test the property 'accountId' */ + @Test + public void accountIdTest() { + // TODO: test accountId + } + + /** Test the property 'srcAssetId' */ + @Test + public void srcAssetIdTest() { + // TODO: test srcAssetId + } + + /** Test the property 'destAssetId' */ + @Test + public void destAssetIdTest() { + // TODO: test destAssetId + } + + /** Test the property 'slippageBasisPoints' */ + @Test + public void slippageBasisPointsTest() { + // TODO: test slippageBasisPoints + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConversionOperationExecutionOutputTest.java b/src/test/java/com/fireblocks/sdk/model/ConversionOperationExecutionOutputTest.java new file mode 100644 index 0000000..256859f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConversionOperationExecutionOutputTest.java @@ -0,0 +1,46 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ConversionOperationExecutionOutput */ +public class ConversionOperationExecutionOutputTest { + private final ConversionOperationExecutionOutput model = + new ConversionOperationExecutionOutput(); + + /** Model tests for ConversionOperationExecutionOutput */ + @Test + public void testConversionOperationExecutionOutput() { + // TODO: test ConversionOperationExecutionOutput + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** Test the property 'fee' */ + @Test + public void feeTest() { + // TODO: test fee + } + + /** Test the property 'conversionRate' */ + @Test + public void conversionRateTest() { + // TODO: test conversionRate + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConversionOperationExecutionParamsExecutionParamsTest.java b/src/test/java/com/fireblocks/sdk/model/ConversionOperationExecutionParamsExecutionParamsTest.java new file mode 100644 index 0000000..f4d3f3f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConversionOperationExecutionParamsExecutionParamsTest.java @@ -0,0 +1,58 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ConversionOperationExecutionParamsExecutionParams */ +public class ConversionOperationExecutionParamsExecutionParamsTest { + private final ConversionOperationExecutionParamsExecutionParams model = + new ConversionOperationExecutionParamsExecutionParams(); + + /** Model tests for ConversionOperationExecutionParamsExecutionParams */ + @Test + public void testConversionOperationExecutionParamsExecutionParams() { + // TODO: test ConversionOperationExecutionParamsExecutionParams + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** Test the property 'accountId' */ + @Test + public void accountIdTest() { + // TODO: test accountId + } + + /** Test the property 'srcAssetId' */ + @Test + public void srcAssetIdTest() { + // TODO: test srcAssetId + } + + /** Test the property 'destAssetId' */ + @Test + public void destAssetIdTest() { + // TODO: test destAssetId + } + + /** Test the property 'slippageBasisPoints' */ + @Test + public void slippageBasisPointsTest() { + // TODO: test slippageBasisPoints + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConversionOperationExecutionParamsTest.java b/src/test/java/com/fireblocks/sdk/model/ConversionOperationExecutionParamsTest.java new file mode 100644 index 0000000..45ebab0 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConversionOperationExecutionParamsTest.java @@ -0,0 +1,40 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ConversionOperationExecutionParams */ +public class ConversionOperationExecutionParamsTest { + private final ConversionOperationExecutionParams model = + new ConversionOperationExecutionParams(); + + /** Model tests for ConversionOperationExecutionParams */ + @Test + public void testConversionOperationExecutionParams() { + // TODO: test ConversionOperationExecutionParams + } + + /** Test the property 'configOperationId' */ + @Test + public void configOperationIdTest() { + // TODO: test configOperationId + } + + /** Test the property 'executionParams' */ + @Test + public void executionParamsTest() { + // TODO: test executionParams + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConversionOperationExecutionTest.java b/src/test/java/com/fireblocks/sdk/model/ConversionOperationExecutionTest.java new file mode 100644 index 0000000..3496cf0 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConversionOperationExecutionTest.java @@ -0,0 +1,57 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ConversionOperationExecution */ +public class ConversionOperationExecutionTest { + private final ConversionOperationExecution model = new ConversionOperationExecution(); + + /** Model tests for ConversionOperationExecution */ + @Test + public void testConversionOperationExecution() { + // TODO: test ConversionOperationExecution + } + + /** Test the property 'input' */ + @Test + public void inputTest() { + // TODO: test input + } + + /** Test the property 'output' */ + @Test + public void outputTest() { + // TODO: test output + } + + /** Test the property 'startedAt' */ + @Test + public void startedAtTest() { + // TODO: test startedAt + } + + /** Test the property 'finishedAt' */ + @Test + public void finishedAtTest() { + // TODO: test finishedAt + } + + /** Test the property 'failure' */ + @Test + public void failureTest() { + // TODO: test failure + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConversionOperationFailureTest.java b/src/test/java/com/fireblocks/sdk/model/ConversionOperationFailureTest.java new file mode 100644 index 0000000..69ab3f1 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConversionOperationFailureTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ConversionOperationFailure */ +public class ConversionOperationFailureTest { + private final ConversionOperationFailure model = new ConversionOperationFailure(); + + /** Model tests for ConversionOperationFailure */ + @Test + public void testConversionOperationFailure() { + // TODO: test ConversionOperationFailure + } + + /** Test the property 'reason' */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConversionOperationPreviewOutputTest.java b/src/test/java/com/fireblocks/sdk/model/ConversionOperationPreviewOutputTest.java new file mode 100644 index 0000000..06f4c77 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConversionOperationPreviewOutputTest.java @@ -0,0 +1,51 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ConversionOperationPreviewOutput */ +public class ConversionOperationPreviewOutputTest { + private final ConversionOperationPreviewOutput model = new ConversionOperationPreviewOutput(); + + /** Model tests for ConversionOperationPreviewOutput */ + @Test + public void testConversionOperationPreviewOutput() { + // TODO: test ConversionOperationPreviewOutput + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** Test the property 'fee' */ + @Test + public void feeTest() { + // TODO: test fee + } + + /** Test the property 'conversionRate' */ + @Test + public void conversionRateTest() { + // TODO: test conversionRate + } + + /** Test the property 'timeSeconds' */ + @Test + public void timeSecondsTest() { + // TODO: test timeSeconds + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConversionOperationPreviewTest.java b/src/test/java/com/fireblocks/sdk/model/ConversionOperationPreviewTest.java new file mode 100644 index 0000000..0daa18a --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConversionOperationPreviewTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ConversionOperationPreview */ +public class ConversionOperationPreviewTest { + private final ConversionOperationPreview model = new ConversionOperationPreview(); + + /** Model tests for ConversionOperationPreview */ + @Test + public void testConversionOperationPreview() { + // TODO: test ConversionOperationPreview + } + + /** Test the property 'input' */ + @Test + public void inputTest() { + // TODO: test input + } + + /** Test the property 'output' */ + @Test + public void outputTest() { + // TODO: test output + } + + /** Test the property 'failure' */ + @Test + public void failureTest() { + // TODO: test failure + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConversionOperationTypeTest.java b/src/test/java/com/fireblocks/sdk/model/ConversionOperationTypeTest.java new file mode 100644 index 0000000..612d097 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConversionOperationTypeTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ConversionOperationType */ +public class ConversionOperationTypeTest { + /** Model tests for ConversionOperationType */ + @Test + public void testConversionOperationType() { + // TODO: test ConversionOperationType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConversionValidationFailureTest.java b/src/test/java/com/fireblocks/sdk/model/ConversionValidationFailureTest.java new file mode 100644 index 0000000..3d8f82c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConversionValidationFailureTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ConversionValidationFailure */ +public class ConversionValidationFailureTest { + private final ConversionValidationFailure model = new ConversionValidationFailure(); + + /** Model tests for ConversionValidationFailure */ + @Test + public void testConversionValidationFailure() { + // TODO: test ConversionValidationFailure + } + + /** Test the property 'reason' */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConvertAssetsResponseTest.java b/src/test/java/com/fireblocks/sdk/model/ConvertAssetsResponseTest.java new file mode 100644 index 0000000..b92b8b0 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConvertAssetsResponseTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ConvertAssetsResponse */ +public class ConvertAssetsResponseTest { + private final ConvertAssetsResponse model = new ConvertAssetsResponse(); + + /** Model tests for ConvertAssetsResponse */ + @Test + public void testConvertAssetsResponse() { + // TODO: test ConvertAssetsResponse + } + + /** Test the property 'success' */ + @Test + public void successTest() { + // TODO: test success + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CreateConfigOperationRequestTest.java b/src/test/java/com/fireblocks/sdk/model/CreateConfigOperationRequestTest.java new file mode 100644 index 0000000..31f95c2 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CreateConfigOperationRequestTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for CreateConfigOperationRequest */ +public class CreateConfigOperationRequestTest { + private final CreateConfigOperationRequest model = new CreateConfigOperationRequest(); + + /** Model tests for CreateConfigOperationRequest */ + @Test + public void testCreateConfigOperationRequest() { + // TODO: test CreateConfigOperationRequest + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'params' */ + @Test + public void paramsTest() { + // TODO: test params + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CreateConversionConfigOperationRequestTest.java b/src/test/java/com/fireblocks/sdk/model/CreateConversionConfigOperationRequestTest.java new file mode 100644 index 0000000..005c31c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CreateConversionConfigOperationRequestTest.java @@ -0,0 +1,40 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for CreateConversionConfigOperationRequest */ +public class CreateConversionConfigOperationRequestTest { + private final CreateConversionConfigOperationRequest model = + new CreateConversionConfigOperationRequest(); + + /** Model tests for CreateConversionConfigOperationRequest */ + @Test + public void testCreateConversionConfigOperationRequest() { + // TODO: test CreateConversionConfigOperationRequest + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'params' */ + @Test + public void paramsTest() { + // TODO: test params + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CreateDisbursementConfigOperationRequestTest.java b/src/test/java/com/fireblocks/sdk/model/CreateDisbursementConfigOperationRequestTest.java new file mode 100644 index 0000000..dd40ee4 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CreateDisbursementConfigOperationRequestTest.java @@ -0,0 +1,40 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for CreateDisbursementConfigOperationRequest */ +public class CreateDisbursementConfigOperationRequestTest { + private final CreateDisbursementConfigOperationRequest model = + new CreateDisbursementConfigOperationRequest(); + + /** Model tests for CreateDisbursementConfigOperationRequest */ + @Test + public void testCreateDisbursementConfigOperationRequest() { + // TODO: test CreateDisbursementConfigOperationRequest + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'params' */ + @Test + public void paramsTest() { + // TODO: test params + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CreateTransferConfigOperationRequestTest.java b/src/test/java/com/fireblocks/sdk/model/CreateTransferConfigOperationRequestTest.java new file mode 100644 index 0000000..7576c93 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CreateTransferConfigOperationRequestTest.java @@ -0,0 +1,40 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for CreateTransferConfigOperationRequest */ +public class CreateTransferConfigOperationRequestTest { + private final CreateTransferConfigOperationRequest model = + new CreateTransferConfigOperationRequest(); + + /** Model tests for CreateTransferConfigOperationRequest */ + @Test + public void testCreateTransferConfigOperationRequest() { + // TODO: test CreateTransferConfigOperationRequest + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'params' */ + @Test + public void paramsTest() { + // TODO: test params + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CreateWorkflowExecutionRequestParamsInnerTest.java b/src/test/java/com/fireblocks/sdk/model/CreateWorkflowExecutionRequestParamsInnerTest.java new file mode 100644 index 0000000..6aaa026 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CreateWorkflowExecutionRequestParamsInnerTest.java @@ -0,0 +1,40 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for CreateWorkflowExecutionRequestParamsInner */ +public class CreateWorkflowExecutionRequestParamsInnerTest { + private final CreateWorkflowExecutionRequestParamsInner model = + new CreateWorkflowExecutionRequestParamsInner(); + + /** Model tests for CreateWorkflowExecutionRequestParamsInner */ + @Test + public void testCreateWorkflowExecutionRequestParamsInner() { + // TODO: test CreateWorkflowExecutionRequestParamsInner + } + + /** Test the property 'configOperationId' */ + @Test + public void configOperationIdTest() { + // TODO: test configOperationId + } + + /** Test the property 'executionParams' */ + @Test + public void executionParamsTest() { + // TODO: test executionParams + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CustomCryptoRoutingDestTest.java b/src/test/java/com/fireblocks/sdk/model/CustomCryptoRoutingDestTest.java deleted file mode 100644 index 2b482a7..0000000 --- a/src/test/java/com/fireblocks/sdk/model/CustomCryptoRoutingDestTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@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.Test; - -/** Model tests for CustomCryptoRoutingDest */ -public class CustomCryptoRoutingDestTest { - private final CustomCryptoRoutingDest model = new CustomCryptoRoutingDest(); - - /** Model tests for CustomCryptoRoutingDest */ - @Test - public void testCustomCryptoRoutingDest() { - // TODO: test CustomCryptoRoutingDest - } - - /** Test the property 'scheme' */ - @Test - public void schemeTest() { - // TODO: test scheme - } - - /** Test the property 'dstType' */ - @Test - public void dstTypeTest() { - // TODO: test dstType - } - - /** Test the property 'dstId' */ - @Test - public void dstIdTest() { - // TODO: test dstId - } -} diff --git a/src/test/java/com/fireblocks/sdk/model/CustomFiatRoutingDestTest.java b/src/test/java/com/fireblocks/sdk/model/CustomRoutingDestTest.java similarity index 72% rename from src/test/java/com/fireblocks/sdk/model/CustomFiatRoutingDestTest.java rename to src/test/java/com/fireblocks/sdk/model/CustomRoutingDestTest.java index 11d101c..eb595f9 100644 --- a/src/test/java/com/fireblocks/sdk/model/CustomFiatRoutingDestTest.java +++ b/src/test/java/com/fireblocks/sdk/model/CustomRoutingDestTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for CustomFiatRoutingDest */ -public class CustomFiatRoutingDestTest { - private final CustomFiatRoutingDest model = new CustomFiatRoutingDest(); +/** Model tests for CustomRoutingDest */ +public class CustomRoutingDestTest { + private final CustomRoutingDest model = new CustomRoutingDest(); - /** Model tests for CustomFiatRoutingDest */ + /** Model tests for CustomRoutingDest */ @Test - public void testCustomFiatRoutingDest() { - // TODO: test CustomFiatRoutingDest + public void testCustomRoutingDest() { + // TODO: test CustomRoutingDest } /** Test the property 'scheme' */ diff --git a/src/test/java/com/fireblocks/sdk/model/DepositFundsFromLinkedDDAResponseTest.java b/src/test/java/com/fireblocks/sdk/model/DepositFundsFromLinkedDDAResponseTest.java new file mode 100644 index 0000000..1840bdb --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DepositFundsFromLinkedDDAResponseTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for DepositFundsFromLinkedDDAResponse */ +public class DepositFundsFromLinkedDDAResponseTest { + private final DepositFundsFromLinkedDDAResponse model = new DepositFundsFromLinkedDDAResponse(); + + /** Model tests for DepositFundsFromLinkedDDAResponse */ + @Test + public void testDepositFundsFromLinkedDDAResponse() { + // TODO: test DepositFundsFromLinkedDDAResponse + } + + /** Test the property 'success' */ + @Test + public void successTest() { + // TODO: test success + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DestinationTest.java b/src/test/java/com/fireblocks/sdk/model/DestinationTest.java new file mode 100644 index 0000000..89fadf1 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DestinationTest.java @@ -0,0 +1,51 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for Destination */ +public class DestinationTest { + private final Destination model = new Destination(); + + /** Model tests for Destination */ + @Test + public void testDestination() { + // TODO: test Destination + } + + /** Test the property 'accountId' */ + @Test + public void accountIdTest() { + // TODO: test accountId + } + + /** Test the property 'accountType' */ + @Test + public void accountTypeTest() { + // TODO: test accountType + } + + /** Test the property 'oneTimeAddress' */ + @Test + public void oneTimeAddressTest() { + // TODO: test oneTimeAddress + } + + /** Test the property 'tag' */ + @Test + public void tagTest() { + // TODO: test tag + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DisbursementAmountInstructionTest.java b/src/test/java/com/fireblocks/sdk/model/DisbursementAmountInstructionTest.java new file mode 100644 index 0000000..89363b9 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DisbursementAmountInstructionTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for DisbursementAmountInstruction */ +public class DisbursementAmountInstructionTest { + private final DisbursementAmountInstruction model = new DisbursementAmountInstruction(); + + /** Model tests for DisbursementAmountInstruction */ + @Test + public void testDisbursementAmountInstruction() { + // TODO: test DisbursementAmountInstruction + } + + /** Test the property 'payeeAccount' */ + @Test + public void payeeAccountTest() { + // TODO: test payeeAccount + } + + /** Test the property 'assetId' */ + @Test + public void assetIdTest() { + // TODO: test assetId + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DisbursementConfigOperationTest.java b/src/test/java/com/fireblocks/sdk/model/DisbursementConfigOperationTest.java new file mode 100644 index 0000000..f7bd3f9 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DisbursementConfigOperationTest.java @@ -0,0 +1,57 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for DisbursementConfigOperation */ +public class DisbursementConfigOperationTest { + private final DisbursementConfigOperation model = new DisbursementConfigOperation(); + + /** Model tests for DisbursementConfigOperation */ + @Test + public void testDisbursementConfigOperation() { + // TODO: test DisbursementConfigOperation + } + + /** Test the property 'operationId' */ + @Test + public void operationIdTest() { + // TODO: test operationId + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'params' */ + @Test + public void paramsTest() { + // TODO: test params + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'validationFailure' */ + @Test + public void validationFailureTest() { + // TODO: test validationFailure + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DisbursementInstructionOutputTest.java b/src/test/java/com/fireblocks/sdk/model/DisbursementInstructionOutputTest.java new file mode 100644 index 0000000..6458b0b --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DisbursementInstructionOutputTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for DisbursementInstructionOutput */ +public class DisbursementInstructionOutputTest { + private final DisbursementInstructionOutput model = new DisbursementInstructionOutput(); + + /** Model tests for DisbursementInstructionOutput */ + @Test + public void testDisbursementInstructionOutput() { + // TODO: test DisbursementInstructionOutput + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** Test the property 'fee' */ + @Test + public void feeTest() { + // TODO: test fee + } + + /** Test the property 'payeeAccount' */ + @Test + public void payeeAccountTest() { + // TODO: test payeeAccount + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DisbursementInstructionTest.java b/src/test/java/com/fireblocks/sdk/model/DisbursementInstructionTest.java new file mode 100644 index 0000000..a913694 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DisbursementInstructionTest.java @@ -0,0 +1,51 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for DisbursementInstruction */ +public class DisbursementInstructionTest { + private final DisbursementInstruction model = new DisbursementInstruction(); + + /** Model tests for DisbursementInstruction */ + @Test + public void testDisbursementInstruction() { + // TODO: test DisbursementInstruction + } + + /** Test the property 'payeeAccount' */ + @Test + public void payeeAccountTest() { + // TODO: test payeeAccount + } + + /** Test the property 'assetId' */ + @Test + public void assetIdTest() { + // TODO: test assetId + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** Test the property 'percentage' */ + @Test + public void percentageTest() { + // TODO: test percentage + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DisbursementOperationConfigParamsTest.java b/src/test/java/com/fireblocks/sdk/model/DisbursementOperationConfigParamsTest.java new file mode 100644 index 0000000..a183d15 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DisbursementOperationConfigParamsTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for DisbursementOperationConfigParams */ +public class DisbursementOperationConfigParamsTest { + private final DisbursementOperationConfigParams model = new DisbursementOperationConfigParams(); + + /** Model tests for DisbursementOperationConfigParams */ + @Test + public void testDisbursementOperationConfigParams() { + // TODO: test DisbursementOperationConfigParams + } + + /** Test the property 'paymentAccount' */ + @Test + public void paymentAccountTest() { + // TODO: test paymentAccount + } + + /** Test the property 'instructionSet' */ + @Test + public void instructionSetTest() { + // TODO: test instructionSet + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DisbursementOperationExecutionOutputTest.java b/src/test/java/com/fireblocks/sdk/model/DisbursementOperationExecutionOutputTest.java new file mode 100644 index 0000000..bca1c67 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DisbursementOperationExecutionOutputTest.java @@ -0,0 +1,34 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for DisbursementOperationExecutionOutput */ +public class DisbursementOperationExecutionOutputTest { + private final DisbursementOperationExecutionOutput model = + new DisbursementOperationExecutionOutput(); + + /** Model tests for DisbursementOperationExecutionOutput */ + @Test + public void testDisbursementOperationExecutionOutput() { + // TODO: test DisbursementOperationExecutionOutput + } + + /** Test the property 'instructionSet' */ + @Test + public void instructionSetTest() { + // TODO: test instructionSet + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DisbursementOperationExecutionParamsExecutionParamsTest.java b/src/test/java/com/fireblocks/sdk/model/DisbursementOperationExecutionParamsExecutionParamsTest.java new file mode 100644 index 0000000..f17cacd --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DisbursementOperationExecutionParamsExecutionParamsTest.java @@ -0,0 +1,46 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for DisbursementOperationExecutionParamsExecutionParams */ +public class DisbursementOperationExecutionParamsExecutionParamsTest { + private final DisbursementOperationExecutionParamsExecutionParams model = + new DisbursementOperationExecutionParamsExecutionParams(); + + /** Model tests for DisbursementOperationExecutionParamsExecutionParams */ + @Test + public void testDisbursementOperationExecutionParamsExecutionParams() { + // TODO: test DisbursementOperationExecutionParamsExecutionParams + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** Test the property 'paymentAccount' */ + @Test + public void paymentAccountTest() { + // TODO: test paymentAccount + } + + /** Test the property 'instructionSet' */ + @Test + public void instructionSetTest() { + // TODO: test instructionSet + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DisbursementOperationExecutionParamsTest.java b/src/test/java/com/fireblocks/sdk/model/DisbursementOperationExecutionParamsTest.java new file mode 100644 index 0000000..e7b68de --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DisbursementOperationExecutionParamsTest.java @@ -0,0 +1,40 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for DisbursementOperationExecutionParams */ +public class DisbursementOperationExecutionParamsTest { + private final DisbursementOperationExecutionParams model = + new DisbursementOperationExecutionParams(); + + /** Model tests for DisbursementOperationExecutionParams */ + @Test + public void testDisbursementOperationExecutionParams() { + // TODO: test DisbursementOperationExecutionParams + } + + /** Test the property 'configOperationId' */ + @Test + public void configOperationIdTest() { + // TODO: test configOperationId + } + + /** Test the property 'executionParams' */ + @Test + public void executionParamsTest() { + // TODO: test executionParams + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DisbursementOperationExecutionTest.java b/src/test/java/com/fireblocks/sdk/model/DisbursementOperationExecutionTest.java new file mode 100644 index 0000000..a06ab24 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DisbursementOperationExecutionTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for DisbursementOperationExecution */ +public class DisbursementOperationExecutionTest { + private final DisbursementOperationExecution model = new DisbursementOperationExecution(); + + /** Model tests for DisbursementOperationExecution */ + @Test + public void testDisbursementOperationExecution() { + // TODO: test DisbursementOperationExecution + } + + /** Test the property 'input' */ + @Test + public void inputTest() { + // TODO: test input + } + + /** Test the property 'output' */ + @Test + public void outputTest() { + // TODO: test output + } + + /** Test the property 'payoutId' */ + @Test + public void payoutIdTest() { + // TODO: test payoutId + } + + /** Test the property 'startedAt' */ + @Test + public void startedAtTest() { + // TODO: test startedAt + } + + /** Test the property 'finishedAt' */ + @Test + public void finishedAtTest() { + // TODO: test finishedAt + } + + /** Test the property 'failure' */ + @Test + public void failureTest() { + // TODO: test failure + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DisbursementOperationInputTest.java b/src/test/java/com/fireblocks/sdk/model/DisbursementOperationInputTest.java new file mode 100644 index 0000000..e543123 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DisbursementOperationInputTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for DisbursementOperationInput */ +public class DisbursementOperationInputTest { + private final DisbursementOperationInput model = new DisbursementOperationInput(); + + /** Model tests for DisbursementOperationInput */ + @Test + public void testDisbursementOperationInput() { + // TODO: test DisbursementOperationInput + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** Test the property 'paymentAccount' */ + @Test + public void paymentAccountTest() { + // TODO: test paymentAccount + } + + /** Test the property 'instructionSet' */ + @Test + public void instructionSetTest() { + // TODO: test instructionSet + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DisbursementOperationPreviewOutputInstructionSetInnerTest.java b/src/test/java/com/fireblocks/sdk/model/DisbursementOperationPreviewOutputInstructionSetInnerTest.java new file mode 100644 index 0000000..1350545 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DisbursementOperationPreviewOutputInstructionSetInnerTest.java @@ -0,0 +1,52 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for DisbursementOperationPreviewOutputInstructionSetInner */ +public class DisbursementOperationPreviewOutputInstructionSetInnerTest { + private final DisbursementOperationPreviewOutputInstructionSetInner model = + new DisbursementOperationPreviewOutputInstructionSetInner(); + + /** Model tests for DisbursementOperationPreviewOutputInstructionSetInner */ + @Test + public void testDisbursementOperationPreviewOutputInstructionSetInner() { + // TODO: test DisbursementOperationPreviewOutputInstructionSetInner + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** Test the property 'fee' */ + @Test + public void feeTest() { + // TODO: test fee + } + + /** Test the property 'payeeAccount' */ + @Test + public void payeeAccountTest() { + // TODO: test payeeAccount + } + + /** Test the property 'timeSeconds' */ + @Test + public void timeSecondsTest() { + // TODO: test timeSeconds + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DisbursementOperationPreviewOutputTest.java b/src/test/java/com/fireblocks/sdk/model/DisbursementOperationPreviewOutputTest.java new file mode 100644 index 0000000..5caf88c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DisbursementOperationPreviewOutputTest.java @@ -0,0 +1,34 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for DisbursementOperationPreviewOutput */ +public class DisbursementOperationPreviewOutputTest { + private final DisbursementOperationPreviewOutput model = + new DisbursementOperationPreviewOutput(); + + /** Model tests for DisbursementOperationPreviewOutput */ + @Test + public void testDisbursementOperationPreviewOutput() { + // TODO: test DisbursementOperationPreviewOutput + } + + /** Test the property 'instructionSet' */ + @Test + public void instructionSetTest() { + // TODO: test instructionSet + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DisbursementOperationPreviewTest.java b/src/test/java/com/fireblocks/sdk/model/DisbursementOperationPreviewTest.java new file mode 100644 index 0000000..2b64476 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DisbursementOperationPreviewTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for DisbursementOperationPreview */ +public class DisbursementOperationPreviewTest { + private final DisbursementOperationPreview model = new DisbursementOperationPreview(); + + /** Model tests for DisbursementOperationPreview */ + @Test + public void testDisbursementOperationPreview() { + // TODO: test DisbursementOperationPreview + } + + /** Test the property 'input' */ + @Test + public void inputTest() { + // TODO: test input + } + + /** Test the property 'output' */ + @Test + public void outputTest() { + // TODO: test output + } + + /** Test the property 'failure' */ + @Test + public void failureTest() { + // TODO: test failure + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DisbursementOperationTypeTest.java b/src/test/java/com/fireblocks/sdk/model/DisbursementOperationTypeTest.java new file mode 100644 index 0000000..7f1c45c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DisbursementOperationTypeTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for DisbursementOperationType */ +public class DisbursementOperationTypeTest { + /** Model tests for DisbursementOperationType */ + @Test + public void testDisbursementOperationType() { + // TODO: test DisbursementOperationType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DisbursementPercentageInstructionTest.java b/src/test/java/com/fireblocks/sdk/model/DisbursementPercentageInstructionTest.java new file mode 100644 index 0000000..d6da839 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DisbursementPercentageInstructionTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for DisbursementPercentageInstruction */ +public class DisbursementPercentageInstructionTest { + private final DisbursementPercentageInstruction model = new DisbursementPercentageInstruction(); + + /** Model tests for DisbursementPercentageInstruction */ + @Test + public void testDisbursementPercentageInstruction() { + // TODO: test DisbursementPercentageInstruction + } + + /** Test the property 'payeeAccount' */ + @Test + public void payeeAccountTest() { + // TODO: test payeeAccount + } + + /** Test the property 'assetId' */ + @Test + public void assetIdTest() { + // TODO: test assetId + } + + /** Test the property 'percentage' */ + @Test + public void percentageTest() { + // TODO: test percentage + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DisbursementValidationFailureTest.java b/src/test/java/com/fireblocks/sdk/model/DisbursementValidationFailureTest.java new file mode 100644 index 0000000..37e8ec2 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DisbursementValidationFailureTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for DisbursementValidationFailure */ +public class DisbursementValidationFailureTest { + private final DisbursementValidationFailure model = new DisbursementValidationFailure(); + + /** Model tests for DisbursementValidationFailure */ + @Test + public void testDisbursementValidationFailure() { + // TODO: test DisbursementValidationFailure + } + + /** Test the property 'reason' */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/EditGasStationConfigurationResponseTest.java b/src/test/java/com/fireblocks/sdk/model/EditGasStationConfigurationResponseTest.java new file mode 100644 index 0000000..351dbd1 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/EditGasStationConfigurationResponseTest.java @@ -0,0 +1,34 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for EditGasStationConfigurationResponse */ +public class EditGasStationConfigurationResponseTest { + private final EditGasStationConfigurationResponse model = + new EditGasStationConfigurationResponse(); + + /** Model tests for EditGasStationConfigurationResponse */ + @Test + public void testEditGasStationConfigurationResponse() { + // TODO: test EditGasStationConfigurationResponse + } + + /** Test the property 'success' */ + @Test + public void successTest() { + // TODO: test success + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ExecutionConversionOperationTest.java b/src/test/java/com/fireblocks/sdk/model/ExecutionConversionOperationTest.java new file mode 100644 index 0000000..53041d3 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ExecutionConversionOperationTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ExecutionConversionOperation */ +public class ExecutionConversionOperationTest { + private final ExecutionConversionOperation model = new ExecutionConversionOperation(); + + /** Model tests for ExecutionConversionOperation */ + @Test + public void testExecutionConversionOperation() { + // TODO: test ExecutionConversionOperation + } + + /** Test the property 'operationId' */ + @Test + public void operationIdTest() { + // TODO: test operationId + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'validationFailure' */ + @Test + public void validationFailureTest() { + // TODO: test validationFailure + } + + /** Test the property 'operationType' */ + @Test + public void operationTypeTest() { + // TODO: test operationType + } + + /** Test the property 'preview' */ + @Test + public void previewTest() { + // TODO: test preview + } + + /** Test the property 'execution' */ + @Test + public void executionTest() { + // TODO: test execution + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ExecutionDisbursementOperationTest.java b/src/test/java/com/fireblocks/sdk/model/ExecutionDisbursementOperationTest.java new file mode 100644 index 0000000..7c06396 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ExecutionDisbursementOperationTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ExecutionDisbursementOperation */ +public class ExecutionDisbursementOperationTest { + private final ExecutionDisbursementOperation model = new ExecutionDisbursementOperation(); + + /** Model tests for ExecutionDisbursementOperation */ + @Test + public void testExecutionDisbursementOperation() { + // TODO: test ExecutionDisbursementOperation + } + + /** Test the property 'operationId' */ + @Test + public void operationIdTest() { + // TODO: test operationId + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'validationFailure' */ + @Test + public void validationFailureTest() { + // TODO: test validationFailure + } + + /** Test the property 'operationType' */ + @Test + public void operationTypeTest() { + // TODO: test operationType + } + + /** Test the property 'preview' */ + @Test + public void previewTest() { + // TODO: test preview + } + + /** Test the property 'execution' */ + @Test + public void executionTest() { + // TODO: test execution + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ExecutionOperationStatusTest.java b/src/test/java/com/fireblocks/sdk/model/ExecutionOperationStatusTest.java new file mode 100644 index 0000000..c856632 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ExecutionOperationStatusTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ExecutionOperationStatus */ +public class ExecutionOperationStatusTest { + /** Model tests for ExecutionOperationStatus */ + @Test + public void testExecutionOperationStatus() { + // TODO: test ExecutionOperationStatus + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ExecutionScreeningOperationTest.java b/src/test/java/com/fireblocks/sdk/model/ExecutionScreeningOperationTest.java new file mode 100644 index 0000000..5d2e537 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ExecutionScreeningOperationTest.java @@ -0,0 +1,57 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ExecutionScreeningOperation */ +public class ExecutionScreeningOperationTest { + private final ExecutionScreeningOperation model = new ExecutionScreeningOperation(); + + /** Model tests for ExecutionScreeningOperation */ + @Test + public void testExecutionScreeningOperation() { + // TODO: test ExecutionScreeningOperation + } + + /** Test the property 'operationId' */ + @Test + public void operationIdTest() { + // TODO: test operationId + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'operationType' */ + @Test + public void operationTypeTest() { + // TODO: test operationType + } + + /** Test the property 'validationFailure' */ + @Test + public void validationFailureTest() { + // TODO: test validationFailure + } + + /** Test the property 'execution' */ + @Test + public void executionTest() { + // TODO: test execution + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ExecutionTransferOperationTest.java b/src/test/java/com/fireblocks/sdk/model/ExecutionTransferOperationTest.java new file mode 100644 index 0000000..1f9f0a4 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ExecutionTransferOperationTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ExecutionTransferOperation */ +public class ExecutionTransferOperationTest { + private final ExecutionTransferOperation model = new ExecutionTransferOperation(); + + /** Model tests for ExecutionTransferOperation */ + @Test + public void testExecutionTransferOperation() { + // TODO: test ExecutionTransferOperation + } + + /** Test the property 'operationId' */ + @Test + public void operationIdTest() { + // TODO: test operationId + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'validationFailure' */ + @Test + public void validationFailureTest() { + // TODO: test validationFailure + } + + /** Test the property 'operationType' */ + @Test + public void operationTypeTest() { + // TODO: test operationType + } + + /** Test the property 'preview' */ + @Test + public void previewTest() { + // TODO: test preview + } + + /** Test the property 'execution' */ + @Test + public void executionTest() { + // TODO: test execution + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/GetAPIUsersResponseTest.java b/src/test/java/com/fireblocks/sdk/model/GetAPIUsersResponseTest.java new file mode 100644 index 0000000..310876d --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/GetAPIUsersResponseTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for GetAPIUsersResponse */ +public class GetAPIUsersResponseTest { + private final GetAPIUsersResponse model = new GetAPIUsersResponse(); + + /** Model tests for GetAPIUsersResponse */ + @Test + public void testGetAPIUsersResponse() { + // TODO: test GetAPIUsersResponse + } + + /** Test the property 'users' */ + @Test + public void usersTest() { + // TODO: test users + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/GetAuditLogsResponseTest.java b/src/test/java/com/fireblocks/sdk/model/GetAuditLogsResponseTest.java new file mode 100644 index 0000000..295a033 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/GetAuditLogsResponseTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for GetAuditLogsResponse */ +public class GetAuditLogsResponseTest { + private final GetAuditLogsResponse model = new GetAuditLogsResponse(); + + /** Model tests for GetAuditLogsResponse */ + @Test + public void testGetAuditLogsResponse() { + // TODO: test GetAuditLogsResponse + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } + + /** Test the property 'cursor' */ + @Test + public void cursorTest() { + // TODO: test cursor + } + + /** Test the property 'total' */ + @Test + public void totalTest() { + // TODO: test total + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/GetConsoleUsersResponseTest.java b/src/test/java/com/fireblocks/sdk/model/GetConsoleUsersResponseTest.java new file mode 100644 index 0000000..cd4915a --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/GetConsoleUsersResponseTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for GetConsoleUsersResponse */ +public class GetConsoleUsersResponseTest { + private final GetConsoleUsersResponse model = new GetConsoleUsersResponse(); + + /** Model tests for GetConsoleUsersResponse */ + @Test + public void testGetConsoleUsersResponse() { + // TODO: test GetConsoleUsersResponse + } + + /** Test the property 'users' */ + @Test + public void usersTest() { + // TODO: test users + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/GetMaxSpendableAmountResponseTest.java b/src/test/java/com/fireblocks/sdk/model/GetMaxSpendableAmountResponseTest.java new file mode 100644 index 0000000..a0d03b7 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/GetMaxSpendableAmountResponseTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for GetMaxSpendableAmountResponse */ +public class GetMaxSpendableAmountResponseTest { + private final GetMaxSpendableAmountResponse model = new GetMaxSpendableAmountResponse(); + + /** Model tests for GetMaxSpendableAmountResponse */ + @Test + public void testGetMaxSpendableAmountResponse() { + // TODO: test GetMaxSpendableAmountResponse + } + + /** Test the property 'maxSpendableAmount' */ + @Test + public void maxSpendableAmountTest() { + // TODO: test maxSpendableAmount + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/GetWhitelistIpAddressesResponseTest.java b/src/test/java/com/fireblocks/sdk/model/GetWhitelistIpAddressesResponseTest.java new file mode 100644 index 0000000..405a66f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/GetWhitelistIpAddressesResponseTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for GetWhitelistIpAddressesResponse */ +public class GetWhitelistIpAddressesResponseTest { + private final GetWhitelistIpAddressesResponse model = new GetWhitelistIpAddressesResponse(); + + /** Model tests for GetWhitelistIpAddressesResponse */ + @Test + public void testGetWhitelistIpAddressesResponse() { + // TODO: test GetWhitelistIpAddressesResponse + } + + /** Test the property 'userId' */ + @Test + public void userIdTest() { + // TODO: test userId + } + + /** Test the property 'whitelistedIps' */ + @Test + public void whitelistedIpsTest() { + // TODO: test whitelistedIps + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/InternalTransferResponseTest.java b/src/test/java/com/fireblocks/sdk/model/InternalTransferResponseTest.java new file mode 100644 index 0000000..5b2c4e4 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/InternalTransferResponseTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for InternalTransferResponse */ +public class InternalTransferResponseTest { + private final InternalTransferResponse model = new InternalTransferResponse(); + + /** Model tests for InternalTransferResponse */ + @Test + public void testInternalTransferResponse() { + // TODO: test InternalTransferResponse + } + + /** Test the property 'success' */ + @Test + public void successTest() { + // TODO: test success + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicyCryptoTest.java b/src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicyCryptoTest.java deleted file mode 100644 index 058a9cf..0000000 --- a/src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicyCryptoTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@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.Test; - -/** Model tests for NetworkConnectionRoutingPolicyCrypto */ -public class NetworkConnectionRoutingPolicyCryptoTest { - private final NetworkConnectionRoutingPolicyCrypto model = - new NetworkConnectionRoutingPolicyCrypto(); - - /** Model tests for NetworkConnectionRoutingPolicyCrypto */ - @Test - public void testNetworkConnectionRoutingPolicyCrypto() { - // TODO: test NetworkConnectionRoutingPolicyCrypto - } - - /** Test the property 'scheme' */ - @Test - public void schemeTest() { - // TODO: test scheme - } - - /** Test the property 'dstType' */ - @Test - public void dstTypeTest() { - // TODO: test dstType - } - - /** Test the property 'dstId' */ - @Test - public void dstIdTest() { - // TODO: test dstId - } -} diff --git a/src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySenTest.java b/src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySenTest.java deleted file mode 100644 index 300e677..0000000 --- a/src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySenTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@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.Test; - -/** Model tests for NetworkConnectionRoutingPolicySen */ -public class NetworkConnectionRoutingPolicySenTest { - private final NetworkConnectionRoutingPolicySen model = new NetworkConnectionRoutingPolicySen(); - - /** Model tests for NetworkConnectionRoutingPolicySen */ - @Test - public void testNetworkConnectionRoutingPolicySen() { - // TODO: test NetworkConnectionRoutingPolicySen - } - - /** Test the property 'scheme' */ - @Test - public void schemeTest() { - // TODO: test scheme - } - - /** Test the property 'dstType' */ - @Test - public void dstTypeTest() { - // TODO: test dstType - } - - /** Test the property 'dstId' */ - @Test - public void dstIdTest() { - // TODO: test dstId - } -} diff --git a/src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySenTestTest.java b/src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySenTestTest.java deleted file mode 100644 index fe3aac3..0000000 --- a/src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySenTestTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@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.Test; - -/** Model tests for NetworkConnectionRoutingPolicySenTest */ -public class NetworkConnectionRoutingPolicySenTestTest { - private final NetworkConnectionRoutingPolicySenTest model = - new NetworkConnectionRoutingPolicySenTest(); - - /** Model tests for NetworkConnectionRoutingPolicySenTest */ - @Test - public void testNetworkConnectionRoutingPolicySenTest() { - // TODO: test NetworkConnectionRoutingPolicySenTest - } - - /** Test the property 'scheme' */ - @Test - public void schemeTest() { - // TODO: test scheme - } - - /** Test the property 'dstType' */ - @Test - public void dstTypeTest() { - // TODO: test dstType - } - - /** Test the property 'dstId' */ - @Test - public void dstIdTest() { - // TODO: test dstId - } -} diff --git a/src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySignetTest.java b/src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySignetTest.java deleted file mode 100644 index fb9e1fd..0000000 --- a/src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySignetTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@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.Test; - -/** Model tests for NetworkConnectionRoutingPolicySignet */ -public class NetworkConnectionRoutingPolicySignetTest { - private final NetworkConnectionRoutingPolicySignet model = - new NetworkConnectionRoutingPolicySignet(); - - /** Model tests for NetworkConnectionRoutingPolicySignet */ - @Test - public void testNetworkConnectionRoutingPolicySignet() { - // TODO: test NetworkConnectionRoutingPolicySignet - } - - /** Test the property 'scheme' */ - @Test - public void schemeTest() { - // TODO: test scheme - } - - /** Test the property 'dstType' */ - @Test - public void dstTypeTest() { - // TODO: test dstType - } - - /** Test the property 'dstId' */ - @Test - public void dstIdTest() { - // TODO: test dstId - } -} diff --git a/src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySignetTestTest.java b/src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySignetTestTest.java deleted file mode 100644 index 186b142..0000000 --- a/src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicySignetTestTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@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.Test; - -/** Model tests for NetworkConnectionRoutingPolicySignetTest */ -public class NetworkConnectionRoutingPolicySignetTestTest { - private final NetworkConnectionRoutingPolicySignetTest model = - new NetworkConnectionRoutingPolicySignetTest(); - - /** Model tests for NetworkConnectionRoutingPolicySignetTest */ - @Test - public void testNetworkConnectionRoutingPolicySignetTest() { - // TODO: test NetworkConnectionRoutingPolicySignetTest - } - - /** Test the property 'scheme' */ - @Test - public void schemeTest() { - // TODO: test scheme - } - - /** Test the property 'dstType' */ - @Test - public void dstTypeTest() { - // TODO: test dstType - } - - /** Test the property 'dstId' */ - @Test - public void dstIdTest() { - // TODO: test dstId - } -} diff --git a/src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicyTest.java b/src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicyTest.java deleted file mode 100644 index 8d56096..0000000 --- a/src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicyTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@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.Test; - -/** Model tests for NetworkConnectionRoutingPolicy */ -public class NetworkConnectionRoutingPolicyTest { - private final NetworkConnectionRoutingPolicy model = new NetworkConnectionRoutingPolicy(); - - /** Model tests for NetworkConnectionRoutingPolicy */ - @Test - public void testNetworkConnectionRoutingPolicy() { - // TODO: test NetworkConnectionRoutingPolicy - } - - /** Test the property 'crypto' */ - @Test - public void cryptoTest() { - // TODO: test crypto - } - - /** Test the property 'sen' */ - @Test - public void senTest() { - // TODO: test sen - } - - /** Test the property 'signet' */ - @Test - public void signetTest() { - // TODO: test signet - } - - /** Test the property 'senTest' */ - @Test - public void senTestTest() { - // TODO: test senTest - } - - /** Test the property 'signetTest' */ - @Test - public void signetTestTest() { - // TODO: test signetTest - } -} diff --git a/src/test/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicyCryptoTest.java b/src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicyValueTest.java similarity index 66% rename from src/test/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicyCryptoTest.java rename to src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicyValueTest.java index 800f796..96a4706 100644 --- a/src/test/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicyCryptoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicyValueTest.java @@ -15,14 +15,15 @@ import org.junit.Test; -/** Model tests for NetworkIdRoutingPolicyCrypto */ -public class NetworkIdRoutingPolicyCryptoTest { - private final NetworkIdRoutingPolicyCrypto model = new NetworkIdRoutingPolicyCrypto(); +/** Model tests for NetworkConnectionRoutingPolicyValue */ +public class NetworkConnectionRoutingPolicyValueTest { + private final NetworkConnectionRoutingPolicyValue model = + new NetworkConnectionRoutingPolicyValue(); - /** Model tests for NetworkIdRoutingPolicyCrypto */ + /** Model tests for NetworkConnectionRoutingPolicyValue */ @Test - public void testNetworkIdRoutingPolicyCrypto() { - // TODO: test NetworkIdRoutingPolicyCrypto + public void testNetworkConnectionRoutingPolicyValue() { + // TODO: test NetworkConnectionRoutingPolicyValue } /** Test the property 'scheme' */ diff --git a/src/test/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicySenTestTest.java b/src/test/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicySenTestTest.java deleted file mode 100644 index e34a247..0000000 --- a/src/test/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicySenTestTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@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.Test; - -/** Model tests for NetworkIdRoutingPolicySenTest */ -public class NetworkIdRoutingPolicySenTestTest { - private final NetworkIdRoutingPolicySenTest model = new NetworkIdRoutingPolicySenTest(); - - /** Model tests for NetworkIdRoutingPolicySenTest */ - @Test - public void testNetworkIdRoutingPolicySenTest() { - // TODO: test NetworkIdRoutingPolicySenTest - } - - /** Test the property 'scheme' */ - @Test - public void schemeTest() { - // TODO: test scheme - } - - /** Test the property 'dstType' */ - @Test - public void dstTypeTest() { - // TODO: test dstType - } - - /** Test the property 'dstId' */ - @Test - public void dstIdTest() { - // TODO: test dstId - } -} diff --git a/src/test/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicyTest.java b/src/test/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicyTest.java deleted file mode 100644 index 5afea2f..0000000 --- a/src/test/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicyTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@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.Test; - -/** Model tests for NetworkIdRoutingPolicy */ -public class NetworkIdRoutingPolicyTest { - private final NetworkIdRoutingPolicy model = new NetworkIdRoutingPolicy(); - - /** Model tests for NetworkIdRoutingPolicy */ - @Test - public void testNetworkIdRoutingPolicy() { - // TODO: test NetworkIdRoutingPolicy - } - - /** Test the property 'crypto' */ - @Test - public void cryptoTest() { - // TODO: test crypto - } - - /** Test the property 'sen' */ - @Test - public void senTest() { - // TODO: test sen - } - - /** Test the property 'signet' */ - @Test - public void signetTest() { - // TODO: test signet - } - - /** Test the property 'senTest' */ - @Test - public void senTestTest() { - // TODO: test senTest - } - - /** Test the property 'signetTest' */ - @Test - public void signetTestTest() { - // TODO: test signetTest - } -} diff --git a/src/test/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicySenTest.java b/src/test/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicyValueTest.java similarity index 70% rename from src/test/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicySenTest.java rename to src/test/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicyValueTest.java index 4abb62a..c445551 100644 --- a/src/test/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicySenTest.java +++ b/src/test/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicyValueTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for NetworkIdRoutingPolicySen */ -public class NetworkIdRoutingPolicySenTest { - private final NetworkIdRoutingPolicySen model = new NetworkIdRoutingPolicySen(); +/** Model tests for NetworkIdRoutingPolicyValue */ +public class NetworkIdRoutingPolicyValueTest { + private final NetworkIdRoutingPolicyValue model = new NetworkIdRoutingPolicyValue(); - /** Model tests for NetworkIdRoutingPolicySen */ + /** Model tests for NetworkIdRoutingPolicyValue */ @Test - public void testNetworkIdRoutingPolicySen() { - // TODO: test NetworkIdRoutingPolicySen + public void testNetworkIdRoutingPolicyValue() { + // TODO: test NetworkIdRoutingPolicyValue } /** Test the property 'scheme' */ diff --git a/src/test/java/com/fireblocks/sdk/model/OneTimeAddressAccountTest.java b/src/test/java/com/fireblocks/sdk/model/OneTimeAddressAccountTest.java new file mode 100644 index 0000000..eec8c71 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/OneTimeAddressAccountTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for OneTimeAddressAccount */ +public class OneTimeAddressAccountTest { + private final OneTimeAddressAccount model = new OneTimeAddressAccount(); + + /** Model tests for OneTimeAddressAccount */ + @Test + public void testOneTimeAddressAccount() { + // TODO: test OneTimeAddressAccount + } + + /** Test the property 'oneTimeAddress' */ + @Test + public void oneTimeAddressTest() { + // TODO: test oneTimeAddress + } + + /** Test the property 'tag' */ + @Test + public void tagTest() { + // TODO: test tag + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/OperationExecutionFailureTest.java b/src/test/java/com/fireblocks/sdk/model/OperationExecutionFailureTest.java new file mode 100644 index 0000000..0d12bea --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/OperationExecutionFailureTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for OperationExecutionFailure */ +public class OperationExecutionFailureTest { + private final OperationExecutionFailure model = new OperationExecutionFailure(); + + /** Model tests for OperationExecutionFailure */ + @Test + public void testOperationExecutionFailure() { + // TODO: test OperationExecutionFailure + } + + /** Test the property 'reason' */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/PreScreeningTest.java b/src/test/java/com/fireblocks/sdk/model/PreScreeningTest.java new file mode 100644 index 0000000..8609f76 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/PreScreeningTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for PreScreening */ +public class PreScreeningTest { + private final PreScreening model = new PreScreening(); + + /** Model tests for PreScreening */ + @Test + public void testPreScreening() { + // TODO: test PreScreening + } + + /** Test the property 'enabled' */ + @Test + public void enabledTest() { + // TODO: test enabled + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/RedeemFundsToLinkedDDAResponseTest.java b/src/test/java/com/fireblocks/sdk/model/RedeemFundsToLinkedDDAResponseTest.java new file mode 100644 index 0000000..2876c84 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/RedeemFundsToLinkedDDAResponseTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for RedeemFundsToLinkedDDAResponse */ +public class RedeemFundsToLinkedDDAResponseTest { + private final RedeemFundsToLinkedDDAResponse model = new RedeemFundsToLinkedDDAResponse(); + + /** Model tests for RedeemFundsToLinkedDDAResponse */ + @Test + public void testRedeemFundsToLinkedDDAResponse() { + // TODO: test RedeemFundsToLinkedDDAResponse + } + + /** Test the property 'success' */ + @Test + public void successTest() { + // TODO: test success + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/RegisterNewAssetRequestTest.java b/src/test/java/com/fireblocks/sdk/model/RegisterNewAssetRequestTest.java new file mode 100644 index 0000000..a140036 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/RegisterNewAssetRequestTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for RegisterNewAssetRequest */ +public class RegisterNewAssetRequestTest { + private final RegisterNewAssetRequest model = new RegisterNewAssetRequest(); + + /** Model tests for RegisterNewAssetRequest */ + @Test + public void testRegisterNewAssetRequest() { + // TODO: test RegisterNewAssetRequest + } + + /** Test the property 'blockchainId' */ + @Test + public void blockchainIdTest() { + // TODO: test blockchainId + } + + /** Test the property 'address' */ + @Test + public void addressTest() { + // TODO: test address + } + + /** Test the property 'symbol' */ + @Test + public void symbolTest() { + // TODO: test symbol + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/RenameVaultAccountResponseTest.java b/src/test/java/com/fireblocks/sdk/model/RenameVaultAccountResponseTest.java new file mode 100644 index 0000000..097fcc0 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/RenameVaultAccountResponseTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for RenameVaultAccountResponse */ +public class RenameVaultAccountResponseTest { + private final RenameVaultAccountResponse model = new RenameVaultAccountResponse(); + + /** Model tests for RenameVaultAccountResponse */ + @Test + public void testRenameVaultAccountResponse() { + // TODO: test RenameVaultAccountResponse + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ResendWebhooksByTransactionIdResponseTest.java b/src/test/java/com/fireblocks/sdk/model/ResendWebhooksByTransactionIdResponseTest.java new file mode 100644 index 0000000..858a275 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ResendWebhooksByTransactionIdResponseTest.java @@ -0,0 +1,34 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ResendWebhooksByTransactionIdResponse */ +public class ResendWebhooksByTransactionIdResponseTest { + private final ResendWebhooksByTransactionIdResponse model = + new ResendWebhooksByTransactionIdResponse(); + + /** Model tests for ResendWebhooksByTransactionIdResponse */ + @Test + public void testResendWebhooksByTransactionIdResponse() { + // TODO: test ResendWebhooksByTransactionIdResponse + } + + /** Test the property 'success' */ + @Test + public void successTest() { + // TODO: test success + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ScreeningOperationExecutionOutputTest.java b/src/test/java/com/fireblocks/sdk/model/ScreeningOperationExecutionOutputTest.java new file mode 100644 index 0000000..ad24588 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ScreeningOperationExecutionOutputTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ScreeningOperationExecutionOutput */ +public class ScreeningOperationExecutionOutputTest { + private final ScreeningOperationExecutionOutput model = new ScreeningOperationExecutionOutput(); + + /** Model tests for ScreeningOperationExecutionOutput */ + @Test + public void testScreeningOperationExecutionOutput() { + // TODO: test ScreeningOperationExecutionOutput + } + + /** Test the property 'verdicts' */ + @Test + public void verdictsTest() { + // TODO: test verdicts + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ScreeningOperationExecutionTest.java b/src/test/java/com/fireblocks/sdk/model/ScreeningOperationExecutionTest.java new file mode 100644 index 0000000..b1a3946 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ScreeningOperationExecutionTest.java @@ -0,0 +1,51 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ScreeningOperationExecution */ +public class ScreeningOperationExecutionTest { + private final ScreeningOperationExecution model = new ScreeningOperationExecution(); + + /** Model tests for ScreeningOperationExecution */ + @Test + public void testScreeningOperationExecution() { + // TODO: test ScreeningOperationExecution + } + + /** Test the property 'output' */ + @Test + public void outputTest() { + // TODO: test output + } + + /** Test the property 'startedAt' */ + @Test + public void startedAtTest() { + // TODO: test startedAt + } + + /** Test the property 'finishedAt' */ + @Test + public void finishedAtTest() { + // TODO: test finishedAt + } + + /** Test the property 'failure' */ + @Test + public void failureTest() { + // TODO: test failure + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ScreeningOperationFailureTest.java b/src/test/java/com/fireblocks/sdk/model/ScreeningOperationFailureTest.java new file mode 100644 index 0000000..656f351 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ScreeningOperationFailureTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ScreeningOperationFailure */ +public class ScreeningOperationFailureTest { + private final ScreeningOperationFailure model = new ScreeningOperationFailure(); + + /** Model tests for ScreeningOperationFailure */ + @Test + public void testScreeningOperationFailure() { + // TODO: test ScreeningOperationFailure + } + + /** Test the property 'reason' */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ScreeningOperationTypeTest.java b/src/test/java/com/fireblocks/sdk/model/ScreeningOperationTypeTest.java new file mode 100644 index 0000000..c173839 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ScreeningOperationTypeTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ScreeningOperationType */ +public class ScreeningOperationTypeTest { + /** Model tests for ScreeningOperationType */ + @Test + public void testScreeningOperationType() { + // TODO: test ScreeningOperationType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ScreeningValidationFailureTest.java b/src/test/java/com/fireblocks/sdk/model/ScreeningValidationFailureTest.java new file mode 100644 index 0000000..641f9dc --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ScreeningValidationFailureTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ScreeningValidationFailure */ +public class ScreeningValidationFailureTest { + private final ScreeningValidationFailure model = new ScreeningValidationFailure(); + + /** Model tests for ScreeningValidationFailure */ + @Test + public void testScreeningValidationFailure() { + // TODO: test ScreeningValidationFailure + } + + /** Test the property 'reason' */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ScreeningVerdictMatchedRuleTest.java b/src/test/java/com/fireblocks/sdk/model/ScreeningVerdictMatchedRuleTest.java new file mode 100644 index 0000000..88b8cf8 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ScreeningVerdictMatchedRuleTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ScreeningVerdictMatchedRule */ +public class ScreeningVerdictMatchedRuleTest { + private final ScreeningVerdictMatchedRule model = new ScreeningVerdictMatchedRule(); + + /** Model tests for ScreeningVerdictMatchedRule */ + @Test + public void testScreeningVerdictMatchedRule() { + // TODO: test ScreeningVerdictMatchedRule + } + + /** Test the property 'action' */ + @Test + public void actionTest() { + // TODO: test action + } + + /** Test the property 'category' */ + @Test + public void categoryTest() { + // TODO: test category + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ScreeningVerdictTest.java b/src/test/java/com/fireblocks/sdk/model/ScreeningVerdictTest.java new file mode 100644 index 0000000..5c9edde --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ScreeningVerdictTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for ScreeningVerdict */ +public class ScreeningVerdictTest { + private final ScreeningVerdict model = new ScreeningVerdict(); + + /** Model tests for ScreeningVerdict */ + @Test + public void testScreeningVerdict() { + // TODO: test ScreeningVerdict + } + + /** Test the property 'verdict' */ + @Test + public void verdictTest() { + // TODO: test verdict + } + + /** Test the property 'executionOperationId' */ + @Test + public void executionOperationIdTest() { + // TODO: test executionOperationId + } + + /** Test the property 'account' */ + @Test + public void accountTest() { + // TODO: test account + } + + /** Test the property 'assetId' */ + @Test + public void assetIdTest() { + // TODO: test assetId + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** Test the property 'matchedRule' */ + @Test + public void matchedRuleTest() { + // TODO: test matchedRule + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SetAdminQuorumThresholdResponseTest.java b/src/test/java/com/fireblocks/sdk/model/SetAdminQuorumThresholdResponseTest.java new file mode 100644 index 0000000..c2ae3d2 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SetAdminQuorumThresholdResponseTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for SetAdminQuorumThresholdResponse */ +public class SetAdminQuorumThresholdResponseTest { + private final SetAdminQuorumThresholdResponse model = new SetAdminQuorumThresholdResponse(); + + /** Model tests for SetAdminQuorumThresholdResponse */ + @Test + public void testSetAdminQuorumThresholdResponse() { + // TODO: test SetAdminQuorumThresholdResponse + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SetOtaStatusResponseOneOfTest.java b/src/test/java/com/fireblocks/sdk/model/SetOtaStatusResponseOneOfTest.java new file mode 100644 index 0000000..8063cc7 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SetOtaStatusResponseOneOfTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for SetOtaStatusResponseOneOf */ +public class SetOtaStatusResponseOneOfTest { + private final SetOtaStatusResponseOneOf model = new SetOtaStatusResponseOneOf(); + + /** Model tests for SetOtaStatusResponseOneOf */ + @Test + public void testSetOtaStatusResponseOneOf() { + // TODO: test SetOtaStatusResponseOneOf + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SetOtaStatusResponseTest.java b/src/test/java/com/fireblocks/sdk/model/SetOtaStatusResponseTest.java new file mode 100644 index 0000000..778918b --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SetOtaStatusResponseTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for SetOtaStatusResponse */ +public class SetOtaStatusResponseTest { + private final SetOtaStatusResponse model = new SetOtaStatusResponse(); + + /** Model tests for SetOtaStatusResponse */ + @Test + public void testSetOtaStatusResponse() { + // TODO: test SetOtaStatusResponse + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransferConfigOperationTest.java b/src/test/java/com/fireblocks/sdk/model/TransferConfigOperationTest.java new file mode 100644 index 0000000..3f5512c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TransferConfigOperationTest.java @@ -0,0 +1,57 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for TransferConfigOperation */ +public class TransferConfigOperationTest { + private final TransferConfigOperation model = new TransferConfigOperation(); + + /** Model tests for TransferConfigOperation */ + @Test + public void testTransferConfigOperation() { + // TODO: test TransferConfigOperation + } + + /** Test the property 'operationId' */ + @Test + public void operationIdTest() { + // TODO: test operationId + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'params' */ + @Test + public void paramsTest() { + // TODO: test params + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'validationFailure' */ + @Test + public void validationFailureTest() { + // TODO: test validationFailure + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransferOperationConfigParamsTest.java b/src/test/java/com/fireblocks/sdk/model/TransferOperationConfigParamsTest.java new file mode 100644 index 0000000..cc259a2 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TransferOperationConfigParamsTest.java @@ -0,0 +1,51 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for TransferOperationConfigParams */ +public class TransferOperationConfigParamsTest { + private final TransferOperationConfigParams model = new TransferOperationConfigParams(); + + /** Model tests for TransferOperationConfigParams */ + @Test + public void testTransferOperationConfigParams() { + // TODO: test TransferOperationConfigParams + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** Test the property 'assetId' */ + @Test + public void assetIdTest() { + // TODO: test assetId + } + + /** Test the property 'source' */ + @Test + public void sourceTest() { + // TODO: test source + } + + /** Test the property 'destination' */ + @Test + public void destinationTest() { + // TODO: test destination + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransferOperationExecutionOutputTest.java b/src/test/java/com/fireblocks/sdk/model/TransferOperationExecutionOutputTest.java new file mode 100644 index 0000000..90618c2 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TransferOperationExecutionOutputTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for TransferOperationExecutionOutput */ +public class TransferOperationExecutionOutputTest { + private final TransferOperationExecutionOutput model = new TransferOperationExecutionOutput(); + + /** Model tests for TransferOperationExecutionOutput */ + @Test + public void testTransferOperationExecutionOutput() { + // TODO: test TransferOperationExecutionOutput + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** Test the property 'fee' */ + @Test + public void feeTest() { + // TODO: test fee + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransferOperationExecutionParamsExecutionParamsTest.java b/src/test/java/com/fireblocks/sdk/model/TransferOperationExecutionParamsExecutionParamsTest.java new file mode 100644 index 0000000..635befc --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TransferOperationExecutionParamsExecutionParamsTest.java @@ -0,0 +1,52 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for TransferOperationExecutionParamsExecutionParams */ +public class TransferOperationExecutionParamsExecutionParamsTest { + private final TransferOperationExecutionParamsExecutionParams model = + new TransferOperationExecutionParamsExecutionParams(); + + /** Model tests for TransferOperationExecutionParamsExecutionParams */ + @Test + public void testTransferOperationExecutionParamsExecutionParams() { + // TODO: test TransferOperationExecutionParamsExecutionParams + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** Test the property 'assetId' */ + @Test + public void assetIdTest() { + // TODO: test assetId + } + + /** Test the property 'source' */ + @Test + public void sourceTest() { + // TODO: test source + } + + /** Test the property 'destination' */ + @Test + public void destinationTest() { + // TODO: test destination + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransferOperationExecutionParamsTest.java b/src/test/java/com/fireblocks/sdk/model/TransferOperationExecutionParamsTest.java new file mode 100644 index 0000000..9d4cd8c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TransferOperationExecutionParamsTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for TransferOperationExecutionParams */ +public class TransferOperationExecutionParamsTest { + private final TransferOperationExecutionParams model = new TransferOperationExecutionParams(); + + /** Model tests for TransferOperationExecutionParams */ + @Test + public void testTransferOperationExecutionParams() { + // TODO: test TransferOperationExecutionParams + } + + /** Test the property 'configOperationId' */ + @Test + public void configOperationIdTest() { + // TODO: test configOperationId + } + + /** Test the property 'executionParams' */ + @Test + public void executionParamsTest() { + // TODO: test executionParams + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransferOperationExecutionTest.java b/src/test/java/com/fireblocks/sdk/model/TransferOperationExecutionTest.java new file mode 100644 index 0000000..086ecd3 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TransferOperationExecutionTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for TransferOperationExecution */ +public class TransferOperationExecutionTest { + private final TransferOperationExecution model = new TransferOperationExecution(); + + /** Model tests for TransferOperationExecution */ + @Test + public void testTransferOperationExecution() { + // TODO: test TransferOperationExecution + } + + /** Test the property 'input' */ + @Test + public void inputTest() { + // TODO: test input + } + + /** Test the property 'output' */ + @Test + public void outputTest() { + // TODO: test output + } + + /** Test the property 'txId' */ + @Test + public void txIdTest() { + // TODO: test txId + } + + /** Test the property 'startedAt' */ + @Test + public void startedAtTest() { + // TODO: test startedAt + } + + /** Test the property 'finishedAt' */ + @Test + public void finishedAtTest() { + // TODO: test finishedAt + } + + /** Test the property 'failure' */ + @Test + public void failureTest() { + // TODO: test failure + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransferOperationFailureDataTest.java b/src/test/java/com/fireblocks/sdk/model/TransferOperationFailureDataTest.java new file mode 100644 index 0000000..74913f6 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TransferOperationFailureDataTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for TransferOperationFailureData */ +public class TransferOperationFailureDataTest { + private final TransferOperationFailureData model = new TransferOperationFailureData(); + + /** Model tests for TransferOperationFailureData */ + @Test + public void testTransferOperationFailureData() { + // TODO: test TransferOperationFailureData + } + + /** Test the property 'txId' */ + @Test + public void txIdTest() { + // TODO: test txId + } + + /** Test the property 'txStatus' */ + @Test + public void txStatusTest() { + // TODO: test txStatus + } + + /** Test the property 'txSubStatus' */ + @Test + public void txSubStatusTest() { + // TODO: test txSubStatus + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransferOperationFailureTest.java b/src/test/java/com/fireblocks/sdk/model/TransferOperationFailureTest.java new file mode 100644 index 0000000..babd6d5 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TransferOperationFailureTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for TransferOperationFailure */ +public class TransferOperationFailureTest { + private final TransferOperationFailure model = new TransferOperationFailure(); + + /** Model tests for TransferOperationFailure */ + @Test + public void testTransferOperationFailure() { + // TODO: test TransferOperationFailure + } + + /** Test the property 'reason' */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransferOperationPreviewOutputTest.java b/src/test/java/com/fireblocks/sdk/model/TransferOperationPreviewOutputTest.java new file mode 100644 index 0000000..3b455fd --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TransferOperationPreviewOutputTest.java @@ -0,0 +1,51 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for TransferOperationPreviewOutput */ +public class TransferOperationPreviewOutputTest { + private final TransferOperationPreviewOutput model = new TransferOperationPreviewOutput(); + + /** Model tests for TransferOperationPreviewOutput */ + @Test + public void testTransferOperationPreviewOutput() { + // TODO: test TransferOperationPreviewOutput + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** Test the property 'fee' */ + @Test + public void feeTest() { + // TODO: test fee + } + + /** Test the property 'isSignRequired' */ + @Test + public void isSignRequiredTest() { + // TODO: test isSignRequired + } + + /** Test the property 'timeSeconds' */ + @Test + public void timeSecondsTest() { + // TODO: test timeSeconds + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransferOperationPreviewTest.java b/src/test/java/com/fireblocks/sdk/model/TransferOperationPreviewTest.java new file mode 100644 index 0000000..3caaaed --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TransferOperationPreviewTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for TransferOperationPreview */ +public class TransferOperationPreviewTest { + private final TransferOperationPreview model = new TransferOperationPreview(); + + /** Model tests for TransferOperationPreview */ + @Test + public void testTransferOperationPreview() { + // TODO: test TransferOperationPreview + } + + /** Test the property 'input' */ + @Test + public void inputTest() { + // TODO: test input + } + + /** Test the property 'output' */ + @Test + public void outputTest() { + // TODO: test output + } + + /** Test the property 'failure' */ + @Test + public void failureTest() { + // TODO: test failure + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransferOperationTypeTest.java b/src/test/java/com/fireblocks/sdk/model/TransferOperationTypeTest.java new file mode 100644 index 0000000..8ca418b --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TransferOperationTypeTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for TransferOperationType */ +public class TransferOperationTypeTest { + /** Model tests for TransferOperationType */ + @Test + public void testTransferOperationType() { + // TODO: test TransferOperationType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransferValidationFailureTest.java b/src/test/java/com/fireblocks/sdk/model/TransferValidationFailureTest.java new file mode 100644 index 0000000..1156495 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TransferValidationFailureTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for TransferValidationFailure */ +public class TransferValidationFailureTest { + private final TransferValidationFailure model = new TransferValidationFailure(); + + /** Model tests for TransferValidationFailure */ + @Test + public void testTransferValidationFailure() { + // TODO: test TransferValidationFailure + } + + /** Test the property 'reason' */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/UserRoleTest.java b/src/test/java/com/fireblocks/sdk/model/UserRoleTest.java new file mode 100644 index 0000000..31fe4e6 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/UserRoleTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for UserRole */ +public class UserRoleTest { + /** Model tests for UserRole */ + @Test + public void testUserRole() { + // TODO: test UserRole + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/UserStatusTest.java b/src/test/java/com/fireblocks/sdk/model/UserStatusTest.java new file mode 100644 index 0000000..2848c14 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/UserStatusTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for UserStatus */ +public class UserStatusTest { + /** Model tests for UserStatus */ + @Test + public void testUserStatus() { + // TODO: test UserStatus + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/UserTypeTest.java b/src/test/java/com/fireblocks/sdk/model/UserTypeTest.java new file mode 100644 index 0000000..8fbdc4c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/UserTypeTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for UserType */ +public class UserTypeTest { + /** Model tests for UserType */ + @Test + public void testUserType() { + // TODO: test UserType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/WorkflowConfigStatusTest.java b/src/test/java/com/fireblocks/sdk/model/WorkflowConfigStatusTest.java new file mode 100644 index 0000000..3408c4e --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/WorkflowConfigStatusTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for WorkflowConfigStatus */ +public class WorkflowConfigStatusTest { + /** Model tests for WorkflowConfigStatus */ + @Test + public void testWorkflowConfigStatus() { + // TODO: test WorkflowConfigStatus + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/WorkflowConfigurationIdTest.java b/src/test/java/com/fireblocks/sdk/model/WorkflowConfigurationIdTest.java new file mode 100644 index 0000000..30b77bd --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/WorkflowConfigurationIdTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for WorkflowConfigurationId */ +public class WorkflowConfigurationIdTest { + private final WorkflowConfigurationId model = new WorkflowConfigurationId(); + + /** Model tests for WorkflowConfigurationId */ + @Test + public void testWorkflowConfigurationId() { + // TODO: test WorkflowConfigurationId + } + + /** Test the property 'configId' */ + @Test + public void configIdTest() { + // TODO: test configId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/WorkflowExecutionOperationTest.java b/src/test/java/com/fireblocks/sdk/model/WorkflowExecutionOperationTest.java new file mode 100644 index 0000000..d0acb9d --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/WorkflowExecutionOperationTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for WorkflowExecutionOperation */ +public class WorkflowExecutionOperationTest { + private final WorkflowExecutionOperation model = new WorkflowExecutionOperation(); + + /** Model tests for WorkflowExecutionOperation */ + @Test + public void testWorkflowExecutionOperation() { + // TODO: test WorkflowExecutionOperation + } + + /** Test the property 'operationId' */ + @Test + public void operationIdTest() { + // TODO: test operationId + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'operationType' */ + @Test + public void operationTypeTest() { + // TODO: test operationType + } + + /** Test the property 'validationFailure' */ + @Test + public void validationFailureTest() { + // TODO: test validationFailure + } + + /** Test the property 'execution' */ + @Test + public void executionTest() { + // TODO: test execution + } + + /** Test the property 'preview' */ + @Test + public void previewTest() { + // TODO: test preview + } +}