revolt_api 0.5.5

Rust typings for the Revolt API.
Documentation
/*
 * Revolt API
 *
 * Open source user-first chat platform.
 *
 * The version of the OpenAPI document: 0.5.5
 * Contact: contact@revolt.chat
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct DataLogin {
    /// Email
    #[serde(rename = "email")]
    pub email: String,
    /// Password
    #[serde(rename = "password")]
    pub password: String,
    /// Captcha verification code
    #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")]
    pub captcha: Option<String>,
    /// Friendly name used for the session
    #[serde(rename = "friendly_name", skip_serializing_if = "Option::is_none")]
    pub friendly_name: Option<String>,
    /// Unvalidated MFA ticket  Used to resolve the correct account
    #[serde(rename = "mfa_ticket")]
    pub mfa_ticket: String,
    /// Valid MFA response  This will take precedence over the `password` field where applicable
    #[serde(rename = "mfa_response")]
    pub mfa_response: Option<Box<crate::models::MfaResponse>>,
}

impl DataLogin {
    pub fn new(email: String, password: String, mfa_ticket: String, mfa_response: Option<crate::models::MfaResponse>) -> DataLogin {
        DataLogin {
            email,
            password,
            captcha: None,
            friendly_name: None,
            mfa_ticket,
            mfa_response: super::box_option(mfa_response),
        }
    }
}