/*
 * 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 UnderlyingStatisticsOpenInterestExpirationsInner {
    /// Expiration time as Unix timestamp (seconds).
    #[serde(
        rename = "expiration_timestamp",
        skip_serializing_if = "Option::is_none"
    )]
    pub expiration_timestamp: Option<i32>,
    /// Expiration date in ISO format (YYYY-mm-dd).
    #[serde(rename = "expiry_date", skip_serializing_if = "Option::is_none")]
    pub expiry_date: Option<String>,
    /// Total count of outstanding unsettled call options for the given expiration and underlying.
    #[serde(rename = "call", skip_serializing_if = "Option::is_none")]
    pub call: Option<rust_decimal::Decimal>,
    /// Total count of outstanding unsettled put options for the given expiration and underlying.
    #[serde(rename = "put", skip_serializing_if = "Option::is_none")]
    pub put: Option<rust_decimal::Decimal>,
    /// Total count of outstanding unsettled options for the given expiration and underlying.
    #[serde(rename = "option", skip_serializing_if = "Option::is_none")]
    pub option: Option<rust_decimal::Decimal>,
    /// Total count of outstanding unsettled future contracts for the given expiration and underlying.
    #[serde(rename = "future", skip_serializing_if = "Option::is_none")]
    pub future: Option<rust_decimal::Decimal>,
}

impl UnderlyingStatisticsOpenInterestExpirationsInner {
    pub fn new() -> UnderlyingStatisticsOpenInterestExpirationsInner {
        UnderlyingStatisticsOpenInterestExpirationsInner {
            expiration_timestamp: None,
            expiry_date: None,
            call: None,
            put: None,
            option: None,
            future: None,
        }
    }
}
