/*
 * OpenAPI
 *
 * OpenAPI
 *
 * The version of the OpenAPI document: 0.0.1
 *
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SubaccountLiquidationMessageData {
    /// Subaccount identifier.
    #[serde(rename = "sid")]
    pub sid: uuid::Uuid,
    /// Timestamp in milliseconds of the liquidation event.
    #[serde(rename = "t")]
    pub t: i64,
    /// Liquidated positions or fills.
    #[serde(rename = "d")]
    pub d: Vec<models::SubaccountLiquidationMessageDataDInner>,
}

impl SubaccountLiquidationMessageData {
    pub fn new(
        sid: uuid::Uuid,
        t: i64,
        d: Vec<models::SubaccountLiquidationMessageDataDInner>,
    ) -> SubaccountLiquidationMessageData {
        SubaccountLiquidationMessageData { sid, t, d }
    }
}
