figma_api/models/open_url_action.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/// OpenUrlAction : An action that opens a URL.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct OpenUrlAction {
17 #[serde(rename = "type")]
18 pub r#type: Type,
19 #[serde(rename = "url")]
20 pub url: String,
21}
22
23impl OpenUrlAction {
24 /// An action that opens a URL.
25 pub fn new(r#type: Type, url: String) -> OpenUrlAction {
26 OpenUrlAction {
27 r#type,
28 url,
29 }
30 }
31}
32///
33#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
34pub enum Type {
35 #[serde(rename = "URL")]
36 Url,
37}
38
39impl Default for Type {
40 fn default() -> Type {
41 Self::Url
42 }
43}
44