twilight_model/guild/audit_log/
integration.rsuse crate::{
guild::IntegrationAccount,
id::{marker::IntegrationMarker, Id},
user::User,
util::Timestamp,
};
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct AuditLogGuildIntegration {
#[serde(skip_serializing_if = "Option::is_none")]
pub account: Option<IntegrationAccount>,
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub expire_behavior: Option<u64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub expire_grace_period: Option<u64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<Id<IntegrationMarker>>,
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
pub kind: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub role_id: Option<Id<IntegrationMarker>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub synced_at: Option<Timestamp>,
#[serde(skip_serializing_if = "Option::is_none")]
pub syncing: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub user: Option<User>,
}
#[cfg(test)]
mod tests {
use super::AuditLogGuildIntegration;
use serde::{Deserialize, Serialize};
use static_assertions::{assert_fields, assert_impl_all};
use std::{fmt::Debug, hash::Hash};
assert_fields!(
AuditLogGuildIntegration: account,
enabled,
expire_behavior,
expire_grace_period,
id,
kind,
name,
role_id,
synced_at,
syncing,
user
);
assert_impl_all!(
AuditLogGuildIntegration: Clone,
Debug,
Deserialize<'static>,
Eq,
Hash,
PartialEq,
Send,
Serialize,
Sync
);
}