figma_api/models/comment_fragment.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/// CommentFragment : An object representing a fragment of a comment left by a user, used in the payload of the `FILE_COMMENT` event. Note only ONE of the fields below will be set
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CommentFragment {
17 /// Comment text that is set if a fragment is text based
18 #[serde(rename = "text", skip_serializing_if = "Option::is_none")]
19 pub text: Option<String>,
20 /// User id that is set if a fragment refers to a user mention
21 #[serde(rename = "mention", skip_serializing_if = "Option::is_none")]
22 pub mention: Option<String>,
23}
24
25impl CommentFragment {
26 /// An object representing a fragment of a comment left by a user, used in the payload of the `FILE_COMMENT` event. Note only ONE of the fields below will be set
27 pub fn new() -> CommentFragment {
28 CommentFragment {
29 text: None,
30 mention: None,
31 }
32 }
33}
34