clerk_fapi_rs/models/
user_settings_attribute.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 UserSettingsAttribute {
16    #[serde(rename = "enabled")]
17    pub enabled: bool,
18    #[serde(rename = "required")]
19    pub required: bool,
20    #[serde(rename = "used_for_first_factor")]
21    pub used_for_first_factor: bool,
22    #[serde(rename = "first_factors")]
23    pub first_factors: Vec<String>,
24    #[serde(rename = "used_for_second_factor")]
25    pub used_for_second_factor: bool,
26    #[serde(rename = "second_factors")]
27    pub second_factors: Vec<String>,
28    #[serde(rename = "verifications")]
29    pub verifications: Vec<String>,
30    #[serde(rename = "verify_at_sign_up")]
31    pub verify_at_sign_up: bool,
32}
33
34impl UserSettingsAttribute {
35    pub fn new(
36        enabled: bool,
37        required: bool,
38        used_for_first_factor: bool,
39        first_factors: Vec<String>,
40        used_for_second_factor: bool,
41        second_factors: Vec<String>,
42        verifications: Vec<String>,
43        verify_at_sign_up: bool,
44    ) -> UserSettingsAttribute {
45        UserSettingsAttribute {
46            enabled,
47            required,
48            used_for_first_factor,
49            first_factors,
50            used_for_second_factor,
51            second_factors,
52            verifications,
53            verify_at_sign_up,
54        }
55    }
56}