/*
 * Websocket Subscription Schemas
 *
 * Schema definitions Websocket API subscriptions for Thalex exchange.
 *
 * 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 LwtPayload {
    /// Best bid (if any).
    #[serde(rename = "b", skip_serializing_if = "Option::is_none")]
    pub b: Option<Vec<serde_json::Value>>,
    /// Best ask (if any).
    #[serde(rename = "a", skip_serializing_if = "Option::is_none")]
    pub a: Option<Vec<serde_json::Value>>,
    /// Mark price.
    #[serde(rename = "m", skip_serializing_if = "Option::is_none")]
    pub m: Option<rust_decimal::Decimal>,
    /// Mark volatility.  Only included for options. Not included for combinations.
    #[serde(rename = "v", skip_serializing_if = "Option::is_none")]
    pub v: Option<rust_decimal::Decimal>,
    /// Price of last trade (if any).  Not included for combinations.
    #[serde(rename = "l", skip_serializing_if = "Option::is_none")]
    pub l: Option<rust_decimal::Decimal>,
}

impl LwtPayload {
    pub fn new() -> LwtPayload {
        LwtPayload {
            b: None,
            a: None,
            m: None,
            v: None,
            l: None,
        }
    }
}
