use serde::{Serialize, Deserialize};
use super::{MonitoringInsightsStatus, WebhookEnvironmentValues};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct MonitoringInsightsWebhook {
pub environment: WebhookEnvironmentValues,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub reason: Option<String>,
pub status: MonitoringInsightsStatus,
pub user_id: String,
pub webhook_code: String,
pub webhook_type: String,
}
impl std::fmt::Display for MonitoringInsightsWebhook {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(f, "{}", serde_json::to_string(self).unwrap())
}
}