figma-api 0.31.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).
Documentation
/*
 * Figma API
 *
 * 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).
 *
 * The version of the OpenAPI document: 0.31.0
 * Contact: support@figma.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// Trigger : The `\"ON_HOVER\"` and `\"ON_PRESS\"` trigger types revert the navigation when the trigger is finished (the result is temporary).  `\"MOUSE_ENTER\"`, `\"MOUSE_LEAVE\"`, `\"MOUSE_UP\"` and `\"MOUSE_DOWN\"` are permanent, one-way navigation. The `delay` parameter requires the trigger to be held for a certain duration of time before the action occurs. Both `timeout` and `delay` values are in milliseconds. The `\"ON_MEDIA_HIT\"` and `\"ON_MEDIA_END\"` trigger types can only trigger from a video.  They fire when a video reaches a certain time or ends. The `timestamp` value is in seconds.
/// The `\"ON_HOVER\"` and `\"ON_PRESS\"` trigger types revert the navigation when the trigger is finished (the result is temporary).  `\"MOUSE_ENTER\"`, `\"MOUSE_LEAVE\"`, `\"MOUSE_UP\"` and `\"MOUSE_DOWN\"` are permanent, one-way navigation. The `delay` parameter requires the trigger to be held for a certain duration of time before the action occurs. Both `timeout` and `delay` values are in milliseconds. The `\"ON_MEDIA_HIT\"` and `\"ON_MEDIA_END\"` trigger types can only trigger from a video.  They fire when a video reaches a certain time or ends. The `timestamp` value is in seconds.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum Trigger {
    TriggerOneOf(Box<models::TriggerOneOf>),
    AfterTimeoutTrigger(Box<models::AfterTimeoutTrigger>),
    TriggerOneOf1(Box<models::TriggerOneOf1>),
    OnKeyDownTrigger(Box<models::OnKeyDownTrigger>),
    OnMediaHitTrigger(Box<models::OnMediaHitTrigger>),
    TriggerOneOf2(Box<models::TriggerOneOf2>),
}

impl Default for Trigger {
    fn default() -> Self {
        Self::TriggerOneOf(Default::default())
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "ON_CLICK")]
    OnClick,
    #[serde(rename = "ON_HOVER")]
    OnHover,
    #[serde(rename = "ON_PRESS")]
    OnPress,
    #[serde(rename = "ON_DRAG")]
    OnDrag,
    #[serde(rename = "AFTER_TIMEOUT")]
    AfterTimeout,
    #[serde(rename = "MOUSE_ENTER")]
    MouseEnter,
    #[serde(rename = "MOUSE_LEAVE")]
    MouseLeave,
    #[serde(rename = "MOUSE_UP")]
    MouseUp,
    #[serde(rename = "MOUSE_DOWN")]
    MouseDown,
    #[serde(rename = "ON_KEY_DOWN")]
    OnKeyDown,
    #[serde(rename = "ON_MEDIA_HIT")]
    OnMediaHit,
    #[serde(rename = "ON_MEDIA_END")]
    OnMediaEnd,
}

impl Default for Type {
    fn default() -> Type {
        Self::OnClick
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Device {
    #[serde(rename = "KEYBOARD")]
    Keyboard,
    #[serde(rename = "XBOX_ONE")]
    XboxOne,
    #[serde(rename = "PS4")]
    Ps4,
    #[serde(rename = "SWITCH_PRO")]
    SwitchPro,
    #[serde(rename = "UNKNOWN_CONTROLLER")]
    UnknownController,
}

impl Default for Device {
    fn default() -> Device {
        Self::Keyboard
    }
}