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 GetFileMeta {
    /// The name of the file.
    #[serde(rename = "name")]
    pub name: String,
    /// The name of the project containing the file.
    #[serde(rename = "folder_name", skip_serializing_if = "Option::is_none")]
    pub folder_name: Option<String>,
    /// The UTC ISO 8601 time at which the file content was last modified.
    #[serde(rename = "last_touched_at")]
    pub last_touched_at: String,
    /// The user who created the file.
    #[serde(rename = "creator")]
    pub creator: Box<models::User>,
    /// The user who last modified the file contents.
    #[serde(rename = "last_touched_by", skip_serializing_if = "Option::is_none")]
    pub last_touched_by: Option<Box<models::User>>,
    /// A URL to a thumbnail image of the file.
    #[serde(rename = "thumbnail_url", skip_serializing_if = "Option::is_none")]
    pub thumbnail_url: Option<String>,
    #[serde(rename = "editorType")]
    pub editor_type: models::EditorType,
    #[serde(rename = "role", skip_serializing_if = "Option::is_none")]
    pub role: Option<models::Role>,
    #[serde(rename = "link_access", skip_serializing_if = "Option::is_none")]
    pub link_access: Option<models::LinkAccess>,
    /// The URL of the file.
    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
    /// The version number of the file. This number is incremented when a file is modified and can be used to check if the file has changed between requests.
    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
    pub version: Option<String>,
}

impl GetFileMeta {
    pub fn new(name: String, last_touched_at: String, creator: models::User, editor_type: models::EditorType) -> GetFileMeta {
        GetFileMeta {
            name,
            folder_name: None,
            last_touched_at,
            creator: Box::new(creator),
            last_touched_by: None,
            thumbnail_url: None,
            editor_type,
            role: None,
            link_access: None,
            url: None,
            version: None,
        }
    }
}