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

/// LayoutConstraint : Layout constraint relative to containing Frame
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LayoutConstraint {
    /// Vertical constraint (relative to containing frame) as an enum:  - `TOP`: Node is laid out relative to top of the containing frame - `BOTTOM`: Node is laid out relative to bottom of the containing frame - `CENTER`: Node is vertically centered relative to containing frame - `TOP_BOTTOM`: Both top and bottom of node are constrained relative to containing frame (node stretches with frame) - `SCALE`: Node scales vertically with containing frame
    #[serde(rename = "vertical")]
    pub vertical: Vertical,
    /// Horizontal constraint (relative to containing frame) as an enum:  - `LEFT`: Node is laid out relative to left of the containing frame - `RIGHT`: Node is laid out relative to right of the containing frame - `CENTER`: Node is horizontally centered relative to containing frame - `LEFT_RIGHT`: Both left and right of node are constrained relative to containing frame (node stretches with frame) - `SCALE`: Node scales horizontally with containing frame
    #[serde(rename = "horizontal")]
    pub horizontal: Horizontal,
}

impl LayoutConstraint {
    /// Layout constraint relative to containing Frame
    pub fn new(vertical: Vertical, horizontal: Horizontal) -> LayoutConstraint {
        LayoutConstraint {
            vertical,
            horizontal,
        }
    }
}
/// Vertical constraint (relative to containing frame) as an enum:  - `TOP`: Node is laid out relative to top of the containing frame - `BOTTOM`: Node is laid out relative to bottom of the containing frame - `CENTER`: Node is vertically centered relative to containing frame - `TOP_BOTTOM`: Both top and bottom of node are constrained relative to containing frame (node stretches with frame) - `SCALE`: Node scales vertically with containing frame
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Vertical {
    #[serde(rename = "TOP")]
    Top,
    #[serde(rename = "BOTTOM")]
    Bottom,
    #[serde(rename = "CENTER")]
    Center,
    #[serde(rename = "TOP_BOTTOM")]
    TopBottom,
    #[serde(rename = "SCALE")]
    Scale,
}

impl Default for Vertical {
    fn default() -> Vertical {
        Self::Top
    }
}
/// Horizontal constraint (relative to containing frame) as an enum:  - `LEFT`: Node is laid out relative to left of the containing frame - `RIGHT`: Node is laid out relative to right of the containing frame - `CENTER`: Node is horizontally centered relative to containing frame - `LEFT_RIGHT`: Both left and right of node are constrained relative to containing frame (node stretches with frame) - `SCALE`: Node scales horizontally with containing frame
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Horizontal {
    #[serde(rename = "LEFT")]
    Left,
    #[serde(rename = "RIGHT")]
    Right,
    #[serde(rename = "CENTER")]
    Center,
    #[serde(rename = "LEFT_RIGHT")]
    LeftRight,
    #[serde(rename = "SCALE")]
    Scale,
}

impl Default for Horizontal {
    fn default() -> Horizontal {
        Self::Left
    }
}