windmill-api 1.864.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.864.0
 * Contact: contact@windmill.dev
 * Generated by: https://openapi-generator.tech
 */

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

/// WorkerPingJobStats : script and flow-step jobs this worker ran and how many of them failed, over its whole life, the last 24 hours and its last 100 jobs. A flow's own outcome is not counted, since its failure is that of a step already counted on the worker that ran it. Canceled jobs count as executed, not failed.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WorkerPingJobStats {
    #[serde(rename = "total")]
    pub total: Box<models::WorkerJobCounts>,
    #[serde(rename = "last_24h")]
    pub last_24h: Box<models::WorkerJobCounts>,
    #[serde(rename = "last_100")]
    pub last_100: Box<models::WorkerJobCounts>,
}

impl WorkerPingJobStats {
    /// script and flow-step jobs this worker ran and how many of them failed, over its whole life, the last 24 hours and its last 100 jobs. A flow's own outcome is not counted, since its failure is that of a step already counted on the worker that ran it. Canceled jobs count as executed, not failed.
    pub fn new(total: models::WorkerJobCounts, last_24h: models::WorkerJobCounts, last_100: models::WorkerJobCounts) -> WorkerPingJobStats {
        WorkerPingJobStats {
            total: Box::new(total),
            last_24h: Box::new(last_24h),
            last_100: Box::new(last_100),
        }
    }
}