windmill_api/models/
create_app_request.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.500.3
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 CreateAppRequest {
16    #[serde(rename = "path")]
17    pub path: String,
18    #[serde(rename = "value", deserialize_with = "Option::deserialize")]
19    pub value: Option<serde_json::Value>,
20    #[serde(rename = "summary")]
21    pub summary: String,
22    #[serde(rename = "policy")]
23    pub policy: Box<models::Policy>,
24    #[serde(rename = "draft_only", skip_serializing_if = "Option::is_none")]
25    pub draft_only: Option<bool>,
26    #[serde(rename = "deployment_message", skip_serializing_if = "Option::is_none")]
27    pub deployment_message: Option<String>,
28    #[serde(rename = "custom_path", skip_serializing_if = "Option::is_none")]
29    pub custom_path: Option<String>,
30}
31
32impl CreateAppRequest {
33    pub fn new(path: String, value: Option<serde_json::Value>, summary: String, policy: models::Policy) -> CreateAppRequest {
34        CreateAppRequest {
35            path,
36            value,
37            summary,
38            policy: Box::new(policy),
39            draft_only: None,
40            deployment_message: None,
41            custom_path: None,
42        }
43    }
44}
45