Skip to main content

windmill_api/models/
get_fork_creation_status_200_response.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.896.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 GetForkCreationStatus200Response {
16    #[serde(rename = "status")]
17    pub status: Status,
18    /// the part of the copy a running fork is in
19    #[serde(rename = "step", skip_serializing_if = "Option::is_none")]
20    pub step: Option<String>,
21    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
22    pub error: Option<String>,
23    /// what a completed fork goes without, such as objects its data table copies could not carry
24    #[serde(rename = "warnings", skip_serializing_if = "Option::is_none")]
25    pub warnings: Option<Vec<String>>,
26}
27
28impl GetForkCreationStatus200Response {
29    pub fn new(status: Status) -> GetForkCreationStatus200Response {
30        GetForkCreationStatus200Response {
31            status,
32            step: None,
33            error: None,
34            warnings: None,
35        }
36    }
37}
38/// 
39#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
40pub enum Status {
41    #[serde(rename = "running")]
42    Running,
43    #[serde(rename = "completed")]
44    Completed,
45    #[serde(rename = "failed")]
46    Failed,
47}
48
49impl Default for Status {
50    fn default() -> Status {
51        Self::Running
52    }
53}
54