fireblocks_sdk/apis/
vaults_api.rs

1// Fireblocks API
2//
3// Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain.  - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com)
4//
5// The version of the OpenAPI document: 1.8.0
6// Contact: developers@fireblocks.com
7// Generated by: https://openapi-generator.tech
8
9use {
10    super::{Error, configuration},
11    crate::{
12        apis::{ContentType, ResponseContent},
13        models,
14    },
15    async_trait::async_trait,
16    reqwest,
17    serde::{Deserialize, Serialize, de::Error as _},
18    std::sync::Arc,
19};
20
21#[async_trait]
22pub trait VaultsApi: Send + Sync {
23    /// POST /vault/accounts/{vaultAccountId}/{assetId}/activate
24    ///
25    /// Initiates activation for a wallet in a vault account.  Activation is
26    /// required for tokens that need an on-chain transaction for creation (XLM
27    /// tokens, SOL tokens etc). </br>Endpoint Permission: Admin, Non-Signing
28    /// Admin, Signer, Approver, Editor.
29    async fn activate_asset_for_vault_account(
30        &self,
31        params: ActivateAssetForVaultAccountParams,
32    ) -> Result<models::CreateVaultAssetResponse, Error<ActivateAssetForVaultAccountError>>;
33
34    /// POST /vault/accounts/attached/tags/attach
35    ///
36    /// Attach one or more tags to the requested vault accounts.
37    async fn attach_tags_to_vault_accounts(
38        &self,
39        params: AttachTagsToVaultAccountsParams,
40    ) -> Result<(), Error<AttachTagsToVaultAccountsError>>;
41
42    /// POST /vault/accounts/{vaultAccountId}/{assetId}/addresses/{addressId}/
43    /// create_legacy
44    ///
45    /// Converts an existing segwit address to the legacy format. </br>Endpoint
46    /// Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
47    async fn create_legacy_address(
48        &self,
49        params: CreateLegacyAddressParams,
50    ) -> Result<models::CreateAddressResponse, Error<CreateLegacyAddressError>>;
51
52    /// POST /vault/accounts/bulk/
53    ///
54    /// Create multiple vault accounts by running an async job.       - The
55    /// HBAR, TON, SUI, TERRA, ALGO, and DOT blockchains are not supported. -
56    /// Limited to a maximum of 10,000 accounts per operation.  **Endpoint
57    /// Permissions:** Admin, Non-Signing Admin, Signer, Approver, Editor.
58    async fn create_multiple_accounts(
59        &self,
60        params: CreateMultipleAccountsParams,
61    ) -> Result<models::JobCreated, Error<CreateMultipleAccountsError>>;
62
63    /// POST /vault/accounts/addresses/bulk
64    ///
65    /// **For UTXO blockchains only.**  Create multiple deposit addresses by
66    /// running an async job. - The target Vault account should already have a
67    /// UTXO asset wallet with a permanent address. - Limited to a maximum of
68    /// 10,000 addresses per operation. Use multiple operations for the same
69    /// Vault account/permanent address if needed.  **Endpoint Permissions:**
70    /// Admin, Non-Signing Admin.
71    async fn create_multiple_deposit_addresses(
72        &self,
73        params: CreateMultipleDepositAddressesParams,
74    ) -> Result<models::JobCreated, Error<CreateMultipleDepositAddressesError>>;
75
76    /// POST /vault/accounts
77    ///
78    /// Creates a new vault account with the requested name. **Note: ** Vault account names should consist of ASCII characters only. Learn more about Fireblocks Vault Accounts in the following [guide](https://developers.fireblocks.com/reference/create-vault-account). </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
79    async fn create_vault_account(
80        &self,
81        params: CreateVaultAccountParams,
82    ) -> Result<models::VaultAccount, Error<CreateVaultAccountError>>;
83
84    /// POST /vault/accounts/{vaultAccountId}/{assetId}
85    ///
86    /// Creates a wallet for a specific asset in a vault account. Learn more about Fireblocks Vault Wallets in the following [guide](https://developers.fireblocks.com/reference/create-vault-wallet). </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
87    async fn create_vault_account_asset(
88        &self,
89        params: CreateVaultAccountAssetParams,
90    ) -> Result<models::CreateVaultAssetResponse, Error<CreateVaultAccountAssetError>>;
91
92    /// POST /vault/accounts/{vaultAccountId}/{assetId}/addresses
93    ///
94    /// Creates a new deposit address for an asset of a vault account. Should be
95    /// used for UTXO or Tag/Memo based assets ONLY.  Requests with account
96    /// based assets will fail.  </br>Endpoint Permission: Admin, Non-Signing
97    /// Admin.
98    async fn create_vault_account_asset_address(
99        &self,
100        params: CreateVaultAccountAssetAddressParams,
101    ) -> Result<models::CreateAddressResponse, Error<CreateVaultAccountAssetAddressError>>;
102
103    /// POST /vault/accounts/attached/tags/detached
104    ///
105    /// Detach one or more tags from the requested vault account.
106    async fn detach_tags_from_vault_accounts(
107        &self,
108        params: DetachTagsFromVaultAccountsParams,
109    ) -> Result<(), Error<DetachTagsFromVaultAccountsError>>;
110
111    /// GET /vault/asset_wallets
112    ///
113    /// Get all vault wallets of the vault accounts in your workspace.  A vault
114    /// wallet is an asset in a vault account.   This method allows fast
115    /// traversal of all account balances. </br>Endpoint Permission: Admin,
116    /// Non-Signing Admin, Signer, Approver, Editor, Viewer.
117    async fn get_asset_wallets(
118        &self,
119        params: GetAssetWalletsParams,
120    ) -> Result<models::PaginatedAssetWalletResponse, Error<GetAssetWalletsError>>;
121
122    /// GET /vault/accounts/addresses/bulk/{jobId}
123    ///
124    /// Returns the current status of (or an error for) the specified deposit
125    /// addresss bulk creation job.  **Endpoint Permissions:** Admin,
126    /// Non-Signing Admin, Signer, Approver, Editor, and Viewer.
127    async fn get_create_multiple_deposit_addresses_job_status(
128        &self,
129        params: GetCreateMultipleDepositAddressesJobStatusParams,
130    ) -> Result<
131        models::CreateMultipleDepositAddressesJobStatus,
132        Error<GetCreateMultipleDepositAddressesJobStatusError>,
133    >;
134
135    /// GET /vault/accounts/bulk/{jobId}
136    ///
137    /// Returns the current status of (or error for) the specified vault account
138    /// bulk creation job.  **Endpoint Permissions:** Admin, Non-Signing Admin,
139    /// Signer, Approver, Editor, Viewer.
140    async fn get_create_multiple_vault_accounts_job_status(
141        &self,
142        params: GetCreateMultipleVaultAccountsJobStatusParams,
143    ) -> Result<
144        models::CreateMultipleVaultAccountsJobStatus,
145        Error<GetCreateMultipleVaultAccountsJobStatusError>,
146    >;
147
148    /// GET /vault/accounts/{vaultAccountId}/{assetId}/max_spendable_amount
149    ///
150    /// **UTXO assets only.**  Retrieve the maximum amount of the specified
151    /// asset that can be spent in a single transaction from the specified vault
152    /// account.  **Endpoint Permissions:** Admin, Non-Signing Admin, Signer,
153    /// Approver, Editor, Viewer.
154    async fn get_max_spendable_amount(
155        &self,
156        params: GetMaxSpendableAmountParams,
157    ) -> Result<models::GetMaxSpendableAmountResponse, Error<GetMaxSpendableAmountError>>;
158
159    /// GET /vault/accounts_paged
160    ///
161    /// Gets all vault accounts in your workspace. This endpoint returns a
162    /// limited amount of results with a quick response time. </br>Endpoint
163    /// Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer.
164    async fn get_paged_vault_accounts(
165        &self,
166        params: GetPagedVaultAccountsParams,
167    ) -> Result<models::VaultAccountsPagedResponse, Error<GetPagedVaultAccountsError>>;
168
169    /// GET /vault/public_key_info
170    ///
171    /// Gets the public key information based on derivation path and signing
172    /// algorithm. </br>Endpoint Permission: Admin, Non-Signing Admin.
173    async fn get_public_key_info(
174        &self,
175        params: GetPublicKeyInfoParams,
176    ) -> Result<models::PublicKeyInformation, Error<GetPublicKeyInfoError>>;
177
178    /// GET /vault/accounts/{vaultAccountId}/{assetId}/{change}/{addressIndex}/
179    /// public_key_info
180    ///
181    /// Get the public key information for a specific asset in a vault account.
182    /// </br>Endpoint Permission: Admin, Non-Signing Admin.
183    async fn get_public_key_info_for_address(
184        &self,
185        params: GetPublicKeyInfoForAddressParams,
186    ) -> Result<models::PublicKeyInformation, Error<GetPublicKeyInfoForAddressError>>;
187
188    /// GET /vault/accounts/{vaultAccountId}/{assetId}/unspent_inputs
189    ///
190    /// Returns unspent inputs information of an UTXO asset in a vault account.
191    /// </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver,
192    /// Editor, Viewer.
193    async fn get_unspent_inputs(
194        &self,
195        params: GetUnspentInputsParams,
196    ) -> Result<Vec<models::UnspentInputsResponse>, Error<GetUnspentInputsError>>;
197
198    /// GET /vault/accounts/{vaultAccountId}
199    ///
200    /// Get a vault account by its unique ID. </br>Endpoint Permission: Admin,
201    /// Non-Signing Admin, Signer, Approver, Editor, Viewer.
202    async fn get_vault_account(
203        &self,
204        params: GetVaultAccountParams,
205    ) -> Result<models::VaultAccount, Error<GetVaultAccountError>>;
206
207    /// GET /vault/accounts/{vaultAccountId}/{assetId}
208    ///
209    /// Returns a specific vault wallet balance information for a specific
210    /// asset.  </br>Endpoint Permission: Admin, Non-Signing Admin, Signer,
211    /// Approver, Editor,   Viewer.
212    async fn get_vault_account_asset(
213        &self,
214        params: GetVaultAccountAssetParams,
215    ) -> Result<models::VaultAsset, Error<GetVaultAccountAssetError>>;
216
217    /// GET /vault/accounts/{vaultAccountId}/{assetId}/addresses
218    ///
219    /// DEPRECATED!  - If your application logic or scripts rely on the
220    /// deprecated endpoint, you should update to account for
221    /// GET/V1/vault/accounts/{vaultAccountId}/{assetId}/addresses_paginated
222    /// before Mar 31,2024. - All workspaces created after Mar 31,2024. will
223    /// have it disabled. If it is disabled for your workspace and you attempt
224    /// to use it, you will receive the following error message: \"This endpoint
225    /// is unavailable. - Please use the GET
226    /// /v1/vault/accounts/{vaultAccountId}/{assetId}/addresses_paginated
227    /// endpoint to return all the wallet addresses associated with the
228    /// specified vault account and asset in a paginated list.  </br>Endpoint
229    /// Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer.
230    async fn get_vault_account_asset_addresses(
231        &self,
232        params: GetVaultAccountAssetAddressesParams,
233    ) -> Result<Vec<models::VaultWalletAddress>, Error<GetVaultAccountAssetAddressesError>>;
234
235    /// GET /vault/accounts/{vaultAccountId}/{assetId}/addresses_paginated
236    ///
237    /// Returns a paginated response of the addresses for a given vault account
238    /// and asset. </br>Endpoint Permission: Admin, Non-Signing Admin, Signer,
239    /// Approver, Editor, Viewer.
240    async fn get_vault_account_asset_addresses_paginated(
241        &self,
242        params: GetVaultAccountAssetAddressesPaginatedParams,
243    ) -> Result<models::PaginatedAddressResponse, Error<GetVaultAccountAssetAddressesPaginatedError>>;
244
245    /// GET /vault/assets
246    ///
247    /// Gets the assets amount summary for all accounts or filtered accounts.
248    /// </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver,
249    /// Editor, Viewer.
250    async fn get_vault_assets(
251        &self,
252        params: GetVaultAssetsParams,
253    ) -> Result<Vec<models::VaultAsset>, Error<GetVaultAssetsError>>;
254
255    /// GET /vault/assets/{assetId}
256    ///
257    /// Get the total balance of an asset across all the vault accounts.
258    /// </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver,
259    /// Editor, Viewer.
260    async fn get_vault_balance_by_asset(
261        &self,
262        params: GetVaultBalanceByAssetParams,
263    ) -> Result<models::VaultAsset, Error<GetVaultBalanceByAssetError>>;
264
265    /// POST /vault/accounts/{vaultAccountId}/hide
266    ///
267    /// Hides the requested vault account from the web console view. This operation is required when creating thousands of vault accounts to serve your end-users. Used for preventing the web console to be swamped with too much vault accounts. Learn more in the following [guide](https://developers.fireblocks.com/docs/create-direct-custody-wallets#hiding-vault-accounts). NOTE: Hiding the vault account from the web console will also hide all the related transactions to/from this vault. </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
268    async fn hide_vault_account(
269        &self,
270        params: HideVaultAccountParams,
271    ) -> Result<models::VaultActionStatus, Error<HideVaultAccountError>>;
272
273    /// POST /vault/accounts/{vaultAccountId}/{assetId}/addresses/{addressId}/
274    /// set_customer_ref_id
275    ///
276    /// Sets an AML/KYT customer reference ID for a specific address.
277    /// </br>Endpoint Permission: Admin, Non-Signing Admin.
278    async fn set_customer_ref_id_for_address(
279        &self,
280        params: SetCustomerRefIdForAddressParams,
281    ) -> Result<models::VaultActionStatus, Error<SetCustomerRefIdForAddressError>>;
282
283    /// POST /vault/accounts/{vaultAccountId}/set_auto_fuel
284    ///
285    /// Toggles the auto fueling property of the vault account to enabled or disabled. Vault Accounts with 'autoFuel=true' are monitored and auto fueled by the Fireblocks Gas Station. Learn more about the Fireblocks Gas Station in the following [guide](https://developers.fireblocks.com/docs/work-with-gas-station). </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
286    async fn set_vault_account_auto_fuel(
287        &self,
288        params: SetVaultAccountAutoFuelParams,
289    ) -> Result<models::VaultActionStatus, Error<SetVaultAccountAutoFuelError>>;
290
291    /// POST /vault/accounts/{vaultAccountId}/set_customer_ref_id
292    ///
293    /// Assigns an AML/KYT customer reference ID for the vault account. Learn more about Fireblocks AML management in the following [guide](https://developers.fireblocks.com/docs/define-aml-policies). </br>Endpoint Permission: Admin, Non-Signing Admin.
294    async fn set_vault_account_customer_ref_id(
295        &self,
296        params: SetVaultAccountCustomerRefIdParams,
297    ) -> Result<models::VaultActionStatus, Error<SetVaultAccountCustomerRefIdError>>;
298
299    /// POST /vault/accounts/{vaultAccountId}/unhide
300    ///
301    /// Makes a hidden vault account visible in web console view. </br>Endpoint
302    /// Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
303    async fn unhide_vault_account(
304        &self,
305        params: UnhideVaultAccountParams,
306    ) -> Result<models::VaultActionStatus, Error<UnhideVaultAccountError>>;
307
308    /// PUT /vault/accounts/{vaultAccountId}
309    ///
310    /// Renames the requested vault account. </br>Endpoint Permission: Admin,
311    /// Non-Signing Admin, Signer, Approver.
312    async fn update_vault_account(
313        &self,
314        params: UpdateVaultAccountParams,
315    ) -> Result<models::RenameVaultAccountResponse, Error<UpdateVaultAccountError>>;
316
317    /// PUT /vault/accounts/{vaultAccountId}/{assetId}/addresses/{addressId}
318    ///
319    /// Updates the description of an existing address of an asset in a vault
320    /// account. </br>Endpoint Permission: Admin, Non-Signing Admin, Signer,
321    /// Approver, Editor.
322    async fn update_vault_account_asset_address(
323        &self,
324        params: UpdateVaultAccountAssetAddressParams,
325    ) -> Result<models::VaultActionStatus, Error<UpdateVaultAccountAssetAddressError>>;
326
327    /// POST /vault/accounts/{vaultAccountId}/{assetId}/balance
328    ///
329    /// Updates the balance of a specific asset in a vault account.  This API
330    /// endpoint is subject to a strict rate limit. Should be used by clients in
331    /// very specific scenarios.  </br>Endpoint Permission: Admin, Non-Signing
332    /// Admin, Signer, Approver, Editor.
333    async fn update_vault_account_asset_balance(
334        &self,
335        params: UpdateVaultAccountAssetBalanceParams,
336    ) -> Result<models::VaultAsset, Error<UpdateVaultAccountAssetBalanceError>>;
337}
338
339pub struct VaultsApiClient {
340    configuration: Arc<configuration::Configuration>,
341}
342
343impl VaultsApiClient {
344    pub fn new(configuration: Arc<configuration::Configuration>) -> Self {
345        Self { configuration }
346    }
347}
348
349/// struct for passing parameters to the method
350/// [`VaultsApi::activate_asset_for_vault_account`]
351#[derive(Clone, Debug)]
352#[cfg_attr(feature = "bon", derive(::bon::Builder))]
353pub struct ActivateAssetForVaultAccountParams {
354    /// The ID of the vault account
355    pub vault_account_id: String,
356    /// The ID of the asset
357    pub asset_id: String,
358    /// A unique identifier for the request. If the request is sent multiple
359    /// times with the same idempotency key, the server will return the same
360    /// response as the first request. The idempotency key is valid for 24
361    /// hours.
362    pub idempotency_key: Option<String>,
363}
364
365/// struct for passing parameters to the method
366/// [`VaultsApi::attach_tags_to_vault_accounts`]
367#[derive(Clone, Debug)]
368#[cfg_attr(feature = "bon", derive(::bon::Builder))]
369pub struct AttachTagsToVaultAccountsParams {
370    pub vault_accounts_tag_attachments_request: models::VaultAccountsTagAttachmentsRequest,
371    /// A unique identifier for the request. If the request is sent multiple
372    /// times with the same idempotency key, the server will return the same
373    /// response as the first request. The idempotency key is valid for 24
374    /// hours.
375    pub idempotency_key: Option<String>,
376}
377
378/// struct for passing parameters to the method
379/// [`VaultsApi::create_legacy_address`]
380#[derive(Clone, Debug)]
381#[cfg_attr(feature = "bon", derive(::bon::Builder))]
382pub struct CreateLegacyAddressParams {
383    /// The ID of the vault account
384    pub vault_account_id: String,
385    /// The ID of the asset
386    pub asset_id: String,
387    /// The segwit address to translate
388    pub address_id: String,
389    /// A unique identifier for the request. If the request is sent multiple
390    /// times with the same idempotency key, the server will return the same
391    /// response as the first request. The idempotency key is valid for 24
392    /// hours.
393    pub idempotency_key: Option<String>,
394}
395
396/// struct for passing parameters to the method
397/// [`VaultsApi::create_multiple_accounts`]
398#[derive(Clone, Debug)]
399#[cfg_attr(feature = "bon", derive(::bon::Builder))]
400pub struct CreateMultipleAccountsParams {
401    pub create_multiple_accounts_request: models::CreateMultipleAccountsRequest,
402    /// A unique identifier for the request. If the request is sent multiple
403    /// times with the same idempotency key, the server will return the same
404    /// response as the first request. The idempotency key is valid for 24
405    /// hours.
406    pub idempotency_key: Option<String>,
407}
408
409/// struct for passing parameters to the method
410/// [`VaultsApi::create_multiple_deposit_addresses`]
411#[derive(Clone, Debug)]
412#[cfg_attr(feature = "bon", derive(::bon::Builder))]
413pub struct CreateMultipleDepositAddressesParams {
414    pub create_multiple_deposit_addresses_request: models::CreateMultipleDepositAddressesRequest,
415    /// A unique identifier for the request. If the request is sent multiple
416    /// times with the same idempotency key, the server will return the same
417    /// response as the first request. The idempotency key is valid for 24
418    /// hours.
419    pub idempotency_key: Option<String>,
420}
421
422/// struct for passing parameters to the method
423/// [`VaultsApi::create_vault_account`]
424#[derive(Clone, Debug)]
425#[cfg_attr(feature = "bon", derive(::bon::Builder))]
426pub struct CreateVaultAccountParams {
427    pub create_vault_account_request: models::CreateVaultAccountRequest,
428    /// A unique identifier for the request. If the request is sent multiple
429    /// times with the same idempotency key, the server will return the same
430    /// response as the first request. The idempotency key is valid for 24
431    /// hours.
432    pub idempotency_key: Option<String>,
433}
434
435/// struct for passing parameters to the method
436/// [`VaultsApi::create_vault_account_asset`]
437#[derive(Clone, Debug)]
438#[cfg_attr(feature = "bon", derive(::bon::Builder))]
439pub struct CreateVaultAccountAssetParams {
440    /// The ID of the vault account to return, or 'default' for the default
441    /// vault account
442    pub vault_account_id: String,
443    /// The ID of the asset
444    pub asset_id: String,
445    /// A unique identifier for the request. If the request is sent multiple
446    /// times with the same idempotency key, the server will return the same
447    /// response as the first request. The idempotency key is valid for 24
448    /// hours.
449    pub idempotency_key: Option<String>,
450    pub create_assets_request: Option<models::CreateAssetsRequest>,
451}
452
453/// struct for passing parameters to the method
454/// [`VaultsApi::create_vault_account_asset_address`]
455#[derive(Clone, Debug)]
456#[cfg_attr(feature = "bon", derive(::bon::Builder))]
457pub struct CreateVaultAccountAssetAddressParams {
458    /// The ID of the vault account to return
459    pub vault_account_id: String,
460    /// The ID of the asset
461    pub asset_id: String,
462    /// A unique identifier for the request. If the request is sent multiple
463    /// times with the same idempotency key, the server will return the same
464    /// response as the first request. The idempotency key is valid for 24
465    /// hours.
466    pub idempotency_key: Option<String>,
467    pub create_address_request: Option<models::CreateAddressRequest>,
468}
469
470/// struct for passing parameters to the method
471/// [`VaultsApi::detach_tags_from_vault_accounts`]
472#[derive(Clone, Debug)]
473#[cfg_attr(feature = "bon", derive(::bon::Builder))]
474pub struct DetachTagsFromVaultAccountsParams {
475    pub vault_accounts_tag_attachments_request: models::VaultAccountsTagAttachmentsRequest,
476    /// A unique identifier for the request. If the request is sent multiple
477    /// times with the same idempotency key, the server will return the same
478    /// response as the first request. The idempotency key is valid for 24
479    /// hours.
480    pub idempotency_key: Option<String>,
481}
482
483/// struct for passing parameters to the method [`VaultsApi::get_asset_wallets`]
484#[derive(Clone, Debug)]
485#[cfg_attr(feature = "bon", derive(::bon::Builder))]
486pub struct GetAssetWalletsParams {
487    /// When specified, only vault wallets with total balance greater than this
488    /// amount are returned.
489    pub total_amount_larger_than: Option<f64>,
490    /// When specified, only vault wallets with the specified ID are returned.
491    pub asset_id: Option<String>,
492    pub order_by: Option<String>,
493    /// Fetches the next paginated response before this element.  This element
494    /// is a cursor and is returned at the response of the previous page.
495    pub before: Option<String>,
496    /// Fetches the next paginated response after this element. This element is
497    /// a cursor and is returned at the response of the previous page.
498    pub after: Option<String>,
499    /// The maximum number of vault wallets in a single response.   The default
500    /// is 200 and the maximum is 1000.
501    pub limit: Option<f64>,
502}
503
504/// struct for passing parameters to the method
505/// [`VaultsApi::get_create_multiple_deposit_addresses_job_status`]
506#[derive(Clone, Debug)]
507#[cfg_attr(feature = "bon", derive(::bon::Builder))]
508pub struct GetCreateMultipleDepositAddressesJobStatusParams {
509    /// The ID of the job to create addresses
510    pub job_id: String,
511}
512
513/// struct for passing parameters to the method
514/// [`VaultsApi::get_create_multiple_vault_accounts_job_status`]
515#[derive(Clone, Debug)]
516#[cfg_attr(feature = "bon", derive(::bon::Builder))]
517pub struct GetCreateMultipleVaultAccountsJobStatusParams {
518    /// The ID of the job to create addresses
519    pub job_id: String,
520}
521
522/// struct for passing parameters to the method
523/// [`VaultsApi::get_max_spendable_amount`]
524#[derive(Clone, Debug)]
525#[cfg_attr(feature = "bon", derive(::bon::Builder))]
526pub struct GetMaxSpendableAmountParams {
527    /// The ID of the vault account, or 'default' for the default vault account
528    pub vault_account_id: String,
529    /// The ID of the asset
530    pub asset_id: String,
531    /// False by default. The maximum number of inputs depends on whether the
532    /// transaction will be signed by an automated co-signer server or on a
533    /// mobile device.
534    pub manual_signing: Option<bool>,
535}
536
537/// struct for passing parameters to the method
538/// [`VaultsApi::get_paged_vault_accounts`]
539#[derive(Clone, Debug)]
540#[cfg_attr(feature = "bon", derive(::bon::Builder))]
541pub struct GetPagedVaultAccountsParams {
542    pub name_prefix: Option<String>,
543    pub name_suffix: Option<String>,
544    /// Specifying minAmountThreshold will filter accounts with balances greater
545    /// than this value, otherwise, it will return all accounts. The amount set
546    /// in this parameter is the native asset amount and not its USD value.
547    pub min_amount_threshold: Option<f64>,
548    pub asset_id: Option<String>,
549    pub order_by: Option<String>,
550    pub before: Option<String>,
551    pub after: Option<String>,
552    pub limit: Option<f64>,
553    /// List of tag IDs to filter vault accounts.
554    pub tag_ids: Option<Vec<uuid::Uuid>>,
555}
556
557/// struct for passing parameters to the method
558/// [`VaultsApi::get_public_key_info`]
559#[derive(Clone, Debug)]
560#[cfg_attr(feature = "bon", derive(::bon::Builder))]
561pub struct GetPublicKeyInfoParams {
562    /// An array of integers representing the full BIP44 derivation path of the
563    /// requested public key.  The first element must always be 44.
564    pub derivation_path: Vec<i32>,
565    pub algorithm: String,
566    pub compressed: Option<bool>,
567}
568
569/// struct for passing parameters to the method
570/// [`VaultsApi::get_public_key_info_for_address`]
571#[derive(Clone, Debug)]
572#[cfg_attr(feature = "bon", derive(::bon::Builder))]
573pub struct GetPublicKeyInfoForAddressParams {
574    pub vault_account_id: String,
575    pub asset_id: String,
576    /// BIP44 derivation path - change value
577    pub change: f64,
578    /// BIP44 derivation path - index value
579    pub address_index: f64,
580    /// Compressed/Uncompressed public key format
581    pub compressed: Option<bool>,
582}
583
584/// struct for passing parameters to the method
585/// [`VaultsApi::get_unspent_inputs`]
586#[derive(Clone, Debug)]
587#[cfg_attr(feature = "bon", derive(::bon::Builder))]
588pub struct GetUnspentInputsParams {
589    /// The ID of the vault account
590    pub vault_account_id: String,
591    /// The ID of the asset
592    pub asset_id: String,
593}
594
595/// struct for passing parameters to the method [`VaultsApi::get_vault_account`]
596#[derive(Clone, Debug)]
597#[cfg_attr(feature = "bon", derive(::bon::Builder))]
598pub struct GetVaultAccountParams {
599    /// The ID of the vault account
600    pub vault_account_id: String,
601}
602
603/// struct for passing parameters to the method
604/// [`VaultsApi::get_vault_account_asset`]
605#[derive(Clone, Debug)]
606#[cfg_attr(feature = "bon", derive(::bon::Builder))]
607pub struct GetVaultAccountAssetParams {
608    /// The ID of the vault account
609    pub vault_account_id: String,
610    /// The ID of the asset
611    pub asset_id: String,
612}
613
614/// struct for passing parameters to the method
615/// [`VaultsApi::get_vault_account_asset_addresses`]
616#[derive(Clone, Debug)]
617#[cfg_attr(feature = "bon", derive(::bon::Builder))]
618pub struct GetVaultAccountAssetAddressesParams {
619    /// The ID of the vault account to return
620    pub vault_account_id: String,
621    /// The ID of the asset
622    pub asset_id: String,
623}
624
625/// struct for passing parameters to the method
626/// [`VaultsApi::get_vault_account_asset_addresses_paginated`]
627#[derive(Clone, Debug)]
628#[cfg_attr(feature = "bon", derive(::bon::Builder))]
629pub struct GetVaultAccountAssetAddressesPaginatedParams {
630    /// The ID of the vault account to return
631    pub vault_account_id: String,
632    /// The ID of the asset
633    pub asset_id: String,
634    /// Limit the number of results per page
635    pub limit: Option<f64>,
636    /// Cursor string for the previous page
637    pub before: Option<String>,
638    /// Cursor string for the next page
639    pub after: Option<String>,
640}
641
642/// struct for passing parameters to the method [`VaultsApi::get_vault_assets`]
643#[derive(Clone, Debug)]
644#[cfg_attr(feature = "bon", derive(::bon::Builder))]
645pub struct GetVaultAssetsParams {
646    pub account_name_prefix: Option<String>,
647    pub account_name_suffix: Option<String>,
648}
649
650/// struct for passing parameters to the method
651/// [`VaultsApi::get_vault_balance_by_asset`]
652#[derive(Clone, Debug)]
653#[cfg_attr(feature = "bon", derive(::bon::Builder))]
654pub struct GetVaultBalanceByAssetParams {
655    pub asset_id: String,
656}
657
658/// struct for passing parameters to the method
659/// [`VaultsApi::hide_vault_account`]
660#[derive(Clone, Debug)]
661#[cfg_attr(feature = "bon", derive(::bon::Builder))]
662pub struct HideVaultAccountParams {
663    /// The vault account to hide
664    pub vault_account_id: String,
665    /// A unique identifier for the request. If the request is sent multiple
666    /// times with the same idempotency key, the server will return the same
667    /// response as the first request. The idempotency key is valid for 24
668    /// hours.
669    pub idempotency_key: Option<String>,
670}
671
672/// struct for passing parameters to the method
673/// [`VaultsApi::set_customer_ref_id_for_address`]
674#[derive(Clone, Debug)]
675#[cfg_attr(feature = "bon", derive(::bon::Builder))]
676pub struct SetCustomerRefIdForAddressParams {
677    /// The ID of the vault account
678    pub vault_account_id: String,
679    /// The ID of the asset
680    pub asset_id: String,
681    /// The address for which to add a description. For XRP, use
682    /// <address>:<tag>, for all other assets, use only the address
683    pub address_id: String,
684    pub set_customer_ref_id_for_address_request: models::SetCustomerRefIdForAddressRequest,
685    /// A unique identifier for the request. If the request is sent multiple
686    /// times with the same idempotency key, the server will return the same
687    /// response as the first request. The idempotency key is valid for 24
688    /// hours.
689    pub idempotency_key: Option<String>,
690}
691
692/// struct for passing parameters to the method
693/// [`VaultsApi::set_vault_account_auto_fuel`]
694#[derive(Clone, Debug)]
695#[cfg_attr(feature = "bon", derive(::bon::Builder))]
696pub struct SetVaultAccountAutoFuelParams {
697    /// The vault account ID
698    pub vault_account_id: String,
699    pub set_auto_fuel_request: models::SetAutoFuelRequest,
700    /// A unique identifier for the request. If the request is sent multiple
701    /// times with the same idempotency key, the server will return the same
702    /// response as the first request. The idempotency key is valid for 24
703    /// hours.
704    pub idempotency_key: Option<String>,
705}
706
707/// struct for passing parameters to the method
708/// [`VaultsApi::set_vault_account_customer_ref_id`]
709#[derive(Clone, Debug)]
710#[cfg_attr(feature = "bon", derive(::bon::Builder))]
711pub struct SetVaultAccountCustomerRefIdParams {
712    /// The vault account ID
713    pub vault_account_id: String,
714    pub set_customer_ref_id_request: models::SetCustomerRefIdRequest,
715    /// A unique identifier for the request. If the request is sent multiple
716    /// times with the same idempotency key, the server will return the same
717    /// response as the first request. The idempotency key is valid for 24
718    /// hours.
719    pub idempotency_key: Option<String>,
720}
721
722/// struct for passing parameters to the method
723/// [`VaultsApi::unhide_vault_account`]
724#[derive(Clone, Debug)]
725#[cfg_attr(feature = "bon", derive(::bon::Builder))]
726pub struct UnhideVaultAccountParams {
727    /// The vault account to unhide
728    pub vault_account_id: String,
729    /// A unique identifier for the request. If the request is sent multiple
730    /// times with the same idempotency key, the server will return the same
731    /// response as the first request. The idempotency key is valid for 24
732    /// hours.
733    pub idempotency_key: Option<String>,
734}
735
736/// struct for passing parameters to the method
737/// [`VaultsApi::update_vault_account`]
738#[derive(Clone, Debug)]
739#[cfg_attr(feature = "bon", derive(::bon::Builder))]
740pub struct UpdateVaultAccountParams {
741    /// The ID of the vault account
742    pub vault_account_id: String,
743    pub update_vault_account_request: models::UpdateVaultAccountRequest,
744    /// A unique identifier for the request. If the request is sent multiple
745    /// times with the same idempotency key, the server will return the same
746    /// response as the first request. The idempotency key is valid for 24
747    /// hours.
748    pub idempotency_key: Option<String>,
749}
750
751/// struct for passing parameters to the method
752/// [`VaultsApi::update_vault_account_asset_address`]
753#[derive(Clone, Debug)]
754#[cfg_attr(feature = "bon", derive(::bon::Builder))]
755pub struct UpdateVaultAccountAssetAddressParams {
756    /// The ID of the vault account
757    pub vault_account_id: String,
758    /// The ID of the asset
759    pub asset_id: String,
760    /// The address for which to add a description. For XRP, use
761    /// <address>:<tag>, for all other assets, use only the address
762    pub address_id: String,
763    /// A unique identifier for the request. If the request is sent multiple
764    /// times with the same idempotency key, the server will return the same
765    /// response as the first request. The idempotency key is valid for 24
766    /// hours.
767    pub idempotency_key: Option<String>,
768    pub update_vault_account_asset_address_request:
769        Option<models::UpdateVaultAccountAssetAddressRequest>,
770}
771
772/// struct for passing parameters to the method
773/// [`VaultsApi::update_vault_account_asset_balance`]
774#[derive(Clone, Debug)]
775#[cfg_attr(feature = "bon", derive(::bon::Builder))]
776pub struct UpdateVaultAccountAssetBalanceParams {
777    /// The ID of the vault account to return
778    pub vault_account_id: String,
779    /// The ID of the asset
780    pub asset_id: String,
781    /// A unique identifier for the request. If the request is sent multiple
782    /// times with the same idempotency key, the server will return the same
783    /// response as the first request. The idempotency key is valid for 24
784    /// hours.
785    pub idempotency_key: Option<String>,
786}
787
788#[async_trait]
789impl VaultsApi for VaultsApiClient {
790    /// Initiates activation for a wallet in a vault account.  Activation is
791    /// required for tokens that need an on-chain transaction for creation (XLM
792    /// tokens, SOL tokens etc). </br>Endpoint Permission: Admin, Non-Signing
793    /// Admin, Signer, Approver, Editor.
794    async fn activate_asset_for_vault_account(
795        &self,
796        params: ActivateAssetForVaultAccountParams,
797    ) -> Result<models::CreateVaultAssetResponse, Error<ActivateAssetForVaultAccountError>> {
798        let ActivateAssetForVaultAccountParams {
799            vault_account_id,
800            asset_id,
801            idempotency_key,
802        } = params;
803
804        let local_var_configuration = &self.configuration;
805
806        let local_var_client = &local_var_configuration.client;
807
808        let local_var_uri_str = format!(
809            "{}/vault/accounts/{vaultAccountId}/{assetId}/activate",
810            local_var_configuration.base_path,
811            vaultAccountId = crate::apis::urlencode(vault_account_id),
812            assetId = crate::apis::urlencode(asset_id)
813        );
814        let mut local_var_req_builder =
815            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
816
817        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
818            local_var_req_builder = local_var_req_builder
819                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
820        }
821        if let Some(local_var_param_value) = idempotency_key {
822            local_var_req_builder =
823                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
824        }
825
826        let local_var_req = local_var_req_builder.build()?;
827        let local_var_resp = local_var_client.execute(local_var_req).await?;
828
829        let local_var_status = local_var_resp.status();
830        let local_var_content_type = local_var_resp
831            .headers()
832            .get("content-type")
833            .and_then(|v| v.to_str().ok())
834            .unwrap_or("application/octet-stream");
835        let local_var_content_type = super::ContentType::from(local_var_content_type);
836        let local_var_content = local_var_resp.text().await?;
837
838        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
839            match local_var_content_type {
840                ContentType::Json => {
841                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
842                }
843                ContentType::Text => {
844                    return Err(Error::from(serde_json::Error::custom(
845                        "Received `text/plain` content type response that cannot be converted to \
846                         `models::CreateVaultAssetResponse`",
847                    )));
848                }
849                ContentType::Unsupported(local_var_unknown_type) => {
850                    return Err(Error::from(serde_json::Error::custom(format!(
851                        "Received `{local_var_unknown_type}` content type response that cannot be \
852                         converted to `models::CreateVaultAssetResponse`"
853                    ))));
854                }
855            }
856        } else {
857            let local_var_entity: Option<ActivateAssetForVaultAccountError> =
858                serde_json::from_str(&local_var_content).ok();
859            let local_var_error = ResponseContent {
860                status: local_var_status,
861                content: local_var_content,
862                entity: local_var_entity,
863            };
864            Err(Error::ResponseError(local_var_error))
865        }
866    }
867
868    /// Attach one or more tags to the requested vault accounts.
869    async fn attach_tags_to_vault_accounts(
870        &self,
871        params: AttachTagsToVaultAccountsParams,
872    ) -> Result<(), Error<AttachTagsToVaultAccountsError>> {
873        let AttachTagsToVaultAccountsParams {
874            vault_accounts_tag_attachments_request,
875            idempotency_key,
876        } = params;
877
878        let local_var_configuration = &self.configuration;
879
880        let local_var_client = &local_var_configuration.client;
881
882        let local_var_uri_str = format!(
883            "{}/vault/accounts/attached/tags/attach",
884            local_var_configuration.base_path
885        );
886        let mut local_var_req_builder =
887            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
888
889        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
890            local_var_req_builder = local_var_req_builder
891                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
892        }
893        if let Some(local_var_param_value) = idempotency_key {
894            local_var_req_builder =
895                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
896        }
897        local_var_req_builder = local_var_req_builder.json(&vault_accounts_tag_attachments_request);
898
899        let local_var_req = local_var_req_builder.build()?;
900        let local_var_resp = local_var_client.execute(local_var_req).await?;
901
902        let local_var_status = local_var_resp.status();
903        let local_var_content = local_var_resp.text().await?;
904
905        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
906            Ok(())
907        } else {
908            let local_var_entity: Option<AttachTagsToVaultAccountsError> =
909                serde_json::from_str(&local_var_content).ok();
910            let local_var_error = ResponseContent {
911                status: local_var_status,
912                content: local_var_content,
913                entity: local_var_entity,
914            };
915            Err(Error::ResponseError(local_var_error))
916        }
917    }
918
919    /// Converts an existing segwit address to the legacy format. </br>Endpoint
920    /// Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
921    async fn create_legacy_address(
922        &self,
923        params: CreateLegacyAddressParams,
924    ) -> Result<models::CreateAddressResponse, Error<CreateLegacyAddressError>> {
925        let CreateLegacyAddressParams {
926            vault_account_id,
927            asset_id,
928            address_id,
929            idempotency_key,
930        } = params;
931
932        let local_var_configuration = &self.configuration;
933
934        let local_var_client = &local_var_configuration.client;
935
936        let local_var_uri_str = format!(
937            "{}/vault/accounts/{vaultAccountId}/{assetId}/addresses/{addressId}/create_legacy",
938            local_var_configuration.base_path,
939            vaultAccountId = crate::apis::urlencode(vault_account_id),
940            assetId = crate::apis::urlencode(asset_id),
941            addressId = crate::apis::urlencode(address_id)
942        );
943        let mut local_var_req_builder =
944            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
945
946        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
947            local_var_req_builder = local_var_req_builder
948                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
949        }
950        if let Some(local_var_param_value) = idempotency_key {
951            local_var_req_builder =
952                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
953        }
954
955        let local_var_req = local_var_req_builder.build()?;
956        let local_var_resp = local_var_client.execute(local_var_req).await?;
957
958        let local_var_status = local_var_resp.status();
959        let local_var_content_type = local_var_resp
960            .headers()
961            .get("content-type")
962            .and_then(|v| v.to_str().ok())
963            .unwrap_or("application/octet-stream");
964        let local_var_content_type = super::ContentType::from(local_var_content_type);
965        let local_var_content = local_var_resp.text().await?;
966
967        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
968            match local_var_content_type {
969                ContentType::Json => {
970                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
971                }
972                ContentType::Text => {
973                    return Err(Error::from(serde_json::Error::custom(
974                        "Received `text/plain` content type response that cannot be converted to \
975                         `models::CreateAddressResponse`",
976                    )));
977                }
978                ContentType::Unsupported(local_var_unknown_type) => {
979                    return Err(Error::from(serde_json::Error::custom(format!(
980                        "Received `{local_var_unknown_type}` content type response that cannot be \
981                         converted to `models::CreateAddressResponse`"
982                    ))));
983                }
984            }
985        } else {
986            let local_var_entity: Option<CreateLegacyAddressError> =
987                serde_json::from_str(&local_var_content).ok();
988            let local_var_error = ResponseContent {
989                status: local_var_status,
990                content: local_var_content,
991                entity: local_var_entity,
992            };
993            Err(Error::ResponseError(local_var_error))
994        }
995    }
996
997    /// Create multiple vault accounts by running an async job.       - The
998    /// HBAR, TON, SUI, TERRA, ALGO, and DOT blockchains are not supported. -
999    /// Limited to a maximum of 10,000 accounts per operation.  **Endpoint
1000    /// Permissions:** Admin, Non-Signing Admin, Signer, Approver, Editor.
1001    async fn create_multiple_accounts(
1002        &self,
1003        params: CreateMultipleAccountsParams,
1004    ) -> Result<models::JobCreated, Error<CreateMultipleAccountsError>> {
1005        let CreateMultipleAccountsParams {
1006            create_multiple_accounts_request,
1007            idempotency_key,
1008        } = params;
1009
1010        let local_var_configuration = &self.configuration;
1011
1012        let local_var_client = &local_var_configuration.client;
1013
1014        let local_var_uri_str =
1015            format!("{}/vault/accounts/bulk/", local_var_configuration.base_path);
1016        let mut local_var_req_builder =
1017            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1018
1019        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1020            local_var_req_builder = local_var_req_builder
1021                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1022        }
1023        if let Some(local_var_param_value) = idempotency_key {
1024            local_var_req_builder =
1025                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
1026        }
1027        local_var_req_builder = local_var_req_builder.json(&create_multiple_accounts_request);
1028
1029        let local_var_req = local_var_req_builder.build()?;
1030        let local_var_resp = local_var_client.execute(local_var_req).await?;
1031
1032        let local_var_status = local_var_resp.status();
1033        let local_var_content_type = local_var_resp
1034            .headers()
1035            .get("content-type")
1036            .and_then(|v| v.to_str().ok())
1037            .unwrap_or("application/octet-stream");
1038        let local_var_content_type = super::ContentType::from(local_var_content_type);
1039        let local_var_content = local_var_resp.text().await?;
1040
1041        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1042            match local_var_content_type {
1043                ContentType::Json => {
1044                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
1045                }
1046                ContentType::Text => {
1047                    return Err(Error::from(serde_json::Error::custom(
1048                        "Received `text/plain` content type response that cannot be converted to \
1049                         `models::JobCreated`",
1050                    )));
1051                }
1052                ContentType::Unsupported(local_var_unknown_type) => {
1053                    return Err(Error::from(serde_json::Error::custom(format!(
1054                        "Received `{local_var_unknown_type}` content type response that cannot be \
1055                         converted to `models::JobCreated`"
1056                    ))));
1057                }
1058            }
1059        } else {
1060            let local_var_entity: Option<CreateMultipleAccountsError> =
1061                serde_json::from_str(&local_var_content).ok();
1062            let local_var_error = ResponseContent {
1063                status: local_var_status,
1064                content: local_var_content,
1065                entity: local_var_entity,
1066            };
1067            Err(Error::ResponseError(local_var_error))
1068        }
1069    }
1070
1071    /// **For UTXO blockchains only.**  Create multiple deposit addresses by
1072    /// running an async job. - The target Vault account should already have a
1073    /// UTXO asset wallet with a permanent address. - Limited to a maximum of
1074    /// 10,000 addresses per operation. Use multiple operations for the same
1075    /// Vault account/permanent address if needed.  **Endpoint Permissions:**
1076    /// Admin, Non-Signing Admin.
1077    async fn create_multiple_deposit_addresses(
1078        &self,
1079        params: CreateMultipleDepositAddressesParams,
1080    ) -> Result<models::JobCreated, Error<CreateMultipleDepositAddressesError>> {
1081        let CreateMultipleDepositAddressesParams {
1082            create_multiple_deposit_addresses_request,
1083            idempotency_key,
1084        } = params;
1085
1086        let local_var_configuration = &self.configuration;
1087
1088        let local_var_client = &local_var_configuration.client;
1089
1090        let local_var_uri_str = format!(
1091            "{}/vault/accounts/addresses/bulk",
1092            local_var_configuration.base_path
1093        );
1094        let mut local_var_req_builder =
1095            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1096
1097        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1098            local_var_req_builder = local_var_req_builder
1099                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1100        }
1101        if let Some(local_var_param_value) = idempotency_key {
1102            local_var_req_builder =
1103                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
1104        }
1105        local_var_req_builder =
1106            local_var_req_builder.json(&create_multiple_deposit_addresses_request);
1107
1108        let local_var_req = local_var_req_builder.build()?;
1109        let local_var_resp = local_var_client.execute(local_var_req).await?;
1110
1111        let local_var_status = local_var_resp.status();
1112        let local_var_content_type = local_var_resp
1113            .headers()
1114            .get("content-type")
1115            .and_then(|v| v.to_str().ok())
1116            .unwrap_or("application/octet-stream");
1117        let local_var_content_type = super::ContentType::from(local_var_content_type);
1118        let local_var_content = local_var_resp.text().await?;
1119
1120        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1121            match local_var_content_type {
1122                ContentType::Json => {
1123                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
1124                }
1125                ContentType::Text => {
1126                    return Err(Error::from(serde_json::Error::custom(
1127                        "Received `text/plain` content type response that cannot be converted to \
1128                         `models::JobCreated`",
1129                    )));
1130                }
1131                ContentType::Unsupported(local_var_unknown_type) => {
1132                    return Err(Error::from(serde_json::Error::custom(format!(
1133                        "Received `{local_var_unknown_type}` content type response that cannot be \
1134                         converted to `models::JobCreated`"
1135                    ))));
1136                }
1137            }
1138        } else {
1139            let local_var_entity: Option<CreateMultipleDepositAddressesError> =
1140                serde_json::from_str(&local_var_content).ok();
1141            let local_var_error = ResponseContent {
1142                status: local_var_status,
1143                content: local_var_content,
1144                entity: local_var_entity,
1145            };
1146            Err(Error::ResponseError(local_var_error))
1147        }
1148    }
1149
1150    /// Creates a new vault account with the requested name. **Note: ** Vault account names should consist of ASCII characters only. Learn more about Fireblocks Vault Accounts in the following [guide](https://developers.fireblocks.com/reference/create-vault-account). </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
1151    async fn create_vault_account(
1152        &self,
1153        params: CreateVaultAccountParams,
1154    ) -> Result<models::VaultAccount, Error<CreateVaultAccountError>> {
1155        let CreateVaultAccountParams {
1156            create_vault_account_request,
1157            idempotency_key,
1158        } = params;
1159
1160        let local_var_configuration = &self.configuration;
1161
1162        let local_var_client = &local_var_configuration.client;
1163
1164        let local_var_uri_str = format!("{}/vault/accounts", local_var_configuration.base_path);
1165        let mut local_var_req_builder =
1166            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1167
1168        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1169            local_var_req_builder = local_var_req_builder
1170                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1171        }
1172        if let Some(local_var_param_value) = idempotency_key {
1173            local_var_req_builder =
1174                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
1175        }
1176        local_var_req_builder = local_var_req_builder.json(&create_vault_account_request);
1177
1178        let local_var_req = local_var_req_builder.build()?;
1179        let local_var_resp = local_var_client.execute(local_var_req).await?;
1180
1181        let local_var_status = local_var_resp.status();
1182        let local_var_content_type = local_var_resp
1183            .headers()
1184            .get("content-type")
1185            .and_then(|v| v.to_str().ok())
1186            .unwrap_or("application/octet-stream");
1187        let local_var_content_type = super::ContentType::from(local_var_content_type);
1188        let local_var_content = local_var_resp.text().await?;
1189
1190        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1191            match local_var_content_type {
1192                ContentType::Json => {
1193                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
1194                }
1195                ContentType::Text => {
1196                    return Err(Error::from(serde_json::Error::custom(
1197                        "Received `text/plain` content type response that cannot be converted to \
1198                         `models::VaultAccount`",
1199                    )));
1200                }
1201                ContentType::Unsupported(local_var_unknown_type) => {
1202                    return Err(Error::from(serde_json::Error::custom(format!(
1203                        "Received `{local_var_unknown_type}` content type response that cannot be \
1204                         converted to `models::VaultAccount`"
1205                    ))));
1206                }
1207            }
1208        } else {
1209            let local_var_entity: Option<CreateVaultAccountError> =
1210                serde_json::from_str(&local_var_content).ok();
1211            let local_var_error = ResponseContent {
1212                status: local_var_status,
1213                content: local_var_content,
1214                entity: local_var_entity,
1215            };
1216            Err(Error::ResponseError(local_var_error))
1217        }
1218    }
1219
1220    /// Creates a wallet for a specific asset in a vault account. Learn more about Fireblocks Vault Wallets in the following [guide](https://developers.fireblocks.com/reference/create-vault-wallet). </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
1221    async fn create_vault_account_asset(
1222        &self,
1223        params: CreateVaultAccountAssetParams,
1224    ) -> Result<models::CreateVaultAssetResponse, Error<CreateVaultAccountAssetError>> {
1225        let CreateVaultAccountAssetParams {
1226            vault_account_id,
1227            asset_id,
1228            idempotency_key,
1229            create_assets_request,
1230        } = params;
1231
1232        let local_var_configuration = &self.configuration;
1233
1234        let local_var_client = &local_var_configuration.client;
1235
1236        let local_var_uri_str = format!(
1237            "{}/vault/accounts/{vaultAccountId}/{assetId}",
1238            local_var_configuration.base_path,
1239            vaultAccountId = crate::apis::urlencode(vault_account_id),
1240            assetId = crate::apis::urlencode(asset_id)
1241        );
1242        let mut local_var_req_builder =
1243            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1244
1245        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1246            local_var_req_builder = local_var_req_builder
1247                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1248        }
1249        if let Some(local_var_param_value) = idempotency_key {
1250            local_var_req_builder =
1251                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
1252        }
1253        local_var_req_builder = local_var_req_builder.json(&create_assets_request);
1254
1255        let local_var_req = local_var_req_builder.build()?;
1256        let local_var_resp = local_var_client.execute(local_var_req).await?;
1257
1258        let local_var_status = local_var_resp.status();
1259        let local_var_content_type = local_var_resp
1260            .headers()
1261            .get("content-type")
1262            .and_then(|v| v.to_str().ok())
1263            .unwrap_or("application/octet-stream");
1264        let local_var_content_type = super::ContentType::from(local_var_content_type);
1265        let local_var_content = local_var_resp.text().await?;
1266
1267        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1268            match local_var_content_type {
1269                ContentType::Json => {
1270                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
1271                }
1272                ContentType::Text => {
1273                    return Err(Error::from(serde_json::Error::custom(
1274                        "Received `text/plain` content type response that cannot be converted to \
1275                         `models::CreateVaultAssetResponse`",
1276                    )));
1277                }
1278                ContentType::Unsupported(local_var_unknown_type) => {
1279                    return Err(Error::from(serde_json::Error::custom(format!(
1280                        "Received `{local_var_unknown_type}` content type response that cannot be \
1281                         converted to `models::CreateVaultAssetResponse`"
1282                    ))));
1283                }
1284            }
1285        } else {
1286            let local_var_entity: Option<CreateVaultAccountAssetError> =
1287                serde_json::from_str(&local_var_content).ok();
1288            let local_var_error = ResponseContent {
1289                status: local_var_status,
1290                content: local_var_content,
1291                entity: local_var_entity,
1292            };
1293            Err(Error::ResponseError(local_var_error))
1294        }
1295    }
1296
1297    /// Creates a new deposit address for an asset of a vault account. Should be
1298    /// used for UTXO or Tag/Memo based assets ONLY.  Requests with account
1299    /// based assets will fail.  </br>Endpoint Permission: Admin, Non-Signing
1300    /// Admin.
1301    async fn create_vault_account_asset_address(
1302        &self,
1303        params: CreateVaultAccountAssetAddressParams,
1304    ) -> Result<models::CreateAddressResponse, Error<CreateVaultAccountAssetAddressError>> {
1305        let CreateVaultAccountAssetAddressParams {
1306            vault_account_id,
1307            asset_id,
1308            idempotency_key,
1309            create_address_request,
1310        } = params;
1311
1312        let local_var_configuration = &self.configuration;
1313
1314        let local_var_client = &local_var_configuration.client;
1315
1316        let local_var_uri_str = format!(
1317            "{}/vault/accounts/{vaultAccountId}/{assetId}/addresses",
1318            local_var_configuration.base_path,
1319            vaultAccountId = crate::apis::urlencode(vault_account_id),
1320            assetId = crate::apis::urlencode(asset_id)
1321        );
1322        let mut local_var_req_builder =
1323            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1324
1325        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1326            local_var_req_builder = local_var_req_builder
1327                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1328        }
1329        if let Some(local_var_param_value) = idempotency_key {
1330            local_var_req_builder =
1331                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
1332        }
1333        local_var_req_builder = local_var_req_builder.json(&create_address_request);
1334
1335        let local_var_req = local_var_req_builder.build()?;
1336        let local_var_resp = local_var_client.execute(local_var_req).await?;
1337
1338        let local_var_status = local_var_resp.status();
1339        let local_var_content_type = local_var_resp
1340            .headers()
1341            .get("content-type")
1342            .and_then(|v| v.to_str().ok())
1343            .unwrap_or("application/octet-stream");
1344        let local_var_content_type = super::ContentType::from(local_var_content_type);
1345        let local_var_content = local_var_resp.text().await?;
1346
1347        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1348            match local_var_content_type {
1349                ContentType::Json => {
1350                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
1351                }
1352                ContentType::Text => {
1353                    return Err(Error::from(serde_json::Error::custom(
1354                        "Received `text/plain` content type response that cannot be converted to \
1355                         `models::CreateAddressResponse`",
1356                    )));
1357                }
1358                ContentType::Unsupported(local_var_unknown_type) => {
1359                    return Err(Error::from(serde_json::Error::custom(format!(
1360                        "Received `{local_var_unknown_type}` content type response that cannot be \
1361                         converted to `models::CreateAddressResponse`"
1362                    ))));
1363                }
1364            }
1365        } else {
1366            let local_var_entity: Option<CreateVaultAccountAssetAddressError> =
1367                serde_json::from_str(&local_var_content).ok();
1368            let local_var_error = ResponseContent {
1369                status: local_var_status,
1370                content: local_var_content,
1371                entity: local_var_entity,
1372            };
1373            Err(Error::ResponseError(local_var_error))
1374        }
1375    }
1376
1377    /// Detach one or more tags from the requested vault account.
1378    async fn detach_tags_from_vault_accounts(
1379        &self,
1380        params: DetachTagsFromVaultAccountsParams,
1381    ) -> Result<(), Error<DetachTagsFromVaultAccountsError>> {
1382        let DetachTagsFromVaultAccountsParams {
1383            vault_accounts_tag_attachments_request,
1384            idempotency_key,
1385        } = params;
1386
1387        let local_var_configuration = &self.configuration;
1388
1389        let local_var_client = &local_var_configuration.client;
1390
1391        let local_var_uri_str = format!(
1392            "{}/vault/accounts/attached/tags/detached",
1393            local_var_configuration.base_path
1394        );
1395        let mut local_var_req_builder =
1396            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1397
1398        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1399            local_var_req_builder = local_var_req_builder
1400                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1401        }
1402        if let Some(local_var_param_value) = idempotency_key {
1403            local_var_req_builder =
1404                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
1405        }
1406        local_var_req_builder = local_var_req_builder.json(&vault_accounts_tag_attachments_request);
1407
1408        let local_var_req = local_var_req_builder.build()?;
1409        let local_var_resp = local_var_client.execute(local_var_req).await?;
1410
1411        let local_var_status = local_var_resp.status();
1412        let local_var_content = local_var_resp.text().await?;
1413
1414        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1415            Ok(())
1416        } else {
1417            let local_var_entity: Option<DetachTagsFromVaultAccountsError> =
1418                serde_json::from_str(&local_var_content).ok();
1419            let local_var_error = ResponseContent {
1420                status: local_var_status,
1421                content: local_var_content,
1422                entity: local_var_entity,
1423            };
1424            Err(Error::ResponseError(local_var_error))
1425        }
1426    }
1427
1428    /// Get all vault wallets of the vault accounts in your workspace.  A vault
1429    /// wallet is an asset in a vault account.   This method allows fast
1430    /// traversal of all account balances. </br>Endpoint Permission: Admin,
1431    /// Non-Signing Admin, Signer, Approver, Editor, Viewer.
1432    async fn get_asset_wallets(
1433        &self,
1434        params: GetAssetWalletsParams,
1435    ) -> Result<models::PaginatedAssetWalletResponse, Error<GetAssetWalletsError>> {
1436        let GetAssetWalletsParams {
1437            total_amount_larger_than,
1438            asset_id,
1439            order_by,
1440            before,
1441            after,
1442            limit,
1443        } = params;
1444
1445        let local_var_configuration = &self.configuration;
1446
1447        let local_var_client = &local_var_configuration.client;
1448
1449        let local_var_uri_str =
1450            format!("{}/vault/asset_wallets", local_var_configuration.base_path);
1451        let mut local_var_req_builder =
1452            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1453
1454        if let Some(ref param_value) = total_amount_larger_than {
1455            local_var_req_builder =
1456                local_var_req_builder.query(&[("totalAmountLargerThan", &param_value.to_string())]);
1457        }
1458        if let Some(ref param_value) = asset_id {
1459            local_var_req_builder =
1460                local_var_req_builder.query(&[("assetId", &param_value.to_string())]);
1461        }
1462        if let Some(ref param_value) = order_by {
1463            local_var_req_builder =
1464                local_var_req_builder.query(&[("orderBy", &param_value.to_string())]);
1465        }
1466        if let Some(ref param_value) = before {
1467            local_var_req_builder =
1468                local_var_req_builder.query(&[("before", &param_value.to_string())]);
1469        }
1470        if let Some(ref param_value) = after {
1471            local_var_req_builder =
1472                local_var_req_builder.query(&[("after", &param_value.to_string())]);
1473        }
1474        if let Some(ref param_value) = limit {
1475            local_var_req_builder =
1476                local_var_req_builder.query(&[("limit", &param_value.to_string())]);
1477        }
1478        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1479            local_var_req_builder = local_var_req_builder
1480                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1481        }
1482
1483        let local_var_req = local_var_req_builder.build()?;
1484        let local_var_resp = local_var_client.execute(local_var_req).await?;
1485
1486        let local_var_status = local_var_resp.status();
1487        let local_var_content_type = local_var_resp
1488            .headers()
1489            .get("content-type")
1490            .and_then(|v| v.to_str().ok())
1491            .unwrap_or("application/octet-stream");
1492        let local_var_content_type = super::ContentType::from(local_var_content_type);
1493        let local_var_content = local_var_resp.text().await?;
1494
1495        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1496            match local_var_content_type {
1497                ContentType::Json => {
1498                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
1499                }
1500                ContentType::Text => {
1501                    return Err(Error::from(serde_json::Error::custom(
1502                        "Received `text/plain` content type response that cannot be converted to \
1503                         `models::PaginatedAssetWalletResponse`",
1504                    )));
1505                }
1506                ContentType::Unsupported(local_var_unknown_type) => {
1507                    return Err(Error::from(serde_json::Error::custom(format!(
1508                        "Received `{local_var_unknown_type}` content type response that cannot be \
1509                         converted to `models::PaginatedAssetWalletResponse`"
1510                    ))));
1511                }
1512            }
1513        } else {
1514            let local_var_entity: Option<GetAssetWalletsError> =
1515                serde_json::from_str(&local_var_content).ok();
1516            let local_var_error = ResponseContent {
1517                status: local_var_status,
1518                content: local_var_content,
1519                entity: local_var_entity,
1520            };
1521            Err(Error::ResponseError(local_var_error))
1522        }
1523    }
1524
1525    /// Returns the current status of (or an error for) the specified deposit
1526    /// addresss bulk creation job.  **Endpoint Permissions:** Admin,
1527    /// Non-Signing Admin, Signer, Approver, Editor, and Viewer.
1528    async fn get_create_multiple_deposit_addresses_job_status(
1529        &self,
1530        params: GetCreateMultipleDepositAddressesJobStatusParams,
1531    ) -> Result<
1532        models::CreateMultipleDepositAddressesJobStatus,
1533        Error<GetCreateMultipleDepositAddressesJobStatusError>,
1534    > {
1535        let GetCreateMultipleDepositAddressesJobStatusParams { job_id } = params;
1536
1537        let local_var_configuration = &self.configuration;
1538
1539        let local_var_client = &local_var_configuration.client;
1540
1541        let local_var_uri_str = format!(
1542            "{}/vault/accounts/addresses/bulk/{jobId}",
1543            local_var_configuration.base_path,
1544            jobId = crate::apis::urlencode(job_id)
1545        );
1546        let mut local_var_req_builder =
1547            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1548
1549        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1550            local_var_req_builder = local_var_req_builder
1551                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1552        }
1553
1554        let local_var_req = local_var_req_builder.build()?;
1555        let local_var_resp = local_var_client.execute(local_var_req).await?;
1556
1557        let local_var_status = local_var_resp.status();
1558        let local_var_content_type = local_var_resp
1559            .headers()
1560            .get("content-type")
1561            .and_then(|v| v.to_str().ok())
1562            .unwrap_or("application/octet-stream");
1563        let local_var_content_type = super::ContentType::from(local_var_content_type);
1564        let local_var_content = local_var_resp.text().await?;
1565
1566        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1567            match local_var_content_type {
1568                ContentType::Json => {
1569                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
1570                }
1571                ContentType::Text => {
1572                    return Err(Error::from(serde_json::Error::custom(
1573                        "Received `text/plain` content type response that cannot be converted to \
1574                         `models::CreateMultipleDepositAddressesJobStatus`",
1575                    )));
1576                }
1577                ContentType::Unsupported(local_var_unknown_type) => {
1578                    return Err(Error::from(serde_json::Error::custom(format!(
1579                        "Received `{local_var_unknown_type}` content type response that cannot be \
1580                         converted to `models::CreateMultipleDepositAddressesJobStatus`"
1581                    ))));
1582                }
1583            }
1584        } else {
1585            let local_var_entity: Option<GetCreateMultipleDepositAddressesJobStatusError> =
1586                serde_json::from_str(&local_var_content).ok();
1587            let local_var_error = ResponseContent {
1588                status: local_var_status,
1589                content: local_var_content,
1590                entity: local_var_entity,
1591            };
1592            Err(Error::ResponseError(local_var_error))
1593        }
1594    }
1595
1596    /// Returns the current status of (or error for) the specified vault account
1597    /// bulk creation job.  **Endpoint Permissions:** Admin, Non-Signing Admin,
1598    /// Signer, Approver, Editor, Viewer.
1599    async fn get_create_multiple_vault_accounts_job_status(
1600        &self,
1601        params: GetCreateMultipleVaultAccountsJobStatusParams,
1602    ) -> Result<
1603        models::CreateMultipleVaultAccountsJobStatus,
1604        Error<GetCreateMultipleVaultAccountsJobStatusError>,
1605    > {
1606        let GetCreateMultipleVaultAccountsJobStatusParams { job_id } = params;
1607
1608        let local_var_configuration = &self.configuration;
1609
1610        let local_var_client = &local_var_configuration.client;
1611
1612        let local_var_uri_str = format!(
1613            "{}/vault/accounts/bulk/{jobId}",
1614            local_var_configuration.base_path,
1615            jobId = crate::apis::urlencode(job_id)
1616        );
1617        let mut local_var_req_builder =
1618            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1619
1620        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1621            local_var_req_builder = local_var_req_builder
1622                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1623        }
1624
1625        let local_var_req = local_var_req_builder.build()?;
1626        let local_var_resp = local_var_client.execute(local_var_req).await?;
1627
1628        let local_var_status = local_var_resp.status();
1629        let local_var_content_type = local_var_resp
1630            .headers()
1631            .get("content-type")
1632            .and_then(|v| v.to_str().ok())
1633            .unwrap_or("application/octet-stream");
1634        let local_var_content_type = super::ContentType::from(local_var_content_type);
1635        let local_var_content = local_var_resp.text().await?;
1636
1637        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1638            match local_var_content_type {
1639                ContentType::Json => {
1640                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
1641                }
1642                ContentType::Text => {
1643                    return Err(Error::from(serde_json::Error::custom(
1644                        "Received `text/plain` content type response that cannot be converted to \
1645                         `models::CreateMultipleVaultAccountsJobStatus`",
1646                    )));
1647                }
1648                ContentType::Unsupported(local_var_unknown_type) => {
1649                    return Err(Error::from(serde_json::Error::custom(format!(
1650                        "Received `{local_var_unknown_type}` content type response that cannot be \
1651                         converted to `models::CreateMultipleVaultAccountsJobStatus`"
1652                    ))));
1653                }
1654            }
1655        } else {
1656            let local_var_entity: Option<GetCreateMultipleVaultAccountsJobStatusError> =
1657                serde_json::from_str(&local_var_content).ok();
1658            let local_var_error = ResponseContent {
1659                status: local_var_status,
1660                content: local_var_content,
1661                entity: local_var_entity,
1662            };
1663            Err(Error::ResponseError(local_var_error))
1664        }
1665    }
1666
1667    /// **UTXO assets only.**  Retrieve the maximum amount of the specified
1668    /// asset that can be spent in a single transaction from the specified vault
1669    /// account.  **Endpoint Permissions:** Admin, Non-Signing Admin, Signer,
1670    /// Approver, Editor, Viewer.
1671    async fn get_max_spendable_amount(
1672        &self,
1673        params: GetMaxSpendableAmountParams,
1674    ) -> Result<models::GetMaxSpendableAmountResponse, Error<GetMaxSpendableAmountError>> {
1675        let GetMaxSpendableAmountParams {
1676            vault_account_id,
1677            asset_id,
1678            manual_signing,
1679        } = params;
1680
1681        let local_var_configuration = &self.configuration;
1682
1683        let local_var_client = &local_var_configuration.client;
1684
1685        let local_var_uri_str = format!(
1686            "{}/vault/accounts/{vaultAccountId}/{assetId}/max_spendable_amount",
1687            local_var_configuration.base_path,
1688            vaultAccountId = crate::apis::urlencode(vault_account_id),
1689            assetId = crate::apis::urlencode(asset_id)
1690        );
1691        let mut local_var_req_builder =
1692            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1693
1694        if let Some(ref param_value) = manual_signing {
1695            local_var_req_builder =
1696                local_var_req_builder.query(&[("manualSigning", &param_value.to_string())]);
1697        }
1698        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1699            local_var_req_builder = local_var_req_builder
1700                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1701        }
1702
1703        let local_var_req = local_var_req_builder.build()?;
1704        let local_var_resp = local_var_client.execute(local_var_req).await?;
1705
1706        let local_var_status = local_var_resp.status();
1707        let local_var_content_type = local_var_resp
1708            .headers()
1709            .get("content-type")
1710            .and_then(|v| v.to_str().ok())
1711            .unwrap_or("application/octet-stream");
1712        let local_var_content_type = super::ContentType::from(local_var_content_type);
1713        let local_var_content = local_var_resp.text().await?;
1714
1715        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1716            match local_var_content_type {
1717                ContentType::Json => {
1718                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
1719                }
1720                ContentType::Text => {
1721                    return Err(Error::from(serde_json::Error::custom(
1722                        "Received `text/plain` content type response that cannot be converted to \
1723                         `models::GetMaxSpendableAmountResponse`",
1724                    )));
1725                }
1726                ContentType::Unsupported(local_var_unknown_type) => {
1727                    return Err(Error::from(serde_json::Error::custom(format!(
1728                        "Received `{local_var_unknown_type}` content type response that cannot be \
1729                         converted to `models::GetMaxSpendableAmountResponse`"
1730                    ))));
1731                }
1732            }
1733        } else {
1734            let local_var_entity: Option<GetMaxSpendableAmountError> =
1735                serde_json::from_str(&local_var_content).ok();
1736            let local_var_error = ResponseContent {
1737                status: local_var_status,
1738                content: local_var_content,
1739                entity: local_var_entity,
1740            };
1741            Err(Error::ResponseError(local_var_error))
1742        }
1743    }
1744
1745    /// Gets all vault accounts in your workspace. This endpoint returns a
1746    /// limited amount of results with a quick response time. </br>Endpoint
1747    /// Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer.
1748    async fn get_paged_vault_accounts(
1749        &self,
1750        params: GetPagedVaultAccountsParams,
1751    ) -> Result<models::VaultAccountsPagedResponse, Error<GetPagedVaultAccountsError>> {
1752        let GetPagedVaultAccountsParams {
1753            name_prefix,
1754            name_suffix,
1755            min_amount_threshold,
1756            asset_id,
1757            order_by,
1758            before,
1759            after,
1760            limit,
1761            tag_ids,
1762        } = params;
1763
1764        let local_var_configuration = &self.configuration;
1765
1766        let local_var_client = &local_var_configuration.client;
1767
1768        let local_var_uri_str =
1769            format!("{}/vault/accounts_paged", local_var_configuration.base_path);
1770        let mut local_var_req_builder =
1771            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1772
1773        if let Some(ref param_value) = name_prefix {
1774            local_var_req_builder =
1775                local_var_req_builder.query(&[("namePrefix", &param_value.to_string())]);
1776        }
1777        if let Some(ref param_value) = name_suffix {
1778            local_var_req_builder =
1779                local_var_req_builder.query(&[("nameSuffix", &param_value.to_string())]);
1780        }
1781        if let Some(ref param_value) = min_amount_threshold {
1782            local_var_req_builder =
1783                local_var_req_builder.query(&[("minAmountThreshold", &param_value.to_string())]);
1784        }
1785        if let Some(ref param_value) = asset_id {
1786            local_var_req_builder =
1787                local_var_req_builder.query(&[("assetId", &param_value.to_string())]);
1788        }
1789        if let Some(ref param_value) = order_by {
1790            local_var_req_builder =
1791                local_var_req_builder.query(&[("orderBy", &param_value.to_string())]);
1792        }
1793        if let Some(ref param_value) = before {
1794            local_var_req_builder =
1795                local_var_req_builder.query(&[("before", &param_value.to_string())]);
1796        }
1797        if let Some(ref param_value) = after {
1798            local_var_req_builder =
1799                local_var_req_builder.query(&[("after", &param_value.to_string())]);
1800        }
1801        if let Some(ref param_value) = limit {
1802            local_var_req_builder =
1803                local_var_req_builder.query(&[("limit", &param_value.to_string())]);
1804        }
1805        if let Some(ref param_value) = tag_ids {
1806            local_var_req_builder = match "multi" {
1807                "multi" => local_var_req_builder.query(
1808                    &param_value
1809                        .into_iter()
1810                        .map(|p| ("tagIds".to_owned(), p.to_string()))
1811                        .collect::<Vec<(std::string::String, std::string::String)>>(),
1812                ),
1813                _ => local_var_req_builder.query(&[(
1814                    "tagIds",
1815                    &param_value
1816                        .into_iter()
1817                        .map(|p| p.to_string())
1818                        .collect::<Vec<String>>()
1819                        .join(",")
1820                        .to_string(),
1821                )]),
1822            };
1823        }
1824        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1825            local_var_req_builder = local_var_req_builder
1826                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1827        }
1828
1829        let local_var_req = local_var_req_builder.build()?;
1830        let local_var_resp = local_var_client.execute(local_var_req).await?;
1831
1832        let local_var_status = local_var_resp.status();
1833        let local_var_content_type = local_var_resp
1834            .headers()
1835            .get("content-type")
1836            .and_then(|v| v.to_str().ok())
1837            .unwrap_or("application/octet-stream");
1838        let local_var_content_type = super::ContentType::from(local_var_content_type);
1839        let local_var_content = local_var_resp.text().await?;
1840
1841        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1842            match local_var_content_type {
1843                ContentType::Json => {
1844                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
1845                }
1846                ContentType::Text => {
1847                    return Err(Error::from(serde_json::Error::custom(
1848                        "Received `text/plain` content type response that cannot be converted to \
1849                         `models::VaultAccountsPagedResponse`",
1850                    )));
1851                }
1852                ContentType::Unsupported(local_var_unknown_type) => {
1853                    return Err(Error::from(serde_json::Error::custom(format!(
1854                        "Received `{local_var_unknown_type}` content type response that cannot be \
1855                         converted to `models::VaultAccountsPagedResponse`"
1856                    ))));
1857                }
1858            }
1859        } else {
1860            let local_var_entity: Option<GetPagedVaultAccountsError> =
1861                serde_json::from_str(&local_var_content).ok();
1862            let local_var_error = ResponseContent {
1863                status: local_var_status,
1864                content: local_var_content,
1865                entity: local_var_entity,
1866            };
1867            Err(Error::ResponseError(local_var_error))
1868        }
1869    }
1870
1871    /// Gets the public key information based on derivation path and signing
1872    /// algorithm. </br>Endpoint Permission: Admin, Non-Signing Admin.
1873    async fn get_public_key_info(
1874        &self,
1875        params: GetPublicKeyInfoParams,
1876    ) -> Result<models::PublicKeyInformation, Error<GetPublicKeyInfoError>> {
1877        let GetPublicKeyInfoParams {
1878            derivation_path,
1879            algorithm,
1880            compressed,
1881        } = params;
1882
1883        let local_var_configuration = &self.configuration;
1884
1885        let local_var_client = &local_var_configuration.client;
1886
1887        let local_var_uri_str = format!(
1888            "{}/vault/public_key_info",
1889            local_var_configuration.base_path
1890        );
1891        let mut local_var_req_builder =
1892            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1893
1894        local_var_req_builder = match "multi" {
1895            "multi" => local_var_req_builder.query(
1896                &derivation_path
1897                    .into_iter()
1898                    .map(|p| ("derivationPath".to_owned(), p.to_string()))
1899                    .collect::<Vec<(std::string::String, std::string::String)>>(),
1900            ),
1901            _ => local_var_req_builder.query(&[(
1902                "derivationPath",
1903                &derivation_path
1904                    .into_iter()
1905                    .map(|p| p.to_string())
1906                    .collect::<Vec<String>>()
1907                    .join(",")
1908                    .to_string(),
1909            )]),
1910        };
1911        local_var_req_builder =
1912            local_var_req_builder.query(&[("algorithm", &algorithm.to_string())]);
1913        if let Some(ref param_value) = compressed {
1914            local_var_req_builder =
1915                local_var_req_builder.query(&[("compressed", &param_value.to_string())]);
1916        }
1917        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1918            local_var_req_builder = local_var_req_builder
1919                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1920        }
1921
1922        let local_var_req = local_var_req_builder.build()?;
1923        let local_var_resp = local_var_client.execute(local_var_req).await?;
1924
1925        let local_var_status = local_var_resp.status();
1926        let local_var_content_type = local_var_resp
1927            .headers()
1928            .get("content-type")
1929            .and_then(|v| v.to_str().ok())
1930            .unwrap_or("application/octet-stream");
1931        let local_var_content_type = super::ContentType::from(local_var_content_type);
1932        let local_var_content = local_var_resp.text().await?;
1933
1934        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1935            match local_var_content_type {
1936                ContentType::Json => {
1937                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
1938                }
1939                ContentType::Text => {
1940                    return Err(Error::from(serde_json::Error::custom(
1941                        "Received `text/plain` content type response that cannot be converted to \
1942                         `models::PublicKeyInformation`",
1943                    )));
1944                }
1945                ContentType::Unsupported(local_var_unknown_type) => {
1946                    return Err(Error::from(serde_json::Error::custom(format!(
1947                        "Received `{local_var_unknown_type}` content type response that cannot be \
1948                         converted to `models::PublicKeyInformation`"
1949                    ))));
1950                }
1951            }
1952        } else {
1953            let local_var_entity: Option<GetPublicKeyInfoError> =
1954                serde_json::from_str(&local_var_content).ok();
1955            let local_var_error = ResponseContent {
1956                status: local_var_status,
1957                content: local_var_content,
1958                entity: local_var_entity,
1959            };
1960            Err(Error::ResponseError(local_var_error))
1961        }
1962    }
1963
1964    /// Get the public key information for a specific asset in a vault account.
1965    /// </br>Endpoint Permission: Admin, Non-Signing Admin.
1966    async fn get_public_key_info_for_address(
1967        &self,
1968        params: GetPublicKeyInfoForAddressParams,
1969    ) -> Result<models::PublicKeyInformation, Error<GetPublicKeyInfoForAddressError>> {
1970        let GetPublicKeyInfoForAddressParams {
1971            vault_account_id,
1972            asset_id,
1973            change,
1974            address_index,
1975            compressed,
1976        } = params;
1977
1978        let local_var_configuration = &self.configuration;
1979
1980        let local_var_client = &local_var_configuration.client;
1981
1982        let local_var_uri_str = format!(
1983            "{}/vault/accounts/{vaultAccountId}/{assetId}/{change}/{addressIndex}/public_key_info",
1984            local_var_configuration.base_path,
1985            vaultAccountId = crate::apis::urlencode(vault_account_id),
1986            assetId = crate::apis::urlencode(asset_id),
1987            change = change,
1988            addressIndex = address_index
1989        );
1990        let mut local_var_req_builder =
1991            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1992
1993        if let Some(ref param_value) = compressed {
1994            local_var_req_builder =
1995                local_var_req_builder.query(&[("compressed", &param_value.to_string())]);
1996        }
1997        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1998            local_var_req_builder = local_var_req_builder
1999                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2000        }
2001
2002        let local_var_req = local_var_req_builder.build()?;
2003        let local_var_resp = local_var_client.execute(local_var_req).await?;
2004
2005        let local_var_status = local_var_resp.status();
2006        let local_var_content_type = local_var_resp
2007            .headers()
2008            .get("content-type")
2009            .and_then(|v| v.to_str().ok())
2010            .unwrap_or("application/octet-stream");
2011        let local_var_content_type = super::ContentType::from(local_var_content_type);
2012        let local_var_content = local_var_resp.text().await?;
2013
2014        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2015            match local_var_content_type {
2016                ContentType::Json => {
2017                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
2018                }
2019                ContentType::Text => {
2020                    return Err(Error::from(serde_json::Error::custom(
2021                        "Received `text/plain` content type response that cannot be converted to \
2022                         `models::PublicKeyInformation`",
2023                    )));
2024                }
2025                ContentType::Unsupported(local_var_unknown_type) => {
2026                    return Err(Error::from(serde_json::Error::custom(format!(
2027                        "Received `{local_var_unknown_type}` content type response that cannot be \
2028                         converted to `models::PublicKeyInformation`"
2029                    ))));
2030                }
2031            }
2032        } else {
2033            let local_var_entity: Option<GetPublicKeyInfoForAddressError> =
2034                serde_json::from_str(&local_var_content).ok();
2035            let local_var_error = ResponseContent {
2036                status: local_var_status,
2037                content: local_var_content,
2038                entity: local_var_entity,
2039            };
2040            Err(Error::ResponseError(local_var_error))
2041        }
2042    }
2043
2044    /// Returns unspent inputs information of an UTXO asset in a vault account.
2045    /// </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver,
2046    /// Editor, Viewer.
2047    async fn get_unspent_inputs(
2048        &self,
2049        params: GetUnspentInputsParams,
2050    ) -> Result<Vec<models::UnspentInputsResponse>, Error<GetUnspentInputsError>> {
2051        let GetUnspentInputsParams {
2052            vault_account_id,
2053            asset_id,
2054        } = params;
2055
2056        let local_var_configuration = &self.configuration;
2057
2058        let local_var_client = &local_var_configuration.client;
2059
2060        let local_var_uri_str = format!(
2061            "{}/vault/accounts/{vaultAccountId}/{assetId}/unspent_inputs",
2062            local_var_configuration.base_path,
2063            vaultAccountId = crate::apis::urlencode(vault_account_id),
2064            assetId = crate::apis::urlencode(asset_id)
2065        );
2066        let mut local_var_req_builder =
2067            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2068
2069        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2070            local_var_req_builder = local_var_req_builder
2071                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2072        }
2073
2074        let local_var_req = local_var_req_builder.build()?;
2075        let local_var_resp = local_var_client.execute(local_var_req).await?;
2076
2077        let local_var_status = local_var_resp.status();
2078        let local_var_content_type = local_var_resp
2079            .headers()
2080            .get("content-type")
2081            .and_then(|v| v.to_str().ok())
2082            .unwrap_or("application/octet-stream");
2083        let local_var_content_type = super::ContentType::from(local_var_content_type);
2084        let local_var_content = local_var_resp.text().await?;
2085
2086        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2087            match local_var_content_type {
2088                ContentType::Json => {
2089                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
2090                }
2091                ContentType::Text => {
2092                    return Err(Error::from(serde_json::Error::custom(
2093                        "Received `text/plain` content type response that cannot be converted to \
2094                         `Vec&lt;models::UnspentInputsResponse&gt;`",
2095                    )));
2096                }
2097                ContentType::Unsupported(local_var_unknown_type) => {
2098                    return Err(Error::from(serde_json::Error::custom(format!(
2099                        "Received `{local_var_unknown_type}` content type response that cannot be \
2100                         converted to `Vec&lt;models::UnspentInputsResponse&gt;`"
2101                    ))));
2102                }
2103            }
2104        } else {
2105            let local_var_entity: Option<GetUnspentInputsError> =
2106                serde_json::from_str(&local_var_content).ok();
2107            let local_var_error = ResponseContent {
2108                status: local_var_status,
2109                content: local_var_content,
2110                entity: local_var_entity,
2111            };
2112            Err(Error::ResponseError(local_var_error))
2113        }
2114    }
2115
2116    /// Get a vault account by its unique ID. </br>Endpoint Permission: Admin,
2117    /// Non-Signing Admin, Signer, Approver, Editor, Viewer.
2118    async fn get_vault_account(
2119        &self,
2120        params: GetVaultAccountParams,
2121    ) -> Result<models::VaultAccount, Error<GetVaultAccountError>> {
2122        let GetVaultAccountParams { vault_account_id } = params;
2123
2124        let local_var_configuration = &self.configuration;
2125
2126        let local_var_client = &local_var_configuration.client;
2127
2128        let local_var_uri_str = format!(
2129            "{}/vault/accounts/{vaultAccountId}",
2130            local_var_configuration.base_path,
2131            vaultAccountId = crate::apis::urlencode(vault_account_id)
2132        );
2133        let mut local_var_req_builder =
2134            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2135
2136        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2137            local_var_req_builder = local_var_req_builder
2138                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2139        }
2140
2141        let local_var_req = local_var_req_builder.build()?;
2142        let local_var_resp = local_var_client.execute(local_var_req).await?;
2143
2144        let local_var_status = local_var_resp.status();
2145        let local_var_content_type = local_var_resp
2146            .headers()
2147            .get("content-type")
2148            .and_then(|v| v.to_str().ok())
2149            .unwrap_or("application/octet-stream");
2150        let local_var_content_type = super::ContentType::from(local_var_content_type);
2151        let local_var_content = local_var_resp.text().await?;
2152
2153        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2154            match local_var_content_type {
2155                ContentType::Json => {
2156                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
2157                }
2158                ContentType::Text => {
2159                    return Err(Error::from(serde_json::Error::custom(
2160                        "Received `text/plain` content type response that cannot be converted to \
2161                         `models::VaultAccount`",
2162                    )));
2163                }
2164                ContentType::Unsupported(local_var_unknown_type) => {
2165                    return Err(Error::from(serde_json::Error::custom(format!(
2166                        "Received `{local_var_unknown_type}` content type response that cannot be \
2167                         converted to `models::VaultAccount`"
2168                    ))));
2169                }
2170            }
2171        } else {
2172            let local_var_entity: Option<GetVaultAccountError> =
2173                serde_json::from_str(&local_var_content).ok();
2174            let local_var_error = ResponseContent {
2175                status: local_var_status,
2176                content: local_var_content,
2177                entity: local_var_entity,
2178            };
2179            Err(Error::ResponseError(local_var_error))
2180        }
2181    }
2182
2183    /// Returns a specific vault wallet balance information for a specific
2184    /// asset.  </br>Endpoint Permission: Admin, Non-Signing Admin, Signer,
2185    /// Approver, Editor,   Viewer.
2186    async fn get_vault_account_asset(
2187        &self,
2188        params: GetVaultAccountAssetParams,
2189    ) -> Result<models::VaultAsset, Error<GetVaultAccountAssetError>> {
2190        let GetVaultAccountAssetParams {
2191            vault_account_id,
2192            asset_id,
2193        } = params;
2194
2195        let local_var_configuration = &self.configuration;
2196
2197        let local_var_client = &local_var_configuration.client;
2198
2199        let local_var_uri_str = format!(
2200            "{}/vault/accounts/{vaultAccountId}/{assetId}",
2201            local_var_configuration.base_path,
2202            vaultAccountId = crate::apis::urlencode(vault_account_id),
2203            assetId = crate::apis::urlencode(asset_id)
2204        );
2205        let mut local_var_req_builder =
2206            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2207
2208        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2209            local_var_req_builder = local_var_req_builder
2210                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2211        }
2212
2213        let local_var_req = local_var_req_builder.build()?;
2214        let local_var_resp = local_var_client.execute(local_var_req).await?;
2215
2216        let local_var_status = local_var_resp.status();
2217        let local_var_content_type = local_var_resp
2218            .headers()
2219            .get("content-type")
2220            .and_then(|v| v.to_str().ok())
2221            .unwrap_or("application/octet-stream");
2222        let local_var_content_type = super::ContentType::from(local_var_content_type);
2223        let local_var_content = local_var_resp.text().await?;
2224
2225        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2226            match local_var_content_type {
2227                ContentType::Json => {
2228                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
2229                }
2230                ContentType::Text => {
2231                    return Err(Error::from(serde_json::Error::custom(
2232                        "Received `text/plain` content type response that cannot be converted to \
2233                         `models::VaultAsset`",
2234                    )));
2235                }
2236                ContentType::Unsupported(local_var_unknown_type) => {
2237                    return Err(Error::from(serde_json::Error::custom(format!(
2238                        "Received `{local_var_unknown_type}` content type response that cannot be \
2239                         converted to `models::VaultAsset`"
2240                    ))));
2241                }
2242            }
2243        } else {
2244            let local_var_entity: Option<GetVaultAccountAssetError> =
2245                serde_json::from_str(&local_var_content).ok();
2246            let local_var_error = ResponseContent {
2247                status: local_var_status,
2248                content: local_var_content,
2249                entity: local_var_entity,
2250            };
2251            Err(Error::ResponseError(local_var_error))
2252        }
2253    }
2254
2255    /// DEPRECATED!  - If your application logic or scripts rely on the
2256    /// deprecated endpoint, you should update to account for
2257    /// GET/V1/vault/accounts/{vaultAccountId}/{assetId}/addresses_paginated
2258    /// before Mar 31,2024. - All workspaces created after Mar 31,2024. will
2259    /// have it disabled. If it is disabled for your workspace and you attempt
2260    /// to use it, you will receive the following error message: \"This endpoint
2261    /// is unavailable. - Please use the GET
2262    /// /v1/vault/accounts/{vaultAccountId}/{assetId}/addresses_paginated
2263    /// endpoint to return all the wallet addresses associated with the
2264    /// specified vault account and asset in a paginated list.  </br>Endpoint
2265    /// Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer.
2266    async fn get_vault_account_asset_addresses(
2267        &self,
2268        params: GetVaultAccountAssetAddressesParams,
2269    ) -> Result<Vec<models::VaultWalletAddress>, Error<GetVaultAccountAssetAddressesError>> {
2270        let GetVaultAccountAssetAddressesParams {
2271            vault_account_id,
2272            asset_id,
2273        } = params;
2274
2275        let local_var_configuration = &self.configuration;
2276
2277        let local_var_client = &local_var_configuration.client;
2278
2279        let local_var_uri_str = format!(
2280            "{}/vault/accounts/{vaultAccountId}/{assetId}/addresses",
2281            local_var_configuration.base_path,
2282            vaultAccountId = crate::apis::urlencode(vault_account_id),
2283            assetId = crate::apis::urlencode(asset_id)
2284        );
2285        let mut local_var_req_builder =
2286            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2287
2288        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2289            local_var_req_builder = local_var_req_builder
2290                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2291        }
2292
2293        let local_var_req = local_var_req_builder.build()?;
2294        let local_var_resp = local_var_client.execute(local_var_req).await?;
2295
2296        let local_var_status = local_var_resp.status();
2297        let local_var_content_type = local_var_resp
2298            .headers()
2299            .get("content-type")
2300            .and_then(|v| v.to_str().ok())
2301            .unwrap_or("application/octet-stream");
2302        let local_var_content_type = super::ContentType::from(local_var_content_type);
2303        let local_var_content = local_var_resp.text().await?;
2304
2305        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2306            match local_var_content_type {
2307                ContentType::Json => {
2308                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
2309                }
2310                ContentType::Text => {
2311                    return Err(Error::from(serde_json::Error::custom(
2312                        "Received `text/plain` content type response that cannot be converted to \
2313                         `Vec&lt;models::VaultWalletAddress&gt;`",
2314                    )));
2315                }
2316                ContentType::Unsupported(local_var_unknown_type) => {
2317                    return Err(Error::from(serde_json::Error::custom(format!(
2318                        "Received `{local_var_unknown_type}` content type response that cannot be \
2319                         converted to `Vec&lt;models::VaultWalletAddress&gt;`"
2320                    ))));
2321                }
2322            }
2323        } else {
2324            let local_var_entity: Option<GetVaultAccountAssetAddressesError> =
2325                serde_json::from_str(&local_var_content).ok();
2326            let local_var_error = ResponseContent {
2327                status: local_var_status,
2328                content: local_var_content,
2329                entity: local_var_entity,
2330            };
2331            Err(Error::ResponseError(local_var_error))
2332        }
2333    }
2334
2335    /// Returns a paginated response of the addresses for a given vault account
2336    /// and asset. </br>Endpoint Permission: Admin, Non-Signing Admin, Signer,
2337    /// Approver, Editor, Viewer.
2338    async fn get_vault_account_asset_addresses_paginated(
2339        &self,
2340        params: GetVaultAccountAssetAddressesPaginatedParams,
2341    ) -> Result<models::PaginatedAddressResponse, Error<GetVaultAccountAssetAddressesPaginatedError>>
2342    {
2343        let GetVaultAccountAssetAddressesPaginatedParams {
2344            vault_account_id,
2345            asset_id,
2346            limit,
2347            before,
2348            after,
2349        } = params;
2350
2351        let local_var_configuration = &self.configuration;
2352
2353        let local_var_client = &local_var_configuration.client;
2354
2355        let local_var_uri_str = format!(
2356            "{}/vault/accounts/{vaultAccountId}/{assetId}/addresses_paginated",
2357            local_var_configuration.base_path,
2358            vaultAccountId = crate::apis::urlencode(vault_account_id),
2359            assetId = crate::apis::urlencode(asset_id)
2360        );
2361        let mut local_var_req_builder =
2362            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2363
2364        if let Some(ref param_value) = limit {
2365            local_var_req_builder =
2366                local_var_req_builder.query(&[("limit", &param_value.to_string())]);
2367        }
2368        if let Some(ref param_value) = before {
2369            local_var_req_builder =
2370                local_var_req_builder.query(&[("before", &param_value.to_string())]);
2371        }
2372        if let Some(ref param_value) = after {
2373            local_var_req_builder =
2374                local_var_req_builder.query(&[("after", &param_value.to_string())]);
2375        }
2376        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2377            local_var_req_builder = local_var_req_builder
2378                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2379        }
2380
2381        let local_var_req = local_var_req_builder.build()?;
2382        let local_var_resp = local_var_client.execute(local_var_req).await?;
2383
2384        let local_var_status = local_var_resp.status();
2385        let local_var_content_type = local_var_resp
2386            .headers()
2387            .get("content-type")
2388            .and_then(|v| v.to_str().ok())
2389            .unwrap_or("application/octet-stream");
2390        let local_var_content_type = super::ContentType::from(local_var_content_type);
2391        let local_var_content = local_var_resp.text().await?;
2392
2393        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2394            match local_var_content_type {
2395                ContentType::Json => {
2396                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
2397                }
2398                ContentType::Text => {
2399                    return Err(Error::from(serde_json::Error::custom(
2400                        "Received `text/plain` content type response that cannot be converted to \
2401                         `models::PaginatedAddressResponse`",
2402                    )));
2403                }
2404                ContentType::Unsupported(local_var_unknown_type) => {
2405                    return Err(Error::from(serde_json::Error::custom(format!(
2406                        "Received `{local_var_unknown_type}` content type response that cannot be \
2407                         converted to `models::PaginatedAddressResponse`"
2408                    ))));
2409                }
2410            }
2411        } else {
2412            let local_var_entity: Option<GetVaultAccountAssetAddressesPaginatedError> =
2413                serde_json::from_str(&local_var_content).ok();
2414            let local_var_error = ResponseContent {
2415                status: local_var_status,
2416                content: local_var_content,
2417                entity: local_var_entity,
2418            };
2419            Err(Error::ResponseError(local_var_error))
2420        }
2421    }
2422
2423    /// Gets the assets amount summary for all accounts or filtered accounts.
2424    /// </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver,
2425    /// Editor, Viewer.
2426    async fn get_vault_assets(
2427        &self,
2428        params: GetVaultAssetsParams,
2429    ) -> Result<Vec<models::VaultAsset>, Error<GetVaultAssetsError>> {
2430        let GetVaultAssetsParams {
2431            account_name_prefix,
2432            account_name_suffix,
2433        } = params;
2434
2435        let local_var_configuration = &self.configuration;
2436
2437        let local_var_client = &local_var_configuration.client;
2438
2439        let local_var_uri_str = format!("{}/vault/assets", local_var_configuration.base_path);
2440        let mut local_var_req_builder =
2441            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2442
2443        if let Some(ref param_value) = account_name_prefix {
2444            local_var_req_builder =
2445                local_var_req_builder.query(&[("accountNamePrefix", &param_value.to_string())]);
2446        }
2447        if let Some(ref param_value) = account_name_suffix {
2448            local_var_req_builder =
2449                local_var_req_builder.query(&[("accountNameSuffix", &param_value.to_string())]);
2450        }
2451        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2452            local_var_req_builder = local_var_req_builder
2453                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2454        }
2455
2456        let local_var_req = local_var_req_builder.build()?;
2457        let local_var_resp = local_var_client.execute(local_var_req).await?;
2458
2459        let local_var_status = local_var_resp.status();
2460        let local_var_content_type = local_var_resp
2461            .headers()
2462            .get("content-type")
2463            .and_then(|v| v.to_str().ok())
2464            .unwrap_or("application/octet-stream");
2465        let local_var_content_type = super::ContentType::from(local_var_content_type);
2466        let local_var_content = local_var_resp.text().await?;
2467
2468        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2469            match local_var_content_type {
2470                ContentType::Json => {
2471                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
2472                }
2473                ContentType::Text => {
2474                    return Err(Error::from(serde_json::Error::custom(
2475                        "Received `text/plain` content type response that cannot be converted to \
2476                         `Vec&lt;models::VaultAsset&gt;`",
2477                    )));
2478                }
2479                ContentType::Unsupported(local_var_unknown_type) => {
2480                    return Err(Error::from(serde_json::Error::custom(format!(
2481                        "Received `{local_var_unknown_type}` content type response that cannot be \
2482                         converted to `Vec&lt;models::VaultAsset&gt;`"
2483                    ))));
2484                }
2485            }
2486        } else {
2487            let local_var_entity: Option<GetVaultAssetsError> =
2488                serde_json::from_str(&local_var_content).ok();
2489            let local_var_error = ResponseContent {
2490                status: local_var_status,
2491                content: local_var_content,
2492                entity: local_var_entity,
2493            };
2494            Err(Error::ResponseError(local_var_error))
2495        }
2496    }
2497
2498    /// Get the total balance of an asset across all the vault accounts.
2499    /// </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver,
2500    /// Editor, Viewer.
2501    async fn get_vault_balance_by_asset(
2502        &self,
2503        params: GetVaultBalanceByAssetParams,
2504    ) -> Result<models::VaultAsset, Error<GetVaultBalanceByAssetError>> {
2505        let GetVaultBalanceByAssetParams { asset_id } = params;
2506
2507        let local_var_configuration = &self.configuration;
2508
2509        let local_var_client = &local_var_configuration.client;
2510
2511        let local_var_uri_str = format!(
2512            "{}/vault/assets/{assetId}",
2513            local_var_configuration.base_path,
2514            assetId = crate::apis::urlencode(asset_id)
2515        );
2516        let mut local_var_req_builder =
2517            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2518
2519        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2520            local_var_req_builder = local_var_req_builder
2521                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2522        }
2523
2524        let local_var_req = local_var_req_builder.build()?;
2525        let local_var_resp = local_var_client.execute(local_var_req).await?;
2526
2527        let local_var_status = local_var_resp.status();
2528        let local_var_content_type = local_var_resp
2529            .headers()
2530            .get("content-type")
2531            .and_then(|v| v.to_str().ok())
2532            .unwrap_or("application/octet-stream");
2533        let local_var_content_type = super::ContentType::from(local_var_content_type);
2534        let local_var_content = local_var_resp.text().await?;
2535
2536        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2537            match local_var_content_type {
2538                ContentType::Json => {
2539                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
2540                }
2541                ContentType::Text => {
2542                    return Err(Error::from(serde_json::Error::custom(
2543                        "Received `text/plain` content type response that cannot be converted to \
2544                         `models::VaultAsset`",
2545                    )));
2546                }
2547                ContentType::Unsupported(local_var_unknown_type) => {
2548                    return Err(Error::from(serde_json::Error::custom(format!(
2549                        "Received `{local_var_unknown_type}` content type response that cannot be \
2550                         converted to `models::VaultAsset`"
2551                    ))));
2552                }
2553            }
2554        } else {
2555            let local_var_entity: Option<GetVaultBalanceByAssetError> =
2556                serde_json::from_str(&local_var_content).ok();
2557            let local_var_error = ResponseContent {
2558                status: local_var_status,
2559                content: local_var_content,
2560                entity: local_var_entity,
2561            };
2562            Err(Error::ResponseError(local_var_error))
2563        }
2564    }
2565
2566    /// Hides the requested vault account from the web console view. This operation is required when creating thousands of vault accounts to serve your end-users. Used for preventing the web console to be swamped with too much vault accounts. Learn more in the following [guide](https://developers.fireblocks.com/docs/create-direct-custody-wallets#hiding-vault-accounts). NOTE: Hiding the vault account from the web console will also hide all the related transactions to/from this vault. </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
2567    async fn hide_vault_account(
2568        &self,
2569        params: HideVaultAccountParams,
2570    ) -> Result<models::VaultActionStatus, Error<HideVaultAccountError>> {
2571        let HideVaultAccountParams {
2572            vault_account_id,
2573            idempotency_key,
2574        } = params;
2575
2576        let local_var_configuration = &self.configuration;
2577
2578        let local_var_client = &local_var_configuration.client;
2579
2580        let local_var_uri_str = format!(
2581            "{}/vault/accounts/{vaultAccountId}/hide",
2582            local_var_configuration.base_path,
2583            vaultAccountId = crate::apis::urlencode(vault_account_id)
2584        );
2585        let mut local_var_req_builder =
2586            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2587
2588        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2589            local_var_req_builder = local_var_req_builder
2590                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2591        }
2592        if let Some(local_var_param_value) = idempotency_key {
2593            local_var_req_builder =
2594                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
2595        }
2596
2597        let local_var_req = local_var_req_builder.build()?;
2598        let local_var_resp = local_var_client.execute(local_var_req).await?;
2599
2600        let local_var_status = local_var_resp.status();
2601        let local_var_content_type = local_var_resp
2602            .headers()
2603            .get("content-type")
2604            .and_then(|v| v.to_str().ok())
2605            .unwrap_or("application/octet-stream");
2606        let local_var_content_type = super::ContentType::from(local_var_content_type);
2607        let local_var_content = local_var_resp.text().await?;
2608
2609        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2610            match local_var_content_type {
2611                ContentType::Json => {
2612                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
2613                }
2614                ContentType::Text => {
2615                    return Err(Error::from(serde_json::Error::custom(
2616                        "Received `text/plain` content type response that cannot be converted to \
2617                         `models::VaultActionStatus`",
2618                    )));
2619                }
2620                ContentType::Unsupported(local_var_unknown_type) => {
2621                    return Err(Error::from(serde_json::Error::custom(format!(
2622                        "Received `{local_var_unknown_type}` content type response that cannot be \
2623                         converted to `models::VaultActionStatus`"
2624                    ))));
2625                }
2626            }
2627        } else {
2628            let local_var_entity: Option<HideVaultAccountError> =
2629                serde_json::from_str(&local_var_content).ok();
2630            let local_var_error = ResponseContent {
2631                status: local_var_status,
2632                content: local_var_content,
2633                entity: local_var_entity,
2634            };
2635            Err(Error::ResponseError(local_var_error))
2636        }
2637    }
2638
2639    /// Sets an AML/KYT customer reference ID for a specific address.
2640    /// </br>Endpoint Permission: Admin, Non-Signing Admin.
2641    async fn set_customer_ref_id_for_address(
2642        &self,
2643        params: SetCustomerRefIdForAddressParams,
2644    ) -> Result<models::VaultActionStatus, Error<SetCustomerRefIdForAddressError>> {
2645        let SetCustomerRefIdForAddressParams {
2646            vault_account_id,
2647            asset_id,
2648            address_id,
2649            set_customer_ref_id_for_address_request,
2650            idempotency_key,
2651        } = params;
2652
2653        let local_var_configuration = &self.configuration;
2654
2655        let local_var_client = &local_var_configuration.client;
2656
2657        let local_var_uri_str = format!(
2658            "{}/vault/accounts/{vaultAccountId}/{assetId}/addresses/{addressId}/\
2659             set_customer_ref_id",
2660            local_var_configuration.base_path,
2661            vaultAccountId = crate::apis::urlencode(vault_account_id),
2662            assetId = crate::apis::urlencode(asset_id),
2663            addressId = crate::apis::urlencode(address_id)
2664        );
2665        let mut local_var_req_builder =
2666            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2667
2668        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2669            local_var_req_builder = local_var_req_builder
2670                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2671        }
2672        if let Some(local_var_param_value) = idempotency_key {
2673            local_var_req_builder =
2674                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
2675        }
2676        local_var_req_builder =
2677            local_var_req_builder.json(&set_customer_ref_id_for_address_request);
2678
2679        let local_var_req = local_var_req_builder.build()?;
2680        let local_var_resp = local_var_client.execute(local_var_req).await?;
2681
2682        let local_var_status = local_var_resp.status();
2683        let local_var_content_type = local_var_resp
2684            .headers()
2685            .get("content-type")
2686            .and_then(|v| v.to_str().ok())
2687            .unwrap_or("application/octet-stream");
2688        let local_var_content_type = super::ContentType::from(local_var_content_type);
2689        let local_var_content = local_var_resp.text().await?;
2690
2691        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2692            match local_var_content_type {
2693                ContentType::Json => {
2694                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
2695                }
2696                ContentType::Text => {
2697                    return Err(Error::from(serde_json::Error::custom(
2698                        "Received `text/plain` content type response that cannot be converted to \
2699                         `models::VaultActionStatus`",
2700                    )));
2701                }
2702                ContentType::Unsupported(local_var_unknown_type) => {
2703                    return Err(Error::from(serde_json::Error::custom(format!(
2704                        "Received `{local_var_unknown_type}` content type response that cannot be \
2705                         converted to `models::VaultActionStatus`"
2706                    ))));
2707                }
2708            }
2709        } else {
2710            let local_var_entity: Option<SetCustomerRefIdForAddressError> =
2711                serde_json::from_str(&local_var_content).ok();
2712            let local_var_error = ResponseContent {
2713                status: local_var_status,
2714                content: local_var_content,
2715                entity: local_var_entity,
2716            };
2717            Err(Error::ResponseError(local_var_error))
2718        }
2719    }
2720
2721    /// Toggles the auto fueling property of the vault account to enabled or disabled. Vault Accounts with 'autoFuel=true' are monitored and auto fueled by the Fireblocks Gas Station. Learn more about the Fireblocks Gas Station in the following [guide](https://developers.fireblocks.com/docs/work-with-gas-station). </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
2722    async fn set_vault_account_auto_fuel(
2723        &self,
2724        params: SetVaultAccountAutoFuelParams,
2725    ) -> Result<models::VaultActionStatus, Error<SetVaultAccountAutoFuelError>> {
2726        let SetVaultAccountAutoFuelParams {
2727            vault_account_id,
2728            set_auto_fuel_request,
2729            idempotency_key,
2730        } = params;
2731
2732        let local_var_configuration = &self.configuration;
2733
2734        let local_var_client = &local_var_configuration.client;
2735
2736        let local_var_uri_str = format!(
2737            "{}/vault/accounts/{vaultAccountId}/set_auto_fuel",
2738            local_var_configuration.base_path,
2739            vaultAccountId = crate::apis::urlencode(vault_account_id)
2740        );
2741        let mut local_var_req_builder =
2742            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2743
2744        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2745            local_var_req_builder = local_var_req_builder
2746                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2747        }
2748        if let Some(local_var_param_value) = idempotency_key {
2749            local_var_req_builder =
2750                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
2751        }
2752        local_var_req_builder = local_var_req_builder.json(&set_auto_fuel_request);
2753
2754        let local_var_req = local_var_req_builder.build()?;
2755        let local_var_resp = local_var_client.execute(local_var_req).await?;
2756
2757        let local_var_status = local_var_resp.status();
2758        let local_var_content_type = local_var_resp
2759            .headers()
2760            .get("content-type")
2761            .and_then(|v| v.to_str().ok())
2762            .unwrap_or("application/octet-stream");
2763        let local_var_content_type = super::ContentType::from(local_var_content_type);
2764        let local_var_content = local_var_resp.text().await?;
2765
2766        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2767            match local_var_content_type {
2768                ContentType::Json => {
2769                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
2770                }
2771                ContentType::Text => {
2772                    return Err(Error::from(serde_json::Error::custom(
2773                        "Received `text/plain` content type response that cannot be converted to \
2774                         `models::VaultActionStatus`",
2775                    )));
2776                }
2777                ContentType::Unsupported(local_var_unknown_type) => {
2778                    return Err(Error::from(serde_json::Error::custom(format!(
2779                        "Received `{local_var_unknown_type}` content type response that cannot be \
2780                         converted to `models::VaultActionStatus`"
2781                    ))));
2782                }
2783            }
2784        } else {
2785            let local_var_entity: Option<SetVaultAccountAutoFuelError> =
2786                serde_json::from_str(&local_var_content).ok();
2787            let local_var_error = ResponseContent {
2788                status: local_var_status,
2789                content: local_var_content,
2790                entity: local_var_entity,
2791            };
2792            Err(Error::ResponseError(local_var_error))
2793        }
2794    }
2795
2796    /// Assigns an AML/KYT customer reference ID for the vault account. Learn more about Fireblocks AML management in the following [guide](https://developers.fireblocks.com/docs/define-aml-policies). </br>Endpoint Permission: Admin, Non-Signing Admin.
2797    async fn set_vault_account_customer_ref_id(
2798        &self,
2799        params: SetVaultAccountCustomerRefIdParams,
2800    ) -> Result<models::VaultActionStatus, Error<SetVaultAccountCustomerRefIdError>> {
2801        let SetVaultAccountCustomerRefIdParams {
2802            vault_account_id,
2803            set_customer_ref_id_request,
2804            idempotency_key,
2805        } = params;
2806
2807        let local_var_configuration = &self.configuration;
2808
2809        let local_var_client = &local_var_configuration.client;
2810
2811        let local_var_uri_str = format!(
2812            "{}/vault/accounts/{vaultAccountId}/set_customer_ref_id",
2813            local_var_configuration.base_path,
2814            vaultAccountId = crate::apis::urlencode(vault_account_id)
2815        );
2816        let mut local_var_req_builder =
2817            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2818
2819        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2820            local_var_req_builder = local_var_req_builder
2821                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2822        }
2823        if let Some(local_var_param_value) = idempotency_key {
2824            local_var_req_builder =
2825                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
2826        }
2827        local_var_req_builder = local_var_req_builder.json(&set_customer_ref_id_request);
2828
2829        let local_var_req = local_var_req_builder.build()?;
2830        let local_var_resp = local_var_client.execute(local_var_req).await?;
2831
2832        let local_var_status = local_var_resp.status();
2833        let local_var_content_type = local_var_resp
2834            .headers()
2835            .get("content-type")
2836            .and_then(|v| v.to_str().ok())
2837            .unwrap_or("application/octet-stream");
2838        let local_var_content_type = super::ContentType::from(local_var_content_type);
2839        let local_var_content = local_var_resp.text().await?;
2840
2841        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2842            match local_var_content_type {
2843                ContentType::Json => {
2844                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
2845                }
2846                ContentType::Text => {
2847                    return Err(Error::from(serde_json::Error::custom(
2848                        "Received `text/plain` content type response that cannot be converted to \
2849                         `models::VaultActionStatus`",
2850                    )));
2851                }
2852                ContentType::Unsupported(local_var_unknown_type) => {
2853                    return Err(Error::from(serde_json::Error::custom(format!(
2854                        "Received `{local_var_unknown_type}` content type response that cannot be \
2855                         converted to `models::VaultActionStatus`"
2856                    ))));
2857                }
2858            }
2859        } else {
2860            let local_var_entity: Option<SetVaultAccountCustomerRefIdError> =
2861                serde_json::from_str(&local_var_content).ok();
2862            let local_var_error = ResponseContent {
2863                status: local_var_status,
2864                content: local_var_content,
2865                entity: local_var_entity,
2866            };
2867            Err(Error::ResponseError(local_var_error))
2868        }
2869    }
2870
2871    /// Makes a hidden vault account visible in web console view. </br>Endpoint
2872    /// Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
2873    async fn unhide_vault_account(
2874        &self,
2875        params: UnhideVaultAccountParams,
2876    ) -> Result<models::VaultActionStatus, Error<UnhideVaultAccountError>> {
2877        let UnhideVaultAccountParams {
2878            vault_account_id,
2879            idempotency_key,
2880        } = params;
2881
2882        let local_var_configuration = &self.configuration;
2883
2884        let local_var_client = &local_var_configuration.client;
2885
2886        let local_var_uri_str = format!(
2887            "{}/vault/accounts/{vaultAccountId}/unhide",
2888            local_var_configuration.base_path,
2889            vaultAccountId = crate::apis::urlencode(vault_account_id)
2890        );
2891        let mut local_var_req_builder =
2892            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2893
2894        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2895            local_var_req_builder = local_var_req_builder
2896                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2897        }
2898        if let Some(local_var_param_value) = idempotency_key {
2899            local_var_req_builder =
2900                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
2901        }
2902
2903        let local_var_req = local_var_req_builder.build()?;
2904        let local_var_resp = local_var_client.execute(local_var_req).await?;
2905
2906        let local_var_status = local_var_resp.status();
2907        let local_var_content_type = local_var_resp
2908            .headers()
2909            .get("content-type")
2910            .and_then(|v| v.to_str().ok())
2911            .unwrap_or("application/octet-stream");
2912        let local_var_content_type = super::ContentType::from(local_var_content_type);
2913        let local_var_content = local_var_resp.text().await?;
2914
2915        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2916            match local_var_content_type {
2917                ContentType::Json => {
2918                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
2919                }
2920                ContentType::Text => {
2921                    return Err(Error::from(serde_json::Error::custom(
2922                        "Received `text/plain` content type response that cannot be converted to \
2923                         `models::VaultActionStatus`",
2924                    )));
2925                }
2926                ContentType::Unsupported(local_var_unknown_type) => {
2927                    return Err(Error::from(serde_json::Error::custom(format!(
2928                        "Received `{local_var_unknown_type}` content type response that cannot be \
2929                         converted to `models::VaultActionStatus`"
2930                    ))));
2931                }
2932            }
2933        } else {
2934            let local_var_entity: Option<UnhideVaultAccountError> =
2935                serde_json::from_str(&local_var_content).ok();
2936            let local_var_error = ResponseContent {
2937                status: local_var_status,
2938                content: local_var_content,
2939                entity: local_var_entity,
2940            };
2941            Err(Error::ResponseError(local_var_error))
2942        }
2943    }
2944
2945    /// Renames the requested vault account. </br>Endpoint Permission: Admin,
2946    /// Non-Signing Admin, Signer, Approver.
2947    async fn update_vault_account(
2948        &self,
2949        params: UpdateVaultAccountParams,
2950    ) -> Result<models::RenameVaultAccountResponse, Error<UpdateVaultAccountError>> {
2951        let UpdateVaultAccountParams {
2952            vault_account_id,
2953            update_vault_account_request,
2954            idempotency_key,
2955        } = params;
2956
2957        let local_var_configuration = &self.configuration;
2958
2959        let local_var_client = &local_var_configuration.client;
2960
2961        let local_var_uri_str = format!(
2962            "{}/vault/accounts/{vaultAccountId}",
2963            local_var_configuration.base_path,
2964            vaultAccountId = crate::apis::urlencode(vault_account_id)
2965        );
2966        let mut local_var_req_builder =
2967            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
2968
2969        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2970            local_var_req_builder = local_var_req_builder
2971                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2972        }
2973        if let Some(local_var_param_value) = idempotency_key {
2974            local_var_req_builder =
2975                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
2976        }
2977        local_var_req_builder = local_var_req_builder.json(&update_vault_account_request);
2978
2979        let local_var_req = local_var_req_builder.build()?;
2980        let local_var_resp = local_var_client.execute(local_var_req).await?;
2981
2982        let local_var_status = local_var_resp.status();
2983        let local_var_content_type = local_var_resp
2984            .headers()
2985            .get("content-type")
2986            .and_then(|v| v.to_str().ok())
2987            .unwrap_or("application/octet-stream");
2988        let local_var_content_type = super::ContentType::from(local_var_content_type);
2989        let local_var_content = local_var_resp.text().await?;
2990
2991        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2992            match local_var_content_type {
2993                ContentType::Json => {
2994                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
2995                }
2996                ContentType::Text => {
2997                    return Err(Error::from(serde_json::Error::custom(
2998                        "Received `text/plain` content type response that cannot be converted to \
2999                         `models::RenameVaultAccountResponse`",
3000                    )));
3001                }
3002                ContentType::Unsupported(local_var_unknown_type) => {
3003                    return Err(Error::from(serde_json::Error::custom(format!(
3004                        "Received `{local_var_unknown_type}` content type response that cannot be \
3005                         converted to `models::RenameVaultAccountResponse`"
3006                    ))));
3007                }
3008            }
3009        } else {
3010            let local_var_entity: Option<UpdateVaultAccountError> =
3011                serde_json::from_str(&local_var_content).ok();
3012            let local_var_error = ResponseContent {
3013                status: local_var_status,
3014                content: local_var_content,
3015                entity: local_var_entity,
3016            };
3017            Err(Error::ResponseError(local_var_error))
3018        }
3019    }
3020
3021    /// Updates the description of an existing address of an asset in a vault
3022    /// account. </br>Endpoint Permission: Admin, Non-Signing Admin, Signer,
3023    /// Approver, Editor.
3024    async fn update_vault_account_asset_address(
3025        &self,
3026        params: UpdateVaultAccountAssetAddressParams,
3027    ) -> Result<models::VaultActionStatus, Error<UpdateVaultAccountAssetAddressError>> {
3028        let UpdateVaultAccountAssetAddressParams {
3029            vault_account_id,
3030            asset_id,
3031            address_id,
3032            idempotency_key,
3033            update_vault_account_asset_address_request,
3034        } = params;
3035
3036        let local_var_configuration = &self.configuration;
3037
3038        let local_var_client = &local_var_configuration.client;
3039
3040        let local_var_uri_str = format!(
3041            "{}/vault/accounts/{vaultAccountId}/{assetId}/addresses/{addressId}",
3042            local_var_configuration.base_path,
3043            vaultAccountId = crate::apis::urlencode(vault_account_id),
3044            assetId = crate::apis::urlencode(asset_id),
3045            addressId = crate::apis::urlencode(address_id)
3046        );
3047        let mut local_var_req_builder =
3048            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
3049
3050        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3051            local_var_req_builder = local_var_req_builder
3052                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3053        }
3054        if let Some(local_var_param_value) = idempotency_key {
3055            local_var_req_builder =
3056                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
3057        }
3058        local_var_req_builder =
3059            local_var_req_builder.json(&update_vault_account_asset_address_request);
3060
3061        let local_var_req = local_var_req_builder.build()?;
3062        let local_var_resp = local_var_client.execute(local_var_req).await?;
3063
3064        let local_var_status = local_var_resp.status();
3065        let local_var_content_type = local_var_resp
3066            .headers()
3067            .get("content-type")
3068            .and_then(|v| v.to_str().ok())
3069            .unwrap_or("application/octet-stream");
3070        let local_var_content_type = super::ContentType::from(local_var_content_type);
3071        let local_var_content = local_var_resp.text().await?;
3072
3073        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3074            match local_var_content_type {
3075                ContentType::Json => {
3076                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
3077                }
3078                ContentType::Text => {
3079                    return Err(Error::from(serde_json::Error::custom(
3080                        "Received `text/plain` content type response that cannot be converted to \
3081                         `models::VaultActionStatus`",
3082                    )));
3083                }
3084                ContentType::Unsupported(local_var_unknown_type) => {
3085                    return Err(Error::from(serde_json::Error::custom(format!(
3086                        "Received `{local_var_unknown_type}` content type response that cannot be \
3087                         converted to `models::VaultActionStatus`"
3088                    ))));
3089                }
3090            }
3091        } else {
3092            let local_var_entity: Option<UpdateVaultAccountAssetAddressError> =
3093                serde_json::from_str(&local_var_content).ok();
3094            let local_var_error = ResponseContent {
3095                status: local_var_status,
3096                content: local_var_content,
3097                entity: local_var_entity,
3098            };
3099            Err(Error::ResponseError(local_var_error))
3100        }
3101    }
3102
3103    /// Updates the balance of a specific asset in a vault account.  This API
3104    /// endpoint is subject to a strict rate limit. Should be used by clients in
3105    /// very specific scenarios.  </br>Endpoint Permission: Admin, Non-Signing
3106    /// Admin, Signer, Approver, Editor.
3107    async fn update_vault_account_asset_balance(
3108        &self,
3109        params: UpdateVaultAccountAssetBalanceParams,
3110    ) -> Result<models::VaultAsset, Error<UpdateVaultAccountAssetBalanceError>> {
3111        let UpdateVaultAccountAssetBalanceParams {
3112            vault_account_id,
3113            asset_id,
3114            idempotency_key,
3115        } = params;
3116
3117        let local_var_configuration = &self.configuration;
3118
3119        let local_var_client = &local_var_configuration.client;
3120
3121        let local_var_uri_str = format!(
3122            "{}/vault/accounts/{vaultAccountId}/{assetId}/balance",
3123            local_var_configuration.base_path,
3124            vaultAccountId = crate::apis::urlencode(vault_account_id),
3125            assetId = crate::apis::urlencode(asset_id)
3126        );
3127        let mut local_var_req_builder =
3128            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3129
3130        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3131            local_var_req_builder = local_var_req_builder
3132                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3133        }
3134        if let Some(local_var_param_value) = idempotency_key {
3135            local_var_req_builder =
3136                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
3137        }
3138
3139        let local_var_req = local_var_req_builder.build()?;
3140        let local_var_resp = local_var_client.execute(local_var_req).await?;
3141
3142        let local_var_status = local_var_resp.status();
3143        let local_var_content_type = local_var_resp
3144            .headers()
3145            .get("content-type")
3146            .and_then(|v| v.to_str().ok())
3147            .unwrap_or("application/octet-stream");
3148        let local_var_content_type = super::ContentType::from(local_var_content_type);
3149        let local_var_content = local_var_resp.text().await?;
3150
3151        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3152            match local_var_content_type {
3153                ContentType::Json => {
3154                    crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
3155                }
3156                ContentType::Text => {
3157                    return Err(Error::from(serde_json::Error::custom(
3158                        "Received `text/plain` content type response that cannot be converted to \
3159                         `models::VaultAsset`",
3160                    )));
3161                }
3162                ContentType::Unsupported(local_var_unknown_type) => {
3163                    return Err(Error::from(serde_json::Error::custom(format!(
3164                        "Received `{local_var_unknown_type}` content type response that cannot be \
3165                         converted to `models::VaultAsset`"
3166                    ))));
3167                }
3168            }
3169        } else {
3170            let local_var_entity: Option<UpdateVaultAccountAssetBalanceError> =
3171                serde_json::from_str(&local_var_content).ok();
3172            let local_var_error = ResponseContent {
3173                status: local_var_status,
3174                content: local_var_content,
3175                entity: local_var_entity,
3176            };
3177            Err(Error::ResponseError(local_var_error))
3178        }
3179    }
3180}
3181
3182/// struct for typed errors of method
3183/// [`VaultsApi::activate_asset_for_vault_account`]
3184#[derive(Debug, Clone, Serialize, Deserialize)]
3185#[serde(untagged)]
3186pub enum ActivateAssetForVaultAccountError {
3187    DefaultResponse(models::ErrorSchema),
3188    UnknownValue(serde_json::Value),
3189}
3190
3191/// struct for typed errors of method
3192/// [`VaultsApi::attach_tags_to_vault_accounts`]
3193#[derive(Debug, Clone, Serialize, Deserialize)]
3194#[serde(untagged)]
3195pub enum AttachTagsToVaultAccountsError {
3196    UnknownValue(serde_json::Value),
3197}
3198
3199/// struct for typed errors of method [`VaultsApi::create_legacy_address`]
3200#[derive(Debug, Clone, Serialize, Deserialize)]
3201#[serde(untagged)]
3202pub enum CreateLegacyAddressError {
3203    DefaultResponse(models::ErrorSchema),
3204    UnknownValue(serde_json::Value),
3205}
3206
3207/// struct for typed errors of method [`VaultsApi::create_multiple_accounts`]
3208#[derive(Debug, Clone, Serialize, Deserialize)]
3209#[serde(untagged)]
3210pub enum CreateMultipleAccountsError {
3211    DefaultResponse(models::ErrorSchema),
3212    UnknownValue(serde_json::Value),
3213}
3214
3215/// struct for typed errors of method
3216/// [`VaultsApi::create_multiple_deposit_addresses`]
3217#[derive(Debug, Clone, Serialize, Deserialize)]
3218#[serde(untagged)]
3219pub enum CreateMultipleDepositAddressesError {
3220    DefaultResponse(models::ErrorSchema),
3221    UnknownValue(serde_json::Value),
3222}
3223
3224/// struct for typed errors of method [`VaultsApi::create_vault_account`]
3225#[derive(Debug, Clone, Serialize, Deserialize)]
3226#[serde(untagged)]
3227pub enum CreateVaultAccountError {
3228    DefaultResponse(models::ErrorSchema),
3229    UnknownValue(serde_json::Value),
3230}
3231
3232/// struct for typed errors of method [`VaultsApi::create_vault_account_asset`]
3233#[derive(Debug, Clone, Serialize, Deserialize)]
3234#[serde(untagged)]
3235pub enum CreateVaultAccountAssetError {
3236    DefaultResponse(models::ErrorSchema),
3237    UnknownValue(serde_json::Value),
3238}
3239
3240/// struct for typed errors of method
3241/// [`VaultsApi::create_vault_account_asset_address`]
3242#[derive(Debug, Clone, Serialize, Deserialize)]
3243#[serde(untagged)]
3244pub enum CreateVaultAccountAssetAddressError {
3245    DefaultResponse(models::ErrorSchema),
3246    UnknownValue(serde_json::Value),
3247}
3248
3249/// struct for typed errors of method
3250/// [`VaultsApi::detach_tags_from_vault_accounts`]
3251#[derive(Debug, Clone, Serialize, Deserialize)]
3252#[serde(untagged)]
3253pub enum DetachTagsFromVaultAccountsError {
3254    UnknownValue(serde_json::Value),
3255}
3256
3257/// struct for typed errors of method [`VaultsApi::get_asset_wallets`]
3258#[derive(Debug, Clone, Serialize, Deserialize)]
3259#[serde(untagged)]
3260pub enum GetAssetWalletsError {
3261    UnknownValue(serde_json::Value),
3262}
3263
3264/// struct for typed errors of method
3265/// [`VaultsApi::get_create_multiple_deposit_addresses_job_status`]
3266#[derive(Debug, Clone, Serialize, Deserialize)]
3267#[serde(untagged)]
3268pub enum GetCreateMultipleDepositAddressesJobStatusError {
3269    DefaultResponse(models::ErrorSchema),
3270    UnknownValue(serde_json::Value),
3271}
3272
3273/// struct for typed errors of method
3274/// [`VaultsApi::get_create_multiple_vault_accounts_job_status`]
3275#[derive(Debug, Clone, Serialize, Deserialize)]
3276#[serde(untagged)]
3277pub enum GetCreateMultipleVaultAccountsJobStatusError {
3278    DefaultResponse(models::ErrorSchema),
3279    UnknownValue(serde_json::Value),
3280}
3281
3282/// struct for typed errors of method [`VaultsApi::get_max_spendable_amount`]
3283#[derive(Debug, Clone, Serialize, Deserialize)]
3284#[serde(untagged)]
3285pub enum GetMaxSpendableAmountError {
3286    DefaultResponse(models::ErrorSchema),
3287    UnknownValue(serde_json::Value),
3288}
3289
3290/// struct for typed errors of method [`VaultsApi::get_paged_vault_accounts`]
3291#[derive(Debug, Clone, Serialize, Deserialize)]
3292#[serde(untagged)]
3293pub enum GetPagedVaultAccountsError {
3294    UnknownValue(serde_json::Value),
3295}
3296
3297/// struct for typed errors of method [`VaultsApi::get_public_key_info`]
3298#[derive(Debug, Clone, Serialize, Deserialize)]
3299#[serde(untagged)]
3300pub enum GetPublicKeyInfoError {
3301    DefaultResponse(models::ErrorSchema),
3302    UnknownValue(serde_json::Value),
3303}
3304
3305/// struct for typed errors of method
3306/// [`VaultsApi::get_public_key_info_for_address`]
3307#[derive(Debug, Clone, Serialize, Deserialize)]
3308#[serde(untagged)]
3309pub enum GetPublicKeyInfoForAddressError {
3310    DefaultResponse(models::ErrorSchema),
3311    UnknownValue(serde_json::Value),
3312}
3313
3314/// struct for typed errors of method [`VaultsApi::get_unspent_inputs`]
3315#[derive(Debug, Clone, Serialize, Deserialize)]
3316#[serde(untagged)]
3317pub enum GetUnspentInputsError {
3318    DefaultResponse(models::ErrorSchema),
3319    UnknownValue(serde_json::Value),
3320}
3321
3322/// struct for typed errors of method [`VaultsApi::get_vault_account`]
3323#[derive(Debug, Clone, Serialize, Deserialize)]
3324#[serde(untagged)]
3325pub enum GetVaultAccountError {
3326    DefaultResponse(models::ErrorSchema),
3327    UnknownValue(serde_json::Value),
3328}
3329
3330/// struct for typed errors of method [`VaultsApi::get_vault_account_asset`]
3331#[derive(Debug, Clone, Serialize, Deserialize)]
3332#[serde(untagged)]
3333pub enum GetVaultAccountAssetError {
3334    DefaultResponse(models::ErrorSchema),
3335    UnknownValue(serde_json::Value),
3336}
3337
3338/// struct for typed errors of method
3339/// [`VaultsApi::get_vault_account_asset_addresses`]
3340#[derive(Debug, Clone, Serialize, Deserialize)]
3341#[serde(untagged)]
3342pub enum GetVaultAccountAssetAddressesError {
3343    DefaultResponse(models::ErrorSchema),
3344    UnknownValue(serde_json::Value),
3345}
3346
3347/// struct for typed errors of method
3348/// [`VaultsApi::get_vault_account_asset_addresses_paginated`]
3349#[derive(Debug, Clone, Serialize, Deserialize)]
3350#[serde(untagged)]
3351pub enum GetVaultAccountAssetAddressesPaginatedError {
3352    DefaultResponse(models::ErrorSchema),
3353    UnknownValue(serde_json::Value),
3354}
3355
3356/// struct for typed errors of method [`VaultsApi::get_vault_assets`]
3357#[derive(Debug, Clone, Serialize, Deserialize)]
3358#[serde(untagged)]
3359pub enum GetVaultAssetsError {
3360    DefaultResponse(models::ErrorSchema),
3361    UnknownValue(serde_json::Value),
3362}
3363
3364/// struct for typed errors of method [`VaultsApi::get_vault_balance_by_asset`]
3365#[derive(Debug, Clone, Serialize, Deserialize)]
3366#[serde(untagged)]
3367pub enum GetVaultBalanceByAssetError {
3368    DefaultResponse(models::ErrorSchema),
3369    UnknownValue(serde_json::Value),
3370}
3371
3372/// struct for typed errors of method [`VaultsApi::hide_vault_account`]
3373#[derive(Debug, Clone, Serialize, Deserialize)]
3374#[serde(untagged)]
3375pub enum HideVaultAccountError {
3376    DefaultResponse(models::ErrorSchema),
3377    UnknownValue(serde_json::Value),
3378}
3379
3380/// struct for typed errors of method
3381/// [`VaultsApi::set_customer_ref_id_for_address`]
3382#[derive(Debug, Clone, Serialize, Deserialize)]
3383#[serde(untagged)]
3384pub enum SetCustomerRefIdForAddressError {
3385    DefaultResponse(models::ErrorSchema),
3386    UnknownValue(serde_json::Value),
3387}
3388
3389/// struct for typed errors of method [`VaultsApi::set_vault_account_auto_fuel`]
3390#[derive(Debug, Clone, Serialize, Deserialize)]
3391#[serde(untagged)]
3392pub enum SetVaultAccountAutoFuelError {
3393    DefaultResponse(models::ErrorSchema),
3394    UnknownValue(serde_json::Value),
3395}
3396
3397/// struct for typed errors of method
3398/// [`VaultsApi::set_vault_account_customer_ref_id`]
3399#[derive(Debug, Clone, Serialize, Deserialize)]
3400#[serde(untagged)]
3401pub enum SetVaultAccountCustomerRefIdError {
3402    DefaultResponse(models::ErrorSchema),
3403    UnknownValue(serde_json::Value),
3404}
3405
3406/// struct for typed errors of method [`VaultsApi::unhide_vault_account`]
3407#[derive(Debug, Clone, Serialize, Deserialize)]
3408#[serde(untagged)]
3409pub enum UnhideVaultAccountError {
3410    DefaultResponse(models::ErrorSchema),
3411    UnknownValue(serde_json::Value),
3412}
3413
3414/// struct for typed errors of method [`VaultsApi::update_vault_account`]
3415#[derive(Debug, Clone, Serialize, Deserialize)]
3416#[serde(untagged)]
3417pub enum UpdateVaultAccountError {
3418    DefaultResponse(models::ErrorSchema),
3419    UnknownValue(serde_json::Value),
3420}
3421
3422/// struct for typed errors of method
3423/// [`VaultsApi::update_vault_account_asset_address`]
3424#[derive(Debug, Clone, Serialize, Deserialize)]
3425#[serde(untagged)]
3426pub enum UpdateVaultAccountAssetAddressError {
3427    DefaultResponse(models::ErrorSchema),
3428    UnknownValue(serde_json::Value),
3429}
3430
3431/// struct for typed errors of method
3432/// [`VaultsApi::update_vault_account_asset_balance`]
3433#[derive(Debug, Clone, Serialize, Deserialize)]
3434#[serde(untagged)]
3435pub enum UpdateVaultAccountAssetBalanceError {
3436    DefaultResponse(models::ErrorSchema),
3437    UnknownValue(serde_json::Value),
3438}