Skip to main content

windmill_api/models/
create_login_link_request.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.813.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct CreateLoginLinkRequest {
16    #[serde(rename = "email")]
17    pub email: String,
18    /// link lifetime in seconds, at most 900 (default 600)
19    #[serde(rename = "expires_in_s", skip_serializing_if = "Option::is_none")]
20    pub expires_in_s: Option<i32>,
21    /// same-origin path the browser lands on after login (default /user/workspaces)
22    #[serde(rename = "rd", skip_serializing_if = "Option::is_none")]
23    pub rd: Option<String>,
24    /// mint only while the account still has this login type (for example pending_oauth), so a link stops working once the owner has set a password or signed in with a provider
25    #[serde(rename = "require_login_type", skip_serializing_if = "Option::is_none")]
26    pub require_login_type: Option<String>,
27}
28
29impl CreateLoginLinkRequest {
30    pub fn new(email: String) -> CreateLoginLinkRequest {
31        CreateLoginLinkRequest {
32            email,
33            expires_in_s: None,
34            rd: None,
35            require_login_type: None,
36        }
37    }
38}
39