#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct IdentificationLink {
#[serde(rename = "type")]
pub r#type: Type,
#[serde(rename = "id")]
pub id: String,
}
impl IdentificationLink {
pub fn new(r#type: Type, id: String) -> IdentificationLink {
IdentificationLink { r#type, id }
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "oauth_google")]
OauthGoogle,
#[serde(rename = "oauth_twitter")]
OauthTwitter,
#[serde(rename = "oauth_mock")]
OauthMock,
#[serde(rename = "saml")]
Saml,
#[serde(other)]
Other,
}
impl Default for Type {
fn default() -> Type {
Self::OauthGoogle
}
}