Skip to main content

windmill_api/models/
publish_draft_body.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.768.0
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 PublishDraftBody {
16    /// hub project slug (3-50 chars, lowercase alphanumeric and hyphens, no leading/trailing hyphen)
17    #[serde(rename = "slug")]
18    pub slug: String,
19    #[serde(rename = "name")]
20    pub name: String,
21    #[serde(rename = "summary")]
22    pub summary: String,
23    #[serde(rename = "readme", skip_serializing_if = "Option::is_none")]
24    pub readme: Option<String>,
25}
26
27impl PublishDraftBody {
28    pub fn new(slug: String, name: String, summary: String) -> PublishDraftBody {
29        PublishDraftBody {
30            slug,
31            name,
32            summary,
33            readme: None,
34        }
35    }
36}
37