artifact-keeper-client 1.2.1

Rust client for the Artifact Keeper REST API
Documentation
/*
 * Artifact Keeper API
 *
 * Enterprise artifact registry supporting 45+ package formats.
 *
 * The version of the OpenAPI document: 1.2.1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// ServiceHealthEntry : A health check result for a single service.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ServiceHealthEntry {
    #[serde(rename = "checked_at")]
    pub checked_at: String,
    #[serde(rename = "message", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub message: Option<Option<String>>,
    #[serde(rename = "previous_status", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub previous_status: Option<Option<String>>,
    #[serde(rename = "response_time_ms", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub response_time_ms: Option<Option<i32>>,
    #[serde(rename = "service_name")]
    pub service_name: String,
    #[serde(rename = "status")]
    pub status: String,
}

impl ServiceHealthEntry {
    /// A health check result for a single service.
    pub fn new(checked_at: String, service_name: String, status: String) -> ServiceHealthEntry {
        ServiceHealthEntry {
            checked_at,
            message: None,
            previous_status: None,
            response_time_ms: None,
            service_name,
            status,
        }
    }
}