deriv_api_schema/
mt5_password_change_request.rs

1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/mt5_password_change/send.json
4
5// Use direct crate names for imports
6use serde::{Deserialize, Serialize};
7use serde_json::Value;
8
9
10
11// Import required types from the *same* crate
12use crate::password_type::PasswordType;
13
14/// To change passwords of the MT5 account.
15#[derive(Debug, Clone, Serialize, Deserialize)]
16#[serde(rename_all = "snake_case")]
17pub struct Mt5PasswordChangeRequest {
18    /// MT5 user login\n
19    // Correct serde attribute construction - Use helper
20    
21    pub login: String,
22    /// [Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.\n
23    // Correct serde attribute construction - Use helper
24    #[serde(skip_serializing_if = "Option::is_none")] 
25    pub loginid: Option<String>,
26    /// Must be `1`\n
27    // Correct serde attribute construction - Use helper
28    
29    pub mt5_password_change: i64,
30    /// New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address).\n
31    // Correct serde attribute construction - Use helper
32    
33    pub new_password: String,
34    /// Old password for validation (non-empty string, accepts any printable ASCII character)\n
35    // Correct serde attribute construction - Use helper
36    
37    pub old_password: String,
38    /// [Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.\n
39    // Correct serde attribute construction - Use helper
40    #[serde(skip_serializing_if = "Option::is_none")] 
41    pub passthrough: Option<Value>,
42    /// [Optional] Type of the password to change.\n
43    // Correct serde attribute construction - Use helper
44    #[serde(skip_serializing_if = "Option::is_none")] 
45    pub password_type: Option<PasswordType>,
46    /// [Optional] Used to map request to response.\n
47    // Correct serde attribute construction - Use helper
48    #[serde(skip_serializing_if = "Option::is_none")] 
49    pub req_id: Option<i64>,
50}
51