windmill-api 1.774.0

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Windmill API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.774.0
 * Contact: contact@windmill.dev
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetFlowAllResults200ResponseEntriesInner {
    #[serde(rename = "job_id")]
    pub job_id: String,
    /// human-readable label describing the job's position in the flow tree
    #[serde(rename = "label")]
    pub label: String,
    /// job kind (script, flow, forloopflow, ...)
    #[serde(rename = "kind")]
    pub kind: String,
    #[serde(rename = "flow_step_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub flow_step_id: Option<Option<String>>,
    /// materialized step path (e.g. \"a/b\")
    #[serde(rename = "step_path", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub step_path: Option<Option<String>>,
    /// depth in the flow tree (0 for the root flow job)
    #[serde(rename = "depth")]
    pub depth: i32,
    /// parent module type (forloopflow, branchall, ...)
    #[serde(rename = "parent_module_type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub parent_module_type: Option<Option<String>>,
    /// 1-based index of this job among siblings sharing the same step
    #[serde(rename = "sibling_index")]
    pub sibling_index: i32,
    /// total number of siblings sharing the same step
    #[serde(rename = "sibling_count")]
    pub sibling_count: i32,
    #[serde(rename = "status")]
    pub status: Status,
    #[serde(rename = "success", skip_serializing_if = "Option::is_none")]
    pub success: Option<bool>,
    #[serde(rename = "duration_ms", skip_serializing_if = "Option::is_none")]
    pub duration_ms: Option<i64>,
    #[serde(rename = "started_at", skip_serializing_if = "Option::is_none")]
    pub started_at: Option<String>,
    /// result JSON text truncated to the per-entry budget; absent until the job has completed
    #[serde(rename = "result_prefix", skip_serializing_if = "Option::is_none")]
    pub result_prefix: Option<String>,
    /// full length in characters of the result JSON text (greater than the prefix length when truncated)
    #[serde(rename = "result_length", skip_serializing_if = "Option::is_none")]
    pub result_length: Option<i32>,
}

impl GetFlowAllResults200ResponseEntriesInner {
    pub fn new(job_id: String, label: String, kind: String, depth: i32, sibling_index: i32, sibling_count: i32, status: Status) -> GetFlowAllResults200ResponseEntriesInner {
        GetFlowAllResults200ResponseEntriesInner {
            job_id,
            label,
            kind,
            flow_step_id: None,
            step_path: None,
            depth,
            parent_module_type: None,
            sibling_index,
            sibling_count,
            status,
            success: None,
            duration_ms: None,
            started_at: None,
            result_prefix: None,
            result_length: None,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "success")]
    Success,
    #[serde(rename = "failure")]
    Failure,
    #[serde(rename = "canceled")]
    Canceled,
    #[serde(rename = "skipped")]
    Skipped,
    #[serde(rename = "suspended")]
    Suspended,
    #[serde(rename = "running")]
    Running,
    #[serde(rename = "queued")]
    Queued,
}

impl Default for Status {
    fn default() -> Status {
        Self::Success
    }
}