Skip to main content

windmill_api/models/
list_drafts_200_response_inner.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.725.1
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ListDrafts200ResponseInner {
16    #[serde(rename = "kind")]
17    pub kind: models::UserDraftItemKind,
18    #[serde(rename = "path")]
19    pub path: String,
20    /// Best-effort, read from the draft JSON's `summary` field when the editor shape carries one.
21    #[serde(rename = "summary", skip_serializing_if = "Option::is_none")]
22    pub summary: Option<String>,
23    /// No deployed counterpart exists at this path — the draft is the whole item.
24    #[serde(rename = "draft_only")]
25    pub draft_only: bool,
26    #[serde(rename = "created_at")]
27    pub created_at: String,
28}
29
30impl ListDrafts200ResponseInner {
31    pub fn new(kind: models::UserDraftItemKind, path: String, draft_only: bool, created_at: String) -> ListDrafts200ResponseInner {
32        ListDrafts200ResponseInner {
33            kind,
34            path,
35            summary: None,
36            draft_only,
37            created_at,
38        }
39    }
40}
41