figma_api/models/
link_access.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/// LinkAccess : Access policy for users who have the link to the file.
15/// Access policy for users who have the link to the file.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum LinkAccess {
18    #[serde(rename = "view")]
19    View,
20    #[serde(rename = "edit")]
21    Edit,
22    #[serde(rename = "org_view")]
23    OrgView,
24    #[serde(rename = "org_edit")]
25    OrgEdit,
26    #[serde(rename = "inherit")]
27    Inherit,
28
29}
30
31impl std::fmt::Display for LinkAccess {
32    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
33        match self {
34            Self::View => write!(f, "view"),
35            Self::Edit => write!(f, "edit"),
36            Self::OrgView => write!(f, "org_view"),
37            Self::OrgEdit => write!(f, "org_edit"),
38            Self::Inherit => write!(f, "inherit"),
39        }
40    }
41}
42
43impl Default for LinkAccess {
44    fn default() -> LinkAccess {
45        Self::View
46    }
47}
48