Skip to main content

windmill_api/models/
transfer_drafts_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.872.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 TransferDraftsRequest {
16    #[serde(rename = "target_workspace", skip_serializing_if = "Option::is_none")]
17    pub target_workspace: Option<String>,
18    #[serde(rename = "items")]
19    pub items: Vec<models::DraftItemRef>,
20    #[serde(rename = "remove_from_source", skip_serializing_if = "Option::is_none")]
21    pub remove_from_source: Option<bool>,
22    /// Overwrite the user's own drafts of `items` already in the target instead of returning them as conflicts.
23    #[serde(rename = "replace_existing", skip_serializing_if = "Option::is_none")]
24    pub replace_existing: Option<bool>,
25}
26
27impl TransferDraftsRequest {
28    pub fn new(items: Vec<models::DraftItemRef>) -> TransferDraftsRequest {
29        TransferDraftsRequest {
30            target_workspace: None,
31            items,
32            remove_from_source: None,
33            replace_existing: None,
34        }
35    }
36}
37