deriv_api_schema/
trading_server_item.rs

1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/trading_servers/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::geolocation::Geolocation; 
13use crate::id::Id; 
14use crate::recommended::Recommended; 
15use crate::environment::Environment; 
16use crate::account_type::AccountType; 
17use crate::disabled::Disabled; 
18
19// It's a struct
20#[derive(Debug, Clone, Serialize, Deserialize)]
21#[serde(rename_all = "snake_case")]
22pub struct TradingServerItem {
23    /// Supported trading account type.\n
24    // Correct serde attribute construction - Use helper
25    #[serde(skip_serializing_if = "Option::is_none")] 
26    pub account_type: Option<AccountType>,
27    /// Flag to represent if this server is currently disabled or not\n
28    // Correct serde attribute construction - Use helper
29    #[serde(skip_serializing_if = "Option::is_none")] 
30    pub disabled: Option<Disabled>,
31    /// Current environment (installation instance) where servers are deployed. Currently, there are one demo and two real environments.\n
32    // Correct serde attribute construction - Use helper
33    #[serde(skip_serializing_if = "Option::is_none")] 
34    pub environment: Option<Environment>,
35    /// Object containing geolocation information of the server.\n
36    // Correct serde attribute construction - Use helper
37    #[serde(skip_serializing_if = "Option::is_none")] 
38    pub geolocation: Option<Geolocation>,
39    /// Server unique id.\n
40    // Correct serde attribute construction - Use helper
41    #[serde(skip_serializing_if = "Option::is_none")] 
42    pub id: Option<Id>,
43    /// Market type\n
44    // Correct serde attribute construction - Use helper
45    #[serde(skip_serializing_if = "Option::is_none")] 
46    pub market_type: Option<String>,
47    /// Error message to client when server is disabled\n
48    // Correct serde attribute construction - Use helper
49    #[serde(skip_serializing_if = "Option::is_none")] 
50    pub message_to_client: Option<String>,
51    /// Flag to represent if this is server is recommended based on client's country of residence.\n
52    // Correct serde attribute construction - Use helper
53    #[serde(skip_serializing_if = "Option::is_none")] 
54    pub recommended: Option<Recommended>,
55    /// Account type supported by the server.\n
56    // Correct serde attribute construction - Use helper
57    #[serde(skip_serializing_if = "Option::is_none")] 
58    pub supported_accounts: Option<Vec<String>>,
59}
60