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

/// UnderlyingStatisticsOpenInterest : Total count of outstanding contracts statistics.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UnderlyingStatisticsOpenInterest {
    /// Total count of outstanding contracts statistics per expiration date.
    #[serde(rename = "expirations", skip_serializing_if = "Option::is_none")]
    pub expirations: Option<Vec<models::UnderlyingStatisticsOpenInterestExpirationsInner>>,
    #[serde(rename = "totals", skip_serializing_if = "Option::is_none")]
    pub totals: Option<models::UnderlyingStatisticsOpenInterestTotals>,
}

impl UnderlyingStatisticsOpenInterest {
    /// Total count of outstanding contracts statistics.
    pub fn new() -> UnderlyingStatisticsOpenInterest {
        UnderlyingStatisticsOpenInterest {
            expirations: None,
            totals: None,
        }
    }
}
