figma_api/models/user.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/// User : A description of a user.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct User {
17 /// Unique stable id of the user.
18 #[serde(rename = "id")]
19 pub id: String,
20 /// Name of the user.
21 #[serde(rename = "handle")]
22 pub handle: String,
23 /// URL link to the user's profile image.
24 #[serde(rename = "img_url")]
25 pub img_url: String,
26}
27
28impl User {
29 /// A description of a user.
30 pub fn new(id: String, handle: String, img_url: String) -> User {
31 User {
32 id,
33 handle,
34 img_url,
35 }
36 }
37}
38