Skip to main content

windmill_api/models/
new_workspace_dependencies.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.825.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 NewWorkspaceDependencies {
16    /// must equal the workspace in the request path
17    #[serde(rename = "workspace_id")]
18    pub workspace_id: String,
19    #[serde(rename = "language")]
20    pub language: models::ScriptLang,
21    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
22    pub name: Option<String>,
23    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
24    pub description: Option<String>,
25    #[serde(rename = "content")]
26    pub content: String,
27}
28
29impl NewWorkspaceDependencies {
30    pub fn new(workspace_id: String, language: models::ScriptLang, content: String) -> NewWorkspaceDependencies {
31        NewWorkspaceDependencies {
32            workspace_id,
33            language,
34            name: None,
35            description: None,
36            content,
37        }
38    }
39}
40