use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct IndicesConstituents {
pub symbol: String,
pub constituents: Vec<String>,
#[serde(rename = "constituentsBreakdown")]
pub constituents_breakdown: Vec<ConstituentDetails>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ConstituentDetails {
pub symbol: String,
pub name: String,
pub cusip: Option<String>,
pub isin: Option<String>,
#[serde(rename = "shareClassFIGI")]
pub share_class_figi: Option<String>,
pub weight: Option<f64>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct IndicesHistoricalConstituents {
pub symbol: String,
#[serde(rename = "historicalConstituents")]
pub historical_constituents: Vec<HistoricalConstituent>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct HistoricalConstituent {
pub symbol: String,
pub action: String,
pub date: String,
pub name: Option<String>,
}