figma_api/models/frame_offset.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/// FrameOffset : Position of a comment relative to the frame to which it is attached.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct FrameOffset {
17 /// Unique id specifying the frame.
18 #[serde(rename = "node_id")]
19 pub node_id: String,
20 /// 2D vector offset within the frame from the top-left corner.
21 #[serde(rename = "node_offset")]
22 pub node_offset: Box<models::Vector>,
23}
24
25impl FrameOffset {
26 /// Position of a comment relative to the frame to which it is attached.
27 pub fn new(node_id: String, node_offset: models::Vector) -> FrameOffset {
28 FrameOffset {
29 node_id,
30 node_offset: Box::new(node_offset),
31 }
32 }
33}
34