Skip to main content

windmill_api/models/
create_workspace_fork.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.748.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 CreateWorkspaceFork {
16    #[serde(rename = "id")]
17    pub id: String,
18    #[serde(rename = "name")]
19    pub name: String,
20    #[serde(rename = "color", skip_serializing_if = "Option::is_none")]
21    pub color: Option<String>,
22    #[serde(rename = "forked_datatables", skip_serializing_if = "Option::is_none")]
23    pub forked_datatables: Option<Vec<models::CreateWorkspaceForkForkedDatatablesInner>>,
24    /// Lake names the fork SHARES with the parent (reads and writes the parent's lake directly). Every lake not listed gets the default isolated fork namespace with read-defer to the parent.
25    #[serde(rename = "shared_ducklakes", skip_serializing_if = "Option::is_none")]
26    pub shared_ducklakes: Option<Vec<String>>,
27    /// Create the fork as a persistent dev workspace (id not required to carry the wm-fork- prefix; at most one per parent)
28    #[serde(rename = "is_dev_workspace", skip_serializing_if = "Option::is_none")]
29    pub is_dev_workspace: Option<bool>,
30    /// When creating a dev workspace, lock the parent (prod) against direct deployment
31    #[serde(rename = "lock_prod_deploy", skip_serializing_if = "Option::is_none")]
32    pub lock_prod_deploy: Option<bool>,
33    /// When creating a dev workspace, prevent forking the parent (prod)
34    #[serde(rename = "lock_prod_forking", skip_serializing_if = "Option::is_none")]
35    pub lock_prod_forking: Option<bool>,
36    /// Copy the parent's members (users + group memberships) into the fork so the team can work in it
37    #[serde(rename = "copy_members", skip_serializing_if = "Option::is_none")]
38    pub copy_members: Option<bool>,
39}
40
41impl CreateWorkspaceFork {
42    pub fn new(id: String, name: String) -> CreateWorkspaceFork {
43        CreateWorkspaceFork {
44            id,
45            name,
46            color: None,
47            forked_datatables: None,
48            shared_ducklakes: None,
49            is_dev_workspace: None,
50            lock_prod_deploy: None,
51            lock_prod_forking: None,
52            copy_members: None,
53        }
54    }
55}
56