#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum QuestionTypes {
#[serde(rename = "forecast")]
Forecast,
#[serde(rename = "notebook")]
Notebook,
#[serde(rename = "discussion")]
Discussion,
#[serde(rename = "claim")]
Claim,
#[serde(rename = "group")]
Group,
#[serde(rename = "conditional_group")]
ConditionalGroup,
#[serde(rename = "multiple_choice")]
MultipleChoice,
}
impl ToString for QuestionTypes {
fn to_string(&self) -> String {
match self {
Self::Forecast => String::from("forecast"),
Self::Notebook => String::from("notebook"),
Self::Discussion => String::from("discussion"),
Self::Claim => String::from("claim"),
Self::Group => String::from("group"),
Self::ConditionalGroup => String::from("conditional_group"),
Self::MultipleChoice => String::from("multiple_choice"),
}
}
}
impl Default for QuestionTypes {
fn default() -> QuestionTypes {
Self::Forecast
}
}