1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* Windmill API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.727.0
* Contact: contact@windmill.dev
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ListDrafts200ResponseInner {
#[serde(rename = "kind")]
pub kind: models::UserDraftItemKind,
#[serde(rename = "path")]
pub path: String,
/// Best-effort, read from the draft JSON's `summary` field when the editor shape carries one.
#[serde(rename = "summary", skip_serializing_if = "Option::is_none")]
pub summary: Option<String>,
/// User-typed friendly path from the draft JSON's `draft_path`, when set and different from the storage path (e.g. a never-deployed item parked at `u/{user}/draft_{uuid}`).
#[serde(rename = "draft_path", skip_serializing_if = "Option::is_none")]
pub draft_path: Option<String>,
/// No deployed counterpart exists at this path — the draft is the whole item.
#[serde(rename = "draft_only")]
pub draft_only: bool,
/// The listed draft is a legacy workspace-level row (email NULL) predating the per-user drafts migration. Only true when no per-user draft exists at this path.
#[serde(rename = "legacy_draft")]
pub legacy_draft: bool,
#[serde(rename = "created_at")]
pub created_at: String,
}
impl ListDrafts200ResponseInner {
pub fn new(kind: models::UserDraftItemKind, path: String, draft_only: bool, legacy_draft: bool, created_at: String) -> ListDrafts200ResponseInner {
ListDrafts200ResponseInner {
kind,
path,
summary: None,
draft_path: None,
draft_only,
legacy_draft,
created_at,
}
}
}