windmill-api 1.683.2

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.683.2
 * 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 Alert {
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "tags_to_monitor")]
    pub tags_to_monitor: Vec<String>,
    #[serde(rename = "jobs_num_threshold")]
    pub jobs_num_threshold: i32,
    #[serde(rename = "alert_cooldown_seconds")]
    pub alert_cooldown_seconds: i32,
    #[serde(rename = "alert_time_threshold_seconds")]
    pub alert_time_threshold_seconds: i32,
}

impl Alert {
    pub fn new(name: String, tags_to_monitor: Vec<String>, jobs_num_threshold: i32, alert_cooldown_seconds: i32, alert_time_threshold_seconds: i32) -> Alert {
        Alert {
            name,
            tags_to_monitor,
            jobs_num_threshold,
            alert_cooldown_seconds,
            alert_time_threshold_seconds,
        }
    }
}