figma_api/models/
action.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/// Action : An action that is performed when a trigger is activated.
15/// An action that is performed when a trigger is activated.
16#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
17#[serde(untagged)]
18pub enum Action {
19    ActionOneOf(Box<models::ActionOneOf>),
20    OpenUrlAction(Box<models::OpenUrlAction>),
21    UpdateMediaRuntimeAction(Box<models::UpdateMediaRuntimeAction>),
22    SetVariableAction(Box<models::SetVariableAction>),
23    SetVariableModeAction(Box<models::SetVariableModeAction>),
24    ConditionalAction(Box<models::ConditionalAction>),
25    NodeAction(Box<models::NodeAction>),
26}
27
28impl Default for Action {
29    fn default() -> Self {
30        Self::ActionOneOf(Default::default())
31    }
32}
33/// 
34#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
35pub enum Type {
36    #[serde(rename = "BACK")]
37    Back,
38    #[serde(rename = "CLOSE")]
39    Close,
40    #[serde(rename = "URL")]
41    Url,
42    #[serde(rename = "UPDATE_MEDIA_RUNTIME")]
43    UpdateMediaRuntime,
44    #[serde(rename = "SET_VARIABLE")]
45    SetVariable,
46    #[serde(rename = "SET_VARIABLE_MODE")]
47    SetVariableMode,
48    #[serde(rename = "CONDITIONAL")]
49    Conditional,
50    #[serde(rename = "NODE")]
51    Node,
52}
53
54impl Default for Type {
55    fn default() -> Type {
56        Self::Back
57    }
58}
59/// 
60#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
61pub enum MediaAction {
62    #[serde(rename = "SKIP_TO")]
63    SkipTo,
64}
65
66impl Default for MediaAction {
67    fn default() -> MediaAction {
68        Self::SkipTo
69    }
70}
71