figma_api/models/
variable_mode_value.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/// VariableModeValue : An object that represents a value for a given mode of a variable. All properties are required.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct VariableModeValue {
17    /// The target variable. You can use the temporary id of a variable.
18    #[serde(rename = "variableId")]
19    pub variable_id: String,
20    /// Must correspond to a mode in the variable collection that contains the target variable.
21    #[serde(rename = "modeId")]
22    pub mode_id: String,
23    #[serde(rename = "value")]
24    pub value: Box<models::VariableValue>,
25}
26
27impl VariableModeValue {
28    /// An object that represents a value for a given mode of a variable. All properties are required.
29    pub fn new(variable_id: String, mode_id: String, value: models::VariableValue) -> VariableModeValue {
30        VariableModeValue {
31            variable_id,
32            mode_id,
33            value: Box::new(value),
34        }
35    }
36}
37