figma_api/models/
library_item_data.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/// LibraryItemData : An object representing the library item information in the payload of the `LIBRARY_PUBLISH` event
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct LibraryItemData {
17    /// Unique identifier for the library item
18    #[serde(rename = "key")]
19    pub key: String,
20    /// Name of the library item
21    #[serde(rename = "name")]
22    pub name: String,
23}
24
25impl LibraryItemData {
26    /// An object representing the library item information in the payload of the `LIBRARY_PUBLISH` event
27    pub fn new(key: String, name: String) -> LibraryItemData {
28        LibraryItemData {
29            key,
30            name,
31        }
32    }
33}
34