figma_api/models/
measurement_start_end.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/// MeasurementStartEnd : The node and side a measurement is pinned to
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct MeasurementStartEnd {
17    #[serde(rename = "nodeId")]
18    pub node_id: String,
19    #[serde(rename = "side")]
20    pub side: Side,
21}
22
23impl MeasurementStartEnd {
24    /// The node and side a measurement is pinned to
25    pub fn new(node_id: String, side: Side) -> MeasurementStartEnd {
26        MeasurementStartEnd {
27            node_id,
28            side,
29        }
30    }
31}
32/// 
33#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
34pub enum Side {
35    #[serde(rename = "TOP")]
36    Top,
37    #[serde(rename = "RIGHT")]
38    Right,
39    #[serde(rename = "BOTTOM")]
40    Bottom,
41    #[serde(rename = "LEFT")]
42    Left,
43}
44
45impl Default for Side {
46    fn default() -> Side {
47        Self::Top
48    }
49}
50