windmill_api/models/
embed_token_response.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct EmbedTokenResponse {
16 #[serde(rename = "token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
18 pub token: Option<Option<String>>,
19 #[serde(rename = "expiration", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
21 pub expiration: Option<Option<String>>,
22 #[serde(rename = "raw_app")]
24 pub raw_app: bool,
25 #[serde(rename = "sandbox")]
27 pub sandbox: bool,
28 #[serde(rename = "app_path", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
30 pub app_path: Option<Option<String>>,
31 #[serde(rename = "workspace_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
33 pub workspace_id: Option<Option<String>>,
34}
35
36impl EmbedTokenResponse {
37 pub fn new(raw_app: bool, sandbox: bool) -> EmbedTokenResponse {
38 EmbedTokenResponse {
39 token: None,
40 expiration: None,
41 raw_app,
42 sandbox,
43 app_path: None,
44 workspace_id: None,
45 }
46 }
47}
48