figma_api/models/
get_file_nodes.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 GetFileNodes {
16    /// The name of the file as it appears in the editor.
17    #[serde(rename = "name")]
18    pub name: String,
19    #[serde(rename = "role")]
20    pub role: models::Role,
21    /// The UTC ISO 8601 time at which the file was last modified.
22    #[serde(rename = "lastModified")]
23    pub last_modified: String,
24    #[serde(rename = "editorType")]
25    pub editor_type: models::EditorType,
26    /// A URL to a thumbnail image of the file.
27    #[serde(rename = "thumbnailUrl")]
28    pub thumbnail_url: String,
29    /// The version number of the file. This number is incremented when a file is modified and can be used to check if the file has changed between requests.
30    #[serde(rename = "version")]
31    pub version: String,
32    /// A mapping from node IDs to node metadata.
33    #[serde(rename = "nodes")]
34    pub nodes: std::collections::HashMap<String, models::GetFileNodesValue>,
35}
36
37impl GetFileNodes {
38    pub fn new(name: String, role: models::Role, last_modified: String, editor_type: models::EditorType, thumbnail_url: String, version: String, nodes: std::collections::HashMap<String, models::GetFileNodesValue>) -> GetFileNodes {
39        GetFileNodes {
40            name,
41            role,
42            last_modified,
43            editor_type,
44            thumbnail_url,
45            version,
46            nodes,
47        }
48    }
49}
50