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.815.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 7200 (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 /// return a /user/login_link page that signs in only when its button is clicked, instead of a link spent by opening it; set it for links sent by email, which mail scanners open on delivery (default false)
28 #[serde(rename = "confirm", skip_serializing_if = "Option::is_none")]
29 pub confirm: Option<bool>,
30}
31
32impl CreateLoginLinkRequest {
33 pub fn new(email: String) -> CreateLoginLinkRequest {
34 CreateLoginLinkRequest {
35 email,
36 expires_in_s: None,
37 rd: None,
38 require_login_type: None,
39 confirm: None,
40 }
41 }
42}
43