metaculus 0.4.0

API Client for Metaculus
Documentation
/*
 * Metaculus API
 *
 * Welcome to the unofficial Rust client for the Metaculus API
 *
 * The version of the OpenAPI document: 1.0
 * Contact: Benjamin Manns <opensource@benmanns.com>
 * Generated by: https://openapi-generator.tech
 */

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct QuestionResolve {
    #[serde(rename = "resolution", deserialize_with = "Option::deserialize")]
    pub resolution: Option<f64>,
    #[serde(rename = "date", deserialize_with = "Option::deserialize")]
    pub date: Option<String>,
    #[serde(rename = "notifyPredictors")]
    pub notify_predictors: bool,
}

impl QuestionResolve {
    #[must_use]
    pub fn new(
        resolution: Option<f64>,
        date: Option<String>,
        notify_predictors: bool,
    ) -> QuestionResolve {
        QuestionResolve {
            resolution,
            date,
            notify_predictors,
        }
    }
}