enbbox 1.0.1

Notification infrastructure API — open-source alternative to Novu/Courier
Documentation
/*
 * enbbox API
 *
 * Notification infrastructure API — open-source alternative to Novu/Courier
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// ConnectionTest : Result of testing a provider integration connection.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ConnectionTest {
    #[serde(rename = "latency_ms", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub latency_ms: Option<Option<u64>>,
    #[serde(rename = "message")]
    pub message: String,
    #[serde(rename = "success")]
    pub success: bool,
}

impl ConnectionTest {
    /// Result of testing a provider integration connection.
    pub fn new(message: String, success: bool) -> ConnectionTest {
        ConnectionTest {
            latency_ms: None,
            message,
            success,
        }
    }
}