clerk_rs/models/
identification_link.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 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///
26#[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}