harbor_api/models/
metrics.rs

1/*
2 * Harbor API
3 *
4 * These APIs provide services for manipulating Harbor project.
5 *
6 * The version of the OpenAPI document: 2.0
7 * 
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 Metrics {
16    /// The count of task
17    #[serde(rename = "task_count", skip_serializing_if = "Option::is_none")]
18    pub task_count: Option<i32>,
19    /// The count of success task
20    #[serde(rename = "success_task_count", skip_serializing_if = "Option::is_none")]
21    pub success_task_count: Option<i32>,
22    /// The count of error task
23    #[serde(rename = "error_task_count", skip_serializing_if = "Option::is_none")]
24    pub error_task_count: Option<i32>,
25    /// The count of pending task
26    #[serde(rename = "pending_task_count", skip_serializing_if = "Option::is_none")]
27    pub pending_task_count: Option<i32>,
28    /// The count of running task
29    #[serde(rename = "running_task_count", skip_serializing_if = "Option::is_none")]
30    pub running_task_count: Option<i32>,
31    /// The count of scheduled task
32    #[serde(rename = "scheduled_task_count", skip_serializing_if = "Option::is_none")]
33    pub scheduled_task_count: Option<i32>,
34    /// The count of stopped task
35    #[serde(rename = "stopped_task_count", skip_serializing_if = "Option::is_none")]
36    pub stopped_task_count: Option<i32>,
37}
38
39impl Metrics {
40    pub fn new() -> Metrics {
41        Metrics {
42            task_count: None,
43            success_task_count: None,
44            error_task_count: None,
45            pending_task_count: None,
46            running_task_count: None,
47            scheduled_task_count: None,
48            stopped_task_count: None,
49        }
50    }
51}
52