Skip to main content

clerk_sdk_rust_community/models/
update_instance_auth_config_request.rs

1/*
2 * Clerk Backend API
3 *
4 * The Clerk REST Backend API, meant to be accessed by backend servers. Please see https://clerk.com/docs for more information.
5 *
6 * The version of the OpenAPI document: v1
7 * Contact: support@clerk.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
15pub struct UpdateInstanceAuthConfigRequest {
16    /// Whether sign up is restricted to email addresses, phone numbers and usernames that are on the allowlist.
17    #[serde(rename = "restricted_to_allowlist", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
18    pub restricted_to_allowlist: Option<Option<bool>>,
19    /// The local part of the email address from which authentication-related emails (e.g. OTP code, magic links) will be sent. Only alphanumeric values are allowed. Note that this value should contain only the local part of the address (e.g. `foo` for `foo@example.com`).
20    #[serde(rename = "from_email_address", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
21    pub from_email_address: Option<Option<String>>,
22    /// Enable the Progressive Sign Up algorithm. Refer to the [docs](https://clerk.com/docs/upgrade-guides/progressive-sign-up) for more info.
23    #[serde(rename = "progressive_sign_up", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24    pub progressive_sign_up: Option<Option<bool>>,
25    /// The name of the JWT Template used to augment your session tokens. To disable this, pass an empty string.
26    #[serde(rename = "session_token_template", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub session_token_template: Option<Option<String>>,
28    /// The \"enhanced_email_deliverability\" feature will send emails from \"verifications@clerk.dev\" instead of your domain. This can be helpful if you do not have a high domain reputation.
29    #[serde(rename = "enhanced_email_deliverability", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
30    pub enhanced_email_deliverability: Option<Option<bool>>,
31    /// Toggles test mode for this instance, allowing the use of test email addresses and phone numbers. Defaults to true for development instances.
32    #[serde(rename = "test_mode", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
33    pub test_mode: Option<Option<bool>>,
34}
35
36impl UpdateInstanceAuthConfigRequest {
37    pub fn new() -> UpdateInstanceAuthConfigRequest {
38        UpdateInstanceAuthConfigRequest {
39            restricted_to_allowlist: None,
40            from_email_address: None,
41            progressive_sign_up: None,
42            session_token_template: None,
43            enhanced_email_deliverability: None,
44            test_mode: None,
45        }
46    }
47}
48
49