figma_api/models/
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/// ComponentSet : A description of a component set, which is a node containing a set of variants of a component.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ComponentSet {
17    /// The key of the component set
18    #[serde(rename = "key")]
19    pub key: String,
20    /// Name of the component set
21    #[serde(rename = "name")]
22    pub name: String,
23    /// The description of the component set as entered in the editor
24    #[serde(rename = "description")]
25    pub description: String,
26    /// An array of documentation links attached to this component set
27    #[serde(rename = "documentationLinks", skip_serializing_if = "Option::is_none")]
28    pub documentation_links: Option<Vec<models::DocumentationLink>>,
29    /// Whether this component set is a remote component set that doesn't live in this file
30    #[serde(rename = "remote", skip_serializing_if = "Option::is_none")]
31    pub remote: Option<bool>,
32}
33
34impl ComponentSet {
35    /// A description of a component set, which is a node containing a set of variants of a component.
36    pub fn new(key: String, name: String, description: String) -> ComponentSet {
37        ComponentSet {
38            key,
39            name,
40            description,
41            documentation_links: None,
42            remote: None,
43        }
44    }
45}
46