deriv_api_schema/data_item.rs
1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/trading_durations/receive.json
4
5// Use direct crate names for imports within generated files
6use serde::{Deserialize, Serialize};
7
8
9
10
11// Import shared types from the *same* crate
12use crate::symbol_item::SymbolItem;
13use crate::market::Market;
14use crate::submarket::Submarket;
15use crate::trade_duration_item::TradeDurationItem;
16
17// It's a struct
18#[derive(Debug, Clone, Serialize, Deserialize)]
19#[serde(rename_all = "snake_case")]
20pub struct DataItem {
21 /// The market in which the underlyings listed in `symbol` located.\n
22 // Correct serde attribute construction - Use helper
23 #[serde(skip_serializing_if = "Option::is_none")]
24 pub market: Option<Market>,
25 /// The submarket in which the underlyings listed in `symbol` located.\n
26 // Correct serde attribute construction - Use helper
27 #[serde(skip_serializing_if = "Option::is_none")]
28 pub submarket: Option<Submarket>,
29 /// List of underlying symbols.\n
30 // Correct serde attribute construction - Use helper
31 #[serde(skip_serializing_if = "Option::is_none")]
32 pub symbol: Option<Vec<SymbolItem>>,
33 /// List of trade durations available for symbols and contract combinations.\n
34 // Correct serde attribute construction - Use helper
35 #[serde(skip_serializing_if = "Option::is_none")]
36 pub trade_durations: Option<Vec<TradeDurationItem>>,
37}
38