clerk_rs/models/
admin.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.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12pub struct Admin {
13	#[serde(rename = "status")]
14	pub status: Status,
15	#[serde(rename = "strategy")]
16	pub strategy: Strategy,
17	#[serde(rename = "attempts", skip_serializing_if = "Option::is_none")]
18	pub attempts: Option<i64>,
19	#[serde(rename = "expire_at", skip_serializing_if = "Option::is_none")]
20	pub expire_at: Option<i64>,
21}
22
23impl Admin {
24	pub fn new(status: Status, strategy: Strategy) -> Admin {
25		Admin {
26			status,
27			strategy,
28			attempts: None,
29			expire_at: None,
30		}
31	}
32}
33
34///
35#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
36pub enum Status {
37	#[serde(rename = "verified")]
38	Verified,
39}
40
41impl Default for Status {
42	fn default() -> Status {
43		Self::Verified
44	}
45}
46///
47#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
48pub enum Strategy {
49	#[serde(rename = "admin")]
50	Admin,
51}
52
53impl Default for Strategy {
54	fn default() -> Strategy {
55		Self::Admin
56	}
57}