Skip to main content

windmill_api/models/
publish_app_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.770.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 PublishAppBody {
16    #[serde(rename = "app")]
17    pub app: serde_json::Value,
18    #[serde(rename = "apps")]
19    pub apps: Vec<String>,
20    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
21    pub description: Option<String>,
22    #[serde(rename = "summary")]
23    pub summary: String,
24    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
25    pub path: Option<String>,
26    #[serde(rename = "source_path", skip_serializing_if = "Option::is_none")]
27    pub source_path: Option<String>,
28    /// hub project slug (3-50 chars, lowercase alphanumeric and hyphens, no leading/trailing hyphen)
29    #[serde(rename = "project_slug")]
30    pub project_slug: String,
31}
32
33impl PublishAppBody {
34    pub fn new(app: serde_json::Value, apps: Vec<String>, summary: String, project_slug: String) -> PublishAppBody {
35        PublishAppBody {
36            app,
37            apps,
38            description: None,
39            summary,
40            path: None,
41            source_path: None,
42            project_slug,
43        }
44    }
45}
46