fireblocks_sdk/models/
transfer_validation_failure.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    crate::models,
11    serde::{Deserialize, Serialize},
12};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct TransferValidationFailure {
16    #[serde(rename = "reason")]
17    pub reason: Reason,
18    #[serde(rename = "data", skip_serializing_if = "Option::is_none")]
19    pub data: Option<std::collections::HashMap<String, serde_json::Value>>,
20}
21
22impl TransferValidationFailure {
23    pub fn new(reason: Reason) -> TransferValidationFailure {
24        TransferValidationFailure { reason, data: None }
25    }
26}
27///
28#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
29pub enum Reason {
30    #[serde(rename = "ACCOUNT_NOT_FOUND")]
31    AccountNotFound,
32    #[serde(rename = "ACCOUNT_TYPE_NOT_SUPPORTED")]
33    AccountTypeNotSupported,
34    #[serde(rename = "INSUFFICIENT_BALANCE")]
35    InsufficientBalance,
36    #[serde(rename = "ASSET_NOT_FOUND")]
37    AssetNotFound,
38    #[serde(rename = "ASSETS_CONTINUITY_MISMATCH")]
39    AssetsContinuityMismatch,
40    #[serde(rename = "EXCHANGE_BASKETS_MISMATCH")]
41    ExchangeBasketsMismatch,
42    #[serde(rename = "ACCOUNTS_CONTINUITY_MISMATCH")]
43    AccountsContinuityMismatch,
44    #[serde(rename = "ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED")]
45    OneTimeAddressContinuityNotAllowed,
46    #[serde(rename = "EQUAL_ACCOUNTS_NOT_ALLOWED")]
47    EqualAccountsNotAllowed,
48    #[serde(rename = "EQUAL_ASSETS_NOT_ALLOWED")]
49    EqualAssetsNotAllowed,
50    #[serde(rename = "INVALID_AMOUNT")]
51    InvalidAmount,
52    #[serde(rename = "UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED")]
53    UnmanagedWalletAsSourceNotAllowed,
54    #[serde(rename = "MANAGED_OPERATION_PARAMS_INVALID_SCHEMA")]
55    ManagedOperationParamsInvalidSchema,
56}
57
58impl Default for Reason {
59    fn default() -> Reason {
60        Self::AccountNotFound
61    }
62}