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};

/// PublishedStyle : A set of published properties that can be applied to nodes.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PublishedStyle {
    /// The unique identifier for the style
    #[serde(rename = "key")]
    pub key: String,
    /// The unique identifier of the Figma file that contains the style.
    #[serde(rename = "file_key")]
    pub file_key: String,
    /// ID of the style node within the figma file
    #[serde(rename = "node_id")]
    pub node_id: String,
    #[serde(rename = "style_type")]
    pub style_type: models::StyleType,
    /// A URL to a thumbnail image of the style.
    #[serde(rename = "thumbnail_url", skip_serializing_if = "Option::is_none")]
    pub thumbnail_url: Option<String>,
    /// The name of the style.
    #[serde(rename = "name")]
    pub name: String,
    /// The description of the style as entered by the publisher.
    #[serde(rename = "description")]
    pub description: String,
    /// The UTC ISO 8601 time when the style was created.
    #[serde(rename = "created_at")]
    pub created_at: String,
    /// The UTC ISO 8601 time when the style was last updated.
    #[serde(rename = "updated_at")]
    pub updated_at: String,
    /// The user who last updated the style.
    #[serde(rename = "user")]
    pub user: Box<models::User>,
    /// A user specified order number by which the style can be sorted.
    #[serde(rename = "sort_position")]
    pub sort_position: String,
}

impl PublishedStyle {
    /// A set of published properties that can be applied to nodes.
    pub fn new(key: String, file_key: String, node_id: String, style_type: models::StyleType, name: String, description: String, created_at: String, updated_at: String, user: models::User, sort_position: String) -> PublishedStyle {
        PublishedStyle {
            key,
            file_key,
            node_id,
            style_type,
            thumbnail_url: None,
            name,
            description,
            created_at,
            updated_at,
            user: Box::new(user),
            sort_position,
        }
    }
}