Skip to main content

windmill_api/models/
check_schema_contracts_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.862.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 CheckSchemaContractsRequest {
16    #[serde(rename = "language")]
17    pub language: models::ScriptLang,
18    #[serde(rename = "content")]
19    pub content: String,
20    /// The script's path. A `// materialize` that names no table writes the table named after the script, so without it such a target is not checked. 
21    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
22    pub path: Option<String>,
23}
24
25impl CheckSchemaContractsRequest {
26    pub fn new(language: models::ScriptLang, content: String) -> CheckSchemaContractsRequest {
27        CheckSchemaContractsRequest {
28            language,
29            content,
30            path: None,
31        }
32    }
33}
34