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};

/// Worker : worker in the pool
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Worker {
    /// the id of the worker
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// the id of the worker pool
    #[serde(rename = "pool_id", skip_serializing_if = "Option::is_none")]
    pub pool_id: Option<String>,
    /// the name of the running job in the worker
    #[serde(rename = "job_name", skip_serializing_if = "Option::is_none")]
    pub job_name: Option<String>,
    /// the id of the running job in the worker
    #[serde(rename = "job_id", skip_serializing_if = "Option::is_none")]
    pub job_id: Option<String>,
    /// The start time of the worker
    #[serde(rename = "start_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub start_at: Option<Option<String>>,
    /// the checkin of the running job in the worker
    #[serde(rename = "check_in", skip_serializing_if = "Option::is_none")]
    pub check_in: Option<String>,
    /// The checkin time of the worker
    #[serde(rename = "checkin_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub checkin_at: Option<Option<String>>,
}

impl Worker {
    /// worker in the pool
    pub fn new() -> Worker {
        Worker {
            id: None,
            pool_id: None,
            job_name: None,
            job_id: None,
            start_at: None,
            check_in: None,
            checkin_at: None,
        }
    }
}