figma_api/models/
published_component_set.rs

1/*
2 * Figma API
3 *
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).
5 *
6 * The version of the OpenAPI document: 0.31.0
7 * Contact: support@figma.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// PublishedComponentSet : A node containing a set of variants of a component.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PublishedComponentSet {
17    /// The unique identifier for the component set.
18    #[serde(rename = "key")]
19    pub key: String,
20    /// The unique identifier of the Figma file that contains the component set.
21    #[serde(rename = "file_key")]
22    pub file_key: String,
23    /// The unique identifier of the component set node within the Figma file.
24    #[serde(rename = "node_id")]
25    pub node_id: String,
26    /// A URL to a thumbnail image of the component set.
27    #[serde(rename = "thumbnail_url", skip_serializing_if = "Option::is_none")]
28    pub thumbnail_url: Option<String>,
29    /// The name of the component set.
30    #[serde(rename = "name")]
31    pub name: String,
32    /// The description of the component set as entered by the publisher.
33    #[serde(rename = "description")]
34    pub description: String,
35    /// The UTC ISO 8601 time when the component set was created.
36    #[serde(rename = "created_at")]
37    pub created_at: String,
38    /// The UTC ISO 8601 time when the component set was last updated.
39    #[serde(rename = "updated_at")]
40    pub updated_at: String,
41    /// The user who last updated the component set.
42    #[serde(rename = "user")]
43    pub user: Box<models::User>,
44    /// The containing frame of the component set.
45    #[serde(rename = "containing_frame", skip_serializing_if = "Option::is_none")]
46    pub containing_frame: Option<Box<models::FrameInfo>>,
47}
48
49impl PublishedComponentSet {
50    /// A node containing a set of variants of a component.
51    pub fn new(key: String, file_key: String, node_id: String, name: String, description: String, created_at: String, updated_at: String, user: models::User) -> PublishedComponentSet {
52        PublishedComponentSet {
53            key,
54            file_key,
55            node_id,
56            thumbnail_url: None,
57            name,
58            description,
59            created_at,
60            updated_at,
61            user: Box::new(user),
62            containing_frame: None,
63        }
64    }
65}
66