figma_api/models/
get_file_nodes_value.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct GetFileNodesValue {
16    #[serde(rename = "document")]
17    pub document: Box<models::Node>,
18    /// A mapping from component IDs to component metadata.
19    #[serde(rename = "components")]
20    pub components: std::collections::HashMap<String, models::Component>,
21    /// A mapping from component set IDs to component set metadata.
22    #[serde(rename = "componentSets")]
23    pub component_sets: std::collections::HashMap<String, models::ComponentSet>,
24    /// The version of the file schema that this file uses.
25    #[serde(rename = "schemaVersion")]
26    pub schema_version: f64,
27    /// A mapping from style IDs to style metadata.
28    #[serde(rename = "styles")]
29    pub styles: std::collections::HashMap<String, models::Style>,
30}
31
32impl GetFileNodesValue {
33    pub fn new(document: models::Node, components: std::collections::HashMap<String, models::Component>, component_sets: std::collections::HashMap<String, models::ComponentSet>, schema_version: f64, styles: std::collections::HashMap<String, models::Style>) -> GetFileNodesValue {
34        GetFileNodesValue {
35            document: Box::new(document),
36            components,
37            component_sets,
38            schema_version,
39            styles,
40        }
41    }
42}
43