figma_api/models/
variable_alias.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/// VariableAlias : Contains a variable alias
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct VariableAlias {
17    #[serde(rename = "type")]
18    pub r#type: Type,
19    /// The id of the variable that the current variable is aliased to. This variable can be a local or remote variable, and both can be retrieved via the GET /v1/files/:file_key/variables/local endpoint.
20    #[serde(rename = "id")]
21    pub id: String,
22}
23
24impl VariableAlias {
25    /// Contains a variable alias
26    pub fn new(r#type: Type, id: String) -> VariableAlias {
27        VariableAlias {
28            r#type,
29            id,
30        }
31    }
32}
33/// 
34#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
35pub enum Type {
36    #[serde(rename = "VARIABLE_ALIAS")]
37    VariableAlias,
38}
39
40impl Default for Type {
41    fn default() -> Type {
42        Self::VariableAlias
43    }
44}
45