Skip to main content

windmill_api/models/
execute_component_request_raw_code.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.841.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 ExecuteComponentRequestRawCode {
16    #[serde(rename = "content")]
17    pub content: String,
18    #[serde(rename = "language")]
19    pub language: String,
20    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
21    pub path: Option<String>,
22    #[serde(rename = "lock", skip_serializing_if = "Option::is_none")]
23    pub lock: Option<String>,
24    #[serde(rename = "cache_ttl", skip_serializing_if = "Option::is_none")]
25    pub cache_ttl: Option<i32>,
26    #[serde(rename = "tag", skip_serializing_if = "Option::is_none")]
27    pub tag: Option<String>,
28    /// Additional modules keyed by relative file path. Honored in preview only: a deployed app runs the modules stored with its runnable.
29    #[serde(rename = "modules", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
30    pub modules: Option<Option<std::collections::HashMap<String, models::ScriptModule>>>,
31}
32
33impl ExecuteComponentRequestRawCode {
34    pub fn new(content: String, language: String) -> ExecuteComponentRequestRawCode {
35        ExecuteComponentRequestRawCode {
36            content,
37            language,
38            path: None,
39            lock: None,
40            cache_ttl: None,
41            tag: None,
42            modules: None,
43        }
44    }
45}
46