figma_api/models/
expression.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/// Expression : Defines the [Expression](https://help.figma.com/hc/en-us/articles/15253194385943) object, which contains a list of `VariableData` objects strung together by operators (`ExpressionFunction`).
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Expression {
17    #[serde(rename = "expressionFunction")]
18    pub expression_function: models::ExpressionFunction,
19    #[serde(rename = "expressionArguments")]
20    pub expression_arguments: Vec<models::VariableData>,
21}
22
23impl Expression {
24    /// Defines the [Expression](https://help.figma.com/hc/en-us/articles/15253194385943) object, which contains a list of `VariableData` objects strung together by operators (`ExpressionFunction`).
25    pub fn new(expression_function: models::ExpressionFunction, expression_arguments: Vec<models::VariableData>) -> Expression {
26        Expression {
27            expression_function,
28            expression_arguments,
29        }
30    }
31}
32