figma_api/models/
export_setting.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/// ExportSetting : An export setting.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ExportSetting {
17    #[serde(rename = "suffix")]
18    pub suffix: String,
19    #[serde(rename = "format")]
20    pub format: Format,
21    #[serde(rename = "constraint")]
22    pub constraint: Box<models::Constraint>,
23}
24
25impl ExportSetting {
26    /// An export setting.
27    pub fn new(suffix: String, format: Format, constraint: models::Constraint) -> ExportSetting {
28        ExportSetting {
29            suffix,
30            format,
31            constraint: Box::new(constraint),
32        }
33    }
34}
35/// 
36#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
37pub enum Format {
38    #[serde(rename = "JPG")]
39    Jpg,
40    #[serde(rename = "PNG")]
41    Png,
42    #[serde(rename = "SVG")]
43    Svg,
44    #[serde(rename = "PDF")]
45    Pdf,
46}
47
48impl Default for Format {
49    fn default() -> Format {
50        Self::Jpg
51    }
52}
53