clerk_fapi_rs/models/backup_codes.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 BackupCodes {
16 #[serde(rename = "object")]
17 pub object: Object,
18 #[serde(rename = "id")]
19 pub id: String,
20 #[serde(rename = "codes")]
21 pub codes: Vec<String>,
22 #[serde(rename = "created_at")]
23 pub created_at: i64,
24 #[serde(rename = "updated_at")]
25 pub updated_at: i64,
26}
27
28impl BackupCodes {
29 pub fn new(
30 object: Object,
31 id: String,
32 codes: Vec<String>,
33 created_at: i64,
34 updated_at: i64,
35 ) -> BackupCodes {
36 BackupCodes {
37 object,
38 id,
39 codes,
40 created_at,
41 updated_at,
42 }
43 }
44}
45
46#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
47pub enum Object {
48 #[serde(rename = "backup_code")]
49 BackupCode,
50}
51
52impl Default for Object {
53 fn default() -> Object {
54 Self::BackupCode
55 }
56}