harbor_api/models/
worker_pool.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/// WorkerPool : the worker pool of job service
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct WorkerPool {
17    /// the process id of jobservice
18    #[serde(rename = "pid", skip_serializing_if = "Option::is_none")]
19    pub pid: Option<i32>,
20    /// the id of the worker pool
21    #[serde(rename = "worker_pool_id", skip_serializing_if = "Option::is_none")]
22    pub worker_pool_id: Option<String>,
23    /// The start time of the work pool
24    #[serde(rename = "start_at", skip_serializing_if = "Option::is_none")]
25    pub start_at: Option<String>,
26    /// The heartbeat time of the work pool
27    #[serde(rename = "heartbeat_at", skip_serializing_if = "Option::is_none")]
28    pub heartbeat_at: Option<String>,
29    /// The concurrency of the work pool
30    #[serde(rename = "concurrency", skip_serializing_if = "Option::is_none")]
31    pub concurrency: Option<i32>,
32    /// The host of the work pool
33    #[serde(rename = "host", skip_serializing_if = "Option::is_none")]
34    pub host: Option<String>,
35}
36
37impl WorkerPool {
38    /// the worker pool of job service
39    pub fn new() -> WorkerPool {
40        WorkerPool {
41            pid: None,
42            worker_pool_id: None,
43            start_at: None,
44            heartbeat_at: None,
45            concurrency: None,
46            host: None,
47        }
48    }
49}
50