/*
 * 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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct VerifyInternalTransferRpcResult {
    /// Available margin in the source account after the transfer is performed.
    #[serde(rename = "source_available_margin")]
    pub source_available_margin: rust_decimal::Decimal,
    /// Required margin in the source account after the transfer is performed.
    #[serde(rename = "source_required_margin")]
    pub source_required_margin: rust_decimal::Decimal,
    /// Available margin in the destination account after the transfer is performed.
    #[serde(rename = "destination_available_margin")]
    pub destination_available_margin: rust_decimal::Decimal,
    /// Required margin in the destination account after the transfer is performed.
    #[serde(rename = "destination_required_margin")]
    pub destination_required_margin: rust_decimal::Decimal,
    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
    pub error: Option<models::VerifyInternalTransferRpcResultError>,
}

impl VerifyInternalTransferRpcResult {
    pub fn new(
        source_available_margin: rust_decimal::Decimal,
        source_required_margin: rust_decimal::Decimal,
        destination_available_margin: rust_decimal::Decimal,
        destination_required_margin: rust_decimal::Decimal,
    ) -> VerifyInternalTransferRpcResult {
        VerifyInternalTransferRpcResult {
            source_available_margin,
            source_required_margin,
            destination_available_margin,
            destination_required_margin,
            error: None,
        }
    }
}
