clerk_fapi_rs/models/
client_user_settings.rs

1/*
2 * Clerk Frontend API
3 *
4 * The Clerk REST Frontend API, meant to be accessed from a browser or native environment.  This is a Form Based API and all the data must be sent and formatted according to the `application/x-www-form-urlencoded` content type.  ### Versions  When the API changes in a way that isn't compatible with older versions, a new version is released. Each version is identified by its release date, e.g. `2021-02-05`. For more information, please see [Clerk API Versions](https://clerk.com/docs/backend-requests/versioning/overview).  ### Using the Try It Console  The `Try It` feature of the docs only works for **Development Instances** when using the `DevBrowser` security scheme. To use it, first generate a dev instance token from the `/v1/dev_browser` endpoint.  Please see https://clerk.com/docs for more information.
5 *
6 * The version of the OpenAPI document: v1
7 * Contact: support@clerk.com
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 ClientUserSettings {
16    #[serde(rename = "attributes")]
17    pub attributes: Box<models::UserSettingsAttributes>,
18    #[serde(rename = "social")]
19    pub social: Box<models::UserSettingsSocials>,
20    #[serde(rename = "saml")]
21    pub saml: Box<models::UserSettingsEnterpriseSso>,
22    #[serde(rename = "enterprise_sso")]
23    pub enterprise_sso: Box<models::UserSettingsEnterpriseSso>,
24    #[serde(rename = "sign_in")]
25    pub sign_in: Box<models::UserSettingsSignIn>,
26    #[serde(rename = "sign_up")]
27    pub sign_up: Box<models::UserSettingsSignUp>,
28    #[serde(rename = "restrictions")]
29    pub restrictions: Box<models::UserSettingsRestrictions>,
30    #[serde(rename = "password_settings")]
31    pub password_settings: Box<models::UserSettingsPasswordSettings>,
32    #[serde(rename = "username_settings")]
33    pub username_settings: Box<models::UserSettingsUsernameSettings>,
34    #[serde(rename = "actions")]
35    pub actions: Box<models::UserSettingsActionsSettings>,
36    #[serde(rename = "attack_protection")]
37    pub attack_protection: Box<models::UserSettingsAttackProtectionSettings>,
38    #[serde(rename = "passkey_settings")]
39    pub passkey_settings: Box<models::UserSettingsPasskeySettings>,
40}
41
42impl ClientUserSettings {
43    pub fn new(
44        attributes: models::UserSettingsAttributes,
45        social: models::UserSettingsSocials,
46        saml: models::UserSettingsEnterpriseSso,
47        enterprise_sso: models::UserSettingsEnterpriseSso,
48        sign_in: models::UserSettingsSignIn,
49        sign_up: models::UserSettingsSignUp,
50        restrictions: models::UserSettingsRestrictions,
51        password_settings: models::UserSettingsPasswordSettings,
52        username_settings: models::UserSettingsUsernameSettings,
53        actions: models::UserSettingsActionsSettings,
54        attack_protection: models::UserSettingsAttackProtectionSettings,
55        passkey_settings: models::UserSettingsPasskeySettings,
56    ) -> ClientUserSettings {
57        ClientUserSettings {
58            attributes: Box::new(attributes),
59            social: Box::new(social),
60            saml: Box::new(saml),
61            enterprise_sso: Box::new(enterprise_sso),
62            sign_in: Box::new(sign_in),
63            sign_up: Box::new(sign_up),
64            restrictions: Box::new(restrictions),
65            password_settings: Box::new(password_settings),
66            username_settings: Box::new(username_settings),
67            actions: Box::new(actions),
68            attack_protection: Box::new(attack_protection),
69            passkey_settings: Box::new(passkey_settings),
70        }
71    }
72}