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