/*
 * 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 UnderlyingStatisticsOpenInterestTotals {
    /// Total count of outstanding unsettled call options for the given underlying.
    #[serde(rename = "call")]
    pub call: rust_decimal::Decimal,
    /// Total count of outstanding unsettled put options for the given underlying.
    #[serde(rename = "put")]
    pub put: rust_decimal::Decimal,
    /// Total count of outstanding unsettled options for the given underlying.
    #[serde(rename = "option")]
    pub option: rust_decimal::Decimal,
    /// Total count of outstanding unsettled future contracts for the given underlying.
    #[serde(rename = "future")]
    pub future: rust_decimal::Decimal,
    /// Total count of outstanding unsettled delta one (future and perpetual) contracts for the given underlying.
    #[serde(rename = "delta_one")]
    pub delta_one: rust_decimal::Decimal,
}

impl UnderlyingStatisticsOpenInterestTotals {
    pub fn new(
        call: rust_decimal::Decimal,
        put: rust_decimal::Decimal,
        option: rust_decimal::Decimal,
        future: rust_decimal::Decimal,
        delta_one: rust_decimal::Decimal,
    ) -> UnderlyingStatisticsOpenInterestTotals {
        UnderlyingStatisticsOpenInterestTotals {
            call,
            put,
            option,
            future,
            delta_one,
        }
    }
}
