Skip to main content

windmill_api/models/
migrate_legacy_draft_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.733.1
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 MigrateLegacyDraftRequest {
16    /// delete the legacy draft, or take ownership of it.
17    #[serde(rename = "action")]
18    pub action: Action,
19}
20
21impl MigrateLegacyDraftRequest {
22    pub fn new(action: Action) -> MigrateLegacyDraftRequest {
23        MigrateLegacyDraftRequest {
24            action,
25        }
26    }
27}
28/// delete the legacy draft, or take ownership of it.
29#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
30pub enum Action {
31    #[serde(rename = "delete")]
32    Delete,
33    #[serde(rename = "assign_to_self")]
34    AssignToSelf,
35}
36
37impl Default for Action {
38    fn default() -> Action {
39        Self::Delete
40    }
41}
42