figma_api/models/
blur_effect.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 BlurEffect {
17    NormalBlurEffect(Box<models::NormalBlurEffect>),
18    ProgressiveBlurEffect(Box<models::ProgressiveBlurEffect>),
19}
20
21impl Default for BlurEffect {
22    fn default() -> Self {
23        Self::NormalBlurEffect(Default::default())
24    }
25}
26/// The string literal 'PROGRESSIVE' representing the blur type. Always check the blurType before reading other properties.
27#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
28pub enum BlurType {
29    #[serde(rename = "PROGRESSIVE")]
30    Progressive,
31}
32
33impl Default for BlurType {
34    fn default() -> BlurType {
35        Self::Progressive
36    }
37}
38/// A string literal representing the effect's type. Always check the type before reading other properties.
39#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
40pub enum Type {
41    #[serde(rename = "LAYER_BLUR")]
42    LayerBlur,
43    #[serde(rename = "BACKGROUND_BLUR")]
44    BackgroundBlur,
45}
46
47impl Default for Type {
48    fn default() -> Type {
49        Self::LayerBlur
50    }
51}
52