#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct IdentificationLink {
#[serde(rename = "type")]
pub r#type: RHashType,
#[serde(rename = "id")]
pub id: String,
}
impl IdentificationLink {
pub fn new(r#type: RHashType, id: String) -> IdentificationLink {
IdentificationLink {
r#type,
id,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum RHashType {
#[serde(rename = "oauth_google")]
Google,
#[serde(rename = "oauth_mock")]
Mock,
}
impl Default for RHashType {
fn default() -> RHashType {
Self::Google
}
}