/*
* Windmill API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.892.0
* Contact: contact@windmill.dev
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Login {
#[serde(rename = "email")]
pub email: String,
#[serde(rename = "password")]
pub password: String,
/// Current code of the account's authenticator app, or one of its recovery codes. Required once the account has two-factor authentication enabled; the login answers \"Two-factor code required\" when it is missing and the password is correct.
#[serde(rename = "totp_code", skip_serializing_if = "Option::is_none")]
pub totp_code: Option<String>,
}
impl Login {
pub fn new(email: String, password: String) -> Login {
Login {
email,
password,
totp_code: None,
}
}
}