/*
 * 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 IndexComponentsPayload {
    /// Price of the index.
    #[serde(rename = "index_price", skip_serializing_if = "Option::is_none")]
    pub index_price: Option<rust_decimal::Decimal>,
    /// Components that were used in calculating the index price. Code name of the source is mapped to its price.
    #[serde(rename = "components", skip_serializing_if = "Option::is_none")]
    pub components: Option<serde_json::Value>,
}

impl IndexComponentsPayload {
    pub fn new() -> IndexComponentsPayload {
        IndexComponentsPayload {
            index_price: None,
            components: None,
        }
    }
}
