windmill_api/models/
path_script.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.2
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 PathScript {
16    #[serde(rename = "input_transforms")]
17    pub input_transforms: std::collections::HashMap<String, models::InputTransform>,
18    #[serde(rename = "path")]
19    pub path: String,
20    #[serde(rename = "hash", skip_serializing_if = "Option::is_none")]
21    pub hash: Option<String>,
22    #[serde(rename = "type")]
23    pub r#type: Type,
24    #[serde(rename = "tag_override", skip_serializing_if = "Option::is_none")]
25    pub tag_override: Option<String>,
26    #[serde(rename = "is_trigger", skip_serializing_if = "Option::is_none")]
27    pub is_trigger: Option<bool>,
28}
29
30impl PathScript {
31    pub fn new(input_transforms: std::collections::HashMap<String, models::InputTransform>, path: String, r#type: Type) -> PathScript {
32        PathScript {
33            input_transforms,
34            path,
35            hash: None,
36            r#type,
37            tag_override: None,
38            is_trigger: None,
39        }
40    }
41}
42/// 
43#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
44pub enum Type {
45    #[serde(rename = "script")]
46    Script,
47}
48
49impl Default for Type {
50    fn default() -> Type {
51        Self::Script
52    }
53}
54