figma_api/models/
inline_object_7.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 InlineObject7 {
16    /// The status of the request.
17    #[serde(rename = "status")]
18    pub status: Status,
19    /// For successful requests, this value is always `false`.
20    #[serde(rename = "error")]
21    pub error: Error,
22    #[serde(rename = "meta")]
23    pub meta: Box<models::PublishedComponent>,
24}
25
26impl InlineObject7 {
27    pub fn new(status: Status, error: Error, meta: models::PublishedComponent) -> InlineObject7 {
28        InlineObject7 {
29            status,
30            error,
31            meta: Box::new(meta),
32        }
33    }
34}
35/// The status of the request.
36#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
37pub enum Status {
38    #[serde(rename = "200")]
39    Variant200,
40}
41
42impl Default for Status {
43    fn default() -> Status {
44        Self::Variant200
45    }
46}
47/// For successful requests, this value is always `false`.
48#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
49pub enum Error {
50    #[serde(rename = "false")]
51    False,
52}
53
54impl Default for Error {
55    fn default() -> Error {
56        Self::False
57    }
58}
59