figma_api/models/
variable_change.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#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15#[serde(tag = "action")]
16pub enum VariableChange {
17    #[serde(rename="CREATE")]
18    Create(Box<models::VariableCreate>),
19    #[serde(rename="UPDATE")]
20    Update(Box<models::VariableUpdate>),
21    #[serde(rename="DELETE")]
22    Delete(Box<models::VariableDelete>),
23}
24
25impl Default for VariableChange {
26    fn default() -> Self {
27        Self::Create(Default::default())
28    }
29}
30
31/// The resolved type of the variable.
32#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
33pub enum ResolvedType {
34    #[serde(rename = "BOOLEAN")]
35    Boolean,
36    #[serde(rename = "FLOAT")]
37    Float,
38    #[serde(rename = "STRING")]
39    String,
40    #[serde(rename = "COLOR")]
41    Color,
42}
43
44impl Default for ResolvedType {
45    fn default() -> ResolvedType {
46        Self::Boolean
47    }
48}
49