clerk_rs/models/
identification_link.rs1#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12pub struct IdentificationLink {
13 #[serde(rename = "type")]
14 pub r#type: Type,
15 #[serde(rename = "id")]
16 pub id: String,
17}
18
19impl IdentificationLink {
20 pub fn new(r#type: Type, id: String) -> IdentificationLink {
21 IdentificationLink { r#type, id }
22 }
23}
24
25#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
27pub enum Type {
28 #[serde(rename = "oauth_google")]
29 OauthGoogle,
30 #[serde(rename = "oauth_twitter")]
31 OauthTwitter,
32 #[serde(rename = "oauth_mock")]
33 OauthMock,
34 #[serde(rename = "saml")]
35 Saml,
36 #[serde(other)]
37 Other,
38}
39
40impl Default for Type {
41 fn default() -> Type {
42 Self::OauthGoogle
43 }
44}