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.744.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    /// Create the fork as a persistent dev workspace (id not required to carry the wm-fork- prefix; at most one per parent)
25    #[serde(rename = "is_dev_workspace", skip_serializing_if = "Option::is_none")]
26    pub is_dev_workspace: Option<bool>,
27    /// When creating a dev workspace, lock the parent (prod) against direct deployment
28    #[serde(rename = "lock_prod_deploy", skip_serializing_if = "Option::is_none")]
29    pub lock_prod_deploy: Option<bool>,
30    /// When creating a dev workspace, prevent forking the parent (prod)
31    #[serde(rename = "lock_prod_forking", skip_serializing_if = "Option::is_none")]
32    pub lock_prod_forking: Option<bool>,
33    /// Copy the parent's members (users + group memberships) into the fork so the team can work in it
34    #[serde(rename = "copy_members", skip_serializing_if = "Option::is_none")]
35    pub copy_members: Option<bool>,
36}
37
38impl CreateWorkspaceFork {
39    pub fn new(id: String, name: String) -> CreateWorkspaceFork {
40        CreateWorkspaceFork {
41            id,
42            name,
43            color: None,
44            forked_datatables: None,
45            is_dev_workspace: None,
46            lock_prod_deploy: None,
47            lock_prod_forking: None,
48            copy_members: None,
49        }
50    }
51}
52