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 Organization {
    #[serde(rename = "id")]
    pub id: i32,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "subtitle")]
    pub subtitle: String,
    #[serde(rename = "description")]
    pub description: String,
    #[serde(rename = "type")]
    pub r#type: String,
    #[serde(rename = "user_project_perms")]
    pub user_project_perms: i32,
    #[serde(rename = "absolute_url")]
    pub absolute_url: String,
}

impl Organization {
    #[must_use]
    pub fn new(
        id: i32,
        name: String,
        subtitle: String,
        description: String,
        r#type: String,
        user_project_perms: i32,
        absolute_url: String,
    ) -> Organization {
        Organization {
            id,
            name,
            subtitle,
            description,
            r#type,
            user_project_perms,
            absolute_url,
        }
    }
}