/*
 * Thalex RPC API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// VerifyInternalTransferRpcResultError : Only present when the transfer is not possible, in which case it describes the error such transfer would result in.  Note: this is different from the top level `result`/`error` in the response.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct VerifyInternalTransferRpcResultError {
    /// Error code
    #[serde(rename = "code")]
    pub code: rust_decimal::Decimal,
    /// Error message
    #[serde(rename = "message")]
    pub message: String,
}

impl VerifyInternalTransferRpcResultError {
    /// Only present when the transfer is not possible, in which case it describes the error such transfer would result in.  Note: this is different from the top level `result`/`error` in the response.
    pub fn new(
        code: rust_decimal::Decimal,
        message: String,
    ) -> VerifyInternalTransferRpcResultError {
        VerifyInternalTransferRpcResultError { code, message }
    }
}
