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
67
68
69
/*
* 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,
}
}
}