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

/// PublishedComponent : An arrangement of published UI elements that can be instantiated across figma files.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PublishedComponent {
    /// The unique identifier for the component.
    #[serde(rename = "key")]
    pub key: String,
    /// The unique identifier of the Figma file that contains the component.
    #[serde(rename = "file_key")]
    pub file_key: String,
    /// The unique identifier of the component node within the Figma file.
    #[serde(rename = "node_id")]
    pub node_id: String,
    /// A URL to a thumbnail image of the component.
    #[serde(rename = "thumbnail_url", skip_serializing_if = "Option::is_none")]
    pub thumbnail_url: Option<String>,
    /// The name of the component.
    #[serde(rename = "name")]
    pub name: String,
    /// The description of the component as entered by the publisher.
    #[serde(rename = "description")]
    pub description: String,
    /// The UTC ISO 8601 time when the component was created.
    #[serde(rename = "created_at")]
    pub created_at: String,
    /// The UTC ISO 8601 time when the component was last updated.
    #[serde(rename = "updated_at")]
    pub updated_at: String,
    /// The user who last updated the component.
    #[serde(rename = "user")]
    pub user: Box<models::User>,
    /// The containing frame of the component.
    #[serde(rename = "containing_frame", skip_serializing_if = "Option::is_none")]
    pub containing_frame: Option<Box<models::FrameInfo>>,
}

impl PublishedComponent {
    /// An arrangement of published UI elements that can be instantiated across figma files.
    pub fn new(key: String, file_key: String, node_id: String, name: String, description: String, created_at: String, updated_at: String, user: models::User) -> PublishedComponent {
        PublishedComponent {
            key,
            file_key,
            node_id,
            thumbnail_url: None,
            name,
            description,
            created_at,
            updated_at,
            user: Box::new(user),
            containing_frame: None,
        }
    }
}