figma_api/models/
trigger_one_of.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, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct TriggerOneOf {
16    #[serde(rename = "type")]
17    pub r#type: Type,
18}
19
20impl TriggerOneOf {
21    pub fn new(r#type: Type) -> TriggerOneOf {
22        TriggerOneOf {
23            r#type,
24        }
25    }
26}
27/// 
28#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
29pub enum Type {
30    #[serde(rename = "ON_CLICK")]
31    OnClick,
32    #[serde(rename = "ON_HOVER")]
33    OnHover,
34    #[serde(rename = "ON_PRESS")]
35    OnPress,
36    #[serde(rename = "ON_DRAG")]
37    OnDrag,
38}
39
40impl Default for Type {
41    fn default() -> Type {
42        Self::OnClick
43    }
44}
45