Skip to main content

windmill_api/models/
publish_flow_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 PublishFlowBody {
16    #[serde(rename = "flow")]
17    pub flow: Box<models::PublishFlowInner>,
18    #[serde(rename = "apps")]
19    pub apps: Vec<String>,
20    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
21    pub path: Option<String>,
22    #[serde(rename = "source_path", skip_serializing_if = "Option::is_none")]
23    pub source_path: Option<String>,
24    /// hub project slug (3-50 chars, lowercase alphanumeric and hyphens, no leading/trailing hyphen)
25    #[serde(rename = "project_slug")]
26    pub project_slug: String,
27}
28
29impl PublishFlowBody {
30    pub fn new(flow: models::PublishFlowInner, apps: Vec<String>, project_slug: String) -> PublishFlowBody {
31        PublishFlowBody {
32            flow: Box::new(flow),
33            apps,
34            path: None,
35            source_path: None,
36            project_slug,
37        }
38    }
39}
40