windmill_api/models/flow_module_mock.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.864.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// FlowModuleMock : Mock configuration for testing without executing the actual step
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct FlowModuleMock {
17 /// If true, return mock value instead of executing
18 #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
19 pub enabled: Option<bool>,
20 /// Value to return when mocked
21 #[serde(rename = "return_value", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
22 pub return_value: Option<Option<serde_json::Value>>,
23 /// If true, the mock applies only to runs started as a flow preview (from the editor, and every job under it, subflows included). Absent or false, it applies to every run.
24 #[serde(rename = "preview_only", skip_serializing_if = "Option::is_none")]
25 pub preview_only: Option<bool>,
26}
27
28impl FlowModuleMock {
29 /// Mock configuration for testing without executing the actual step
30 pub fn new() -> FlowModuleMock {
31 FlowModuleMock {
32 enabled: None,
33 return_value: None,
34 preview_only: None,
35 }
36 }
37}
38