harbor-api 2.0.0

These APIs provide services for manipulating Harbor project.
Documentation
/*
 * Harbor API
 *
 * These APIs provide services for manipulating Harbor project.
 *
 * The version of the OpenAPI document: 2.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Metrics {
    /// The count of task
    #[serde(rename = "task_count", skip_serializing_if = "Option::is_none")]
    pub task_count: Option<i32>,
    /// The count of success task
    #[serde(rename = "success_task_count", skip_serializing_if = "Option::is_none")]
    pub success_task_count: Option<i32>,
    /// The count of error task
    #[serde(rename = "error_task_count", skip_serializing_if = "Option::is_none")]
    pub error_task_count: Option<i32>,
    /// The count of pending task
    #[serde(rename = "pending_task_count", skip_serializing_if = "Option::is_none")]
    pub pending_task_count: Option<i32>,
    /// The count of running task
    #[serde(rename = "running_task_count", skip_serializing_if = "Option::is_none")]
    pub running_task_count: Option<i32>,
    /// The count of scheduled task
    #[serde(rename = "scheduled_task_count", skip_serializing_if = "Option::is_none")]
    pub scheduled_task_count: Option<i32>,
    /// The count of stopped task
    #[serde(rename = "stopped_task_count", skip_serializing_if = "Option::is_none")]
    pub stopped_task_count: Option<i32>,
}

impl Metrics {
    pub fn new() -> Metrics {
        Metrics {
            task_count: None,
            success_task_count: None,
            error_task_count: None,
            pending_task_count: None,
            running_task_count: None,
            scheduled_task_count: None,
            stopped_task_count: None,
        }
    }
}