figma_api/models/
transition.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(untagged)]
16pub enum Transition {
17    SimpleTransition(Box<models::SimpleTransition>),
18    DirectionalTransition(Box<models::DirectionalTransition>),
19}
20
21impl Default for Transition {
22    fn default() -> Self {
23        Self::SimpleTransition(Default::default())
24    }
25}
26/// 
27#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
28pub enum Type {
29    #[serde(rename = "DISSOLVE")]
30    Dissolve,
31    #[serde(rename = "SMART_ANIMATE")]
32    SmartAnimate,
33    #[serde(rename = "SCROLL_ANIMATE")]
34    ScrollAnimate,
35    #[serde(rename = "MOVE_IN")]
36    MoveIn,
37    #[serde(rename = "MOVE_OUT")]
38    MoveOut,
39    #[serde(rename = "PUSH")]
40    Push,
41    #[serde(rename = "SLIDE_IN")]
42    SlideIn,
43    #[serde(rename = "SLIDE_OUT")]
44    SlideOut,
45}
46
47impl Default for Type {
48    fn default() -> Type {
49        Self::Dissolve
50    }
51}
52/// 
53#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
54pub enum Direction {
55    #[serde(rename = "LEFT")]
56    Left,
57    #[serde(rename = "RIGHT")]
58    Right,
59    #[serde(rename = "TOP")]
60    Top,
61    #[serde(rename = "BOTTOM")]
62    Bottom,
63}
64
65impl Default for Direction {
66    fn default() -> Direction {
67        Self::Left
68    }
69}
70