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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InnerShadowEffect {
    /// The color of the shadow
    #[serde(rename = "color")]
    pub color: Box<models::Rgba>,
    /// Blend mode of the shadow
    #[serde(rename = "blendMode")]
    pub blend_mode: models::BlendMode,
    /// How far the shadow is projected in the x and y directions
    #[serde(rename = "offset")]
    pub offset: Box<models::Vector>,
    /// Radius of the blur effect (applies to shadows as well)
    #[serde(rename = "radius")]
    pub radius: f64,
    /// The distance by which to expand (or contract) the shadow.  For drop shadows, a positive `spread` value creates a shadow larger than the node, whereas a negative value creates a shadow smaller than the node.  For inner shadows, a positive `spread` value contracts the shadow. Spread values are only accepted on rectangles and ellipses, or on frames, components, and instances with visible fill paints and `clipsContent` enabled. When left unspecified, the default value is 0.
    #[serde(rename = "spread", skip_serializing_if = "Option::is_none")]
    pub spread: Option<f64>,
    /// Whether this shadow is visible.
    #[serde(rename = "visible")]
    pub visible: bool,
    #[serde(rename = "boundVariables", skip_serializing_if = "Option::is_none")]
    pub bound_variables: Option<Box<models::BaseShadowEffectBoundVariables>>,
}

impl InnerShadowEffect {
    pub fn new(color: models::Rgba, blend_mode: models::BlendMode, offset: models::Vector, radius: f64, visible: bool) -> InnerShadowEffect {
        InnerShadowEffect {
            color: Box::new(color),
            blend_mode,
            offset: Box::new(offset),
            radius,
            spread: None,
            visible,
            bound_variables: None,
        }
    }
}