figma-api 0.31.4

This is the OpenAPI specification for the [Figma REST API](https://www.figma.com/developers/api). Note: we are releasing the OpenAPI specification as a beta given the large surface area and complexity of the REST API. If you notice any inaccuracies with the specification, please [file an issue](https://github.com/figma/rest-api-spec/issues).
Documentation
/*
 * Figma API
 *
 * This is the OpenAPI specification for the [Figma REST API](https://www.figma.com/developers/api).  Note: we are releasing the OpenAPI specification as a beta given the large surface area and complexity of the REST API. If you notice any inaccuracies with the specification, please [file an issue](https://github.com/figma/rest-api-spec/issues).
 *
 * The version of the OpenAPI document: 0.31.0
 * Contact: support@figma.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// Reaction : A reaction left by a user.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Reaction {
    /// The user who left the reaction.
    #[serde(rename = "user")]
    pub user: Box<models::User>,
    /// The emoji type of reaction as shortcode (e.g. `:heart:`, `:+1::skin-tone-2:`). The list of accepted emoji shortcodes can be found in [this file](https://raw.githubusercontent.com/missive/emoji-mart/main/packages/emoji-mart-data/sets/14/native.json) under the top-level emojis and aliases fields, with optional skin tone modifiers when applicable.
    #[serde(rename = "emoji")]
    pub emoji: String,
    /// The UTC ISO 8601 time at which the reaction was left.
    #[serde(rename = "created_at")]
    pub created_at: String,
}

impl Reaction {
    /// A reaction left by a user.
    pub fn new(user: models::User, emoji: String, created_at: String) -> Reaction {
        Reaction {
            user: Box::new(user),
            emoji,
            created_at,
        }
    }
}