windmill_api/models/
static_transform.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.592.1
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// StaticTransform : Static value passed directly to the step. Use for hardcoded values or resource references like '$res:path/to/resource'
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct StaticTransform {
17    /// The static value. For resources, use format '$res:path/to/resource'
18    #[serde(rename = "value", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
19    pub value: Option<Option<serde_json::Value>>,
20    #[serde(rename = "type")]
21    pub r#type: Type,
22}
23
24impl StaticTransform {
25    /// Static value passed directly to the step. Use for hardcoded values or resource references like '$res:path/to/resource'
26    pub fn new(r#type: Type) -> StaticTransform {
27        StaticTransform {
28            value: None,
29            r#type,
30        }
31    }
32}
33/// 
34#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
35pub enum Type {
36    #[serde(rename = "static")]
37    Static,
38}
39
40impl Default for Type {
41    fn default() -> Type {
42        Self::Static
43    }
44}
45