windmill-api 1.727.0

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * 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,
        }
    }
}