clerk_sdk_rust_community/models/
web3_wallet_verification.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 Web3WalletVerification {
16    #[serde(rename = "status")]
17    pub status: Status,
18    #[serde(rename = "strategy")]
19    pub strategy: Strategy,
20    #[serde(rename = "nonce")]
21    pub nonce: Nonce,
22    #[serde(rename = "attempts", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
23    pub attempts: Option<Option<i32>>,
24    #[serde(rename = "expire_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub expire_at: Option<Option<i32>>,
26}
27
28impl Web3WalletVerification {
29    pub fn new(status: Status, strategy: Strategy, nonce: Nonce) -> Web3WalletVerification {
30        Web3WalletVerification {
31            status,
32            strategy,
33            nonce,
34            attempts: None,
35            expire_at: None,
36        }
37    }
38}
39
40/// 
41#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
42pub enum Status {
43    #[serde(rename = "verified")]
44    Verified,
45}
46
47impl Default for Status {
48    fn default() -> Status {
49        Self::Verified
50    }
51}
52/// 
53#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
54pub enum Strategy {
55    #[serde(rename = "admin")]
56    Admin,
57}
58
59impl Default for Strategy {
60    fn default() -> Strategy {
61        Self::Admin
62    }
63}
64/// 
65#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
66pub enum Nonce {
67    #[serde(rename = "nonce")]
68    Nonce,
69}
70
71impl Default for Nonce {
72    fn default() -> Nonce {
73        Self::Nonce
74    }
75}
76